Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL command in VB6
Message
From
22/11/1998 21:11:23
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
SQL command in VB6
Miscellaneous
Thread ID:
00160386
Message ID:
00160386
Views:
36
Hi .. everybody, the SQL command does not work .. why ?, the error message come out "Too few parameters expected 2"

I use the commands below :

Dim DB as Database
Dim RS as Recordset
Dim mFrom as String
Dim mTo as String

Set DB=OpenDatabase(Data1.DatabaseName, False, True, Data1.Connect)

mFrom = txtFrom.text
mTo=txtTo.text

mSQL="Select * from Cust where CCode between " &mFrom& " and " & mTo

DBGrid1.Visible = True
Set RS = dbsFox.OpenRecordset(mSQL)
Set Data1.Recordset = RS
Next
Reply
Map
View

Click here to load this message in the networking platform