2
If rs.State = 1 Then rs.Close rs.Open "select * from Patient where Pat_name='" & cbotpname.Text & "'", con, adOpenDynamic, adLockOptimistic If rs.BOF = False Then txttage.Text = rs(2) txttgen.Text = rs(3) End If If rs.State = 1 Then rs.Close rs.Open "select * from Inpatient where IPname='" & cbotpname.Text & "'", con, adOpenDynamic, adLockOptimistic If rs.BOF = False Then txttage.Text = rs(2) txttgen.Text = rs(3) End If

Documentvb

Embed Size (px)

DESCRIPTION

source code

Citation preview

Page 1: Documentvb

If rs.State = 1 Then rs.Close

rs.Open "select * from Patient where Pat_name='" & cbotpname.Text & "'", con, adOpenDynamic, adLockOptimistic

If rs.BOF = False Then

txttage.Text = rs(2)

txttgen.Text = rs(3)

End If

If rs.State = 1 Then rs.Close

rs.Open "select * from Inpatient where IPname='" & cbotpname.Text & "'", con, adOpenDynamic, adLockOptimistic

If rs.BOF = False Then

txttage.Text = rs(2)

txttgen.Text = rs(3)

End If

Page 2: Documentvb