|
-
Dec 4th, 2000, 01:30 AM
#1
Thread Starter
New Member
I am switching from DAO to ADO in the next version of my application. The variable strSearch used to work fine with DAO but doesn't want to work in ADO. It uses an SQL LIKE clause.
The strSearch variable value is the result of user input in an input box:
strSearch = InputBox("Type name (or partial) to look for:", "Name")
The recordset is based on an SQL query:
"SELECT Name, Number FROM Patient WHERE Name Like '*" & strSearch & "*'"
The ADO code to open the recordset is as follows:
rstName.Open strSearch, cnnAccident, adOpenDynamic, adLockOptimistic
The DAO code I use to use is
Set rstName = dbsAccident.OpenRecordset(strSearch,dbOpenDyanaset)
Any help is appreciated.
ML
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|