Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recordset FIND problems
Message
From
11/10/2001 02:43:26
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
 
 
To
All
General information
Forum:
Visual Basic
Category:
COM, DCOM and OLE automation
Title:
Recordset FIND problems
Miscellaneous
Thread ID:
00566810
Message ID:
00566810
Views:
55
Hi, I am going to be searching for a record in the db.I am using the recordset.find method to search through the data.
Heres the code..

Dim cnClientdata As ADODB.Connection
Dim rsClientdata As ADODB.Recordset
Dim sFindCriteria As String

Set cnClientdata = New ADODB.Connection
Set rsClientdata = New ADODB.Recordset

sFindCriteria = "clientphone like '" & _
Phonenum & "*'"


With cnClientdata
.Provider = "SQLOLEDB"
.ConnectionString = "User ID=user;Password=user;" & _
"Data Source=user;" & _
"Initial Catalog=user"
.Open

End With

*When this line gets executed, I get an error: COMMAND TEXT NOT SET *
* What does this mean ? *

rsClientdata.Open , cnClientdata
rsClientdata.MoveFirst
rsClientdata.Find SearchCriteria, , adSearchForward

Thanks
Niv
Next
Reply
Map
View

Click here to load this message in the networking platform