Click here to Skip to main content
16,005,121 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
Private Sub Combo7_Click()
Dim RES As New ADODB.Recordset
Dim SQL As String
SQL = "SELECT * FROM DRIVER WHERE DID='" & Combo7.Text & "'"
RES.Open SQL, CON, adOpenDynamic, adLockOptimistic
    If RES.RecordCount > 0 Then
        Text9.Text = RES!DCONT
        Text10.Text = RES!DADD
    End If
RES.Close
End Sub


ERROR:
Invalid number at RES.RECORDCOUNT>0
coz it contains character field
What should i do?

[Edit]Removed shouting[/Edit]
Posted
Updated 18-Dec-12 20:05pm
v3

1 solution

Please specify the column names instead of *. and also use
Rec.Fields.Count
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900