Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek
Message
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Seek
Miscellaneous
Thread ID:
00897996
Message ID:
00897996
Views:
34
Hi All:
I need help using the seek command. Below is my code that I am using to seek a specific record in my recordset.

Set oDataComm = New ADODB.Connection
oDataComm.ConnectionString = "DSN=ctcore"
oDataComm.Open

'This is what I have in my load function
Set oRecSet = New ADODB.Recordset
Set oRecSet.ActiveConnection = oDataConn
oRecSet.CursorLocation = adUseClient
oRecSet.CursorType = adOpenStatic
oRecSet.Open "SELECT * FROM Phone", oDataComm

'This is what I have in my Find command button
strPrompt = "Enter an Phone"
strID = LCase(Trim(InputBox(strPrompt, "Seek Phone")))
If oRecSet.Supports(adIndex) And oRecSet.Supports(adSeek) Then
oRecSet.Index = "PrimaryKey"
oRecSet.Seek Array(strID), adSeekFirstEQ
If oRecSet.EOF Then
Debug.Print "Phone not found.", , "Seek Example"
MsgBox "Phone not found."
End If
End If

When I click on my Find command button, I get an error. The error is as follow: "Method or data memeber is not found."
Please tell me what am I doing wrong?

Thanks for all of your help!!!
MA
Next
Reply
Map
View

Click here to load this message in the networking platform