Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Use the Seek Method on Linked Tables 2

Status
Not open for further replies.

easycode

Programmer
Jan 28, 2005
195
US
Hi, All
I am trying to use the seek method on a linked tables, but is not working and gives me this weird message:
"Current provider does not support the necessary interface for index functionality"
The database worked fine before, i use the database splitter utility.
Here is the code


Function validatelogin(localuserid As String, floginpas) As Boolean
Dim rst As ADODB.Recordset

Set rst = New ADODB.Recordset
rst.CursorLocation = adUseServer

rst.Open "users", CurrentProject.Connection, adOpenKeyset, adLockPessimistic, adCmdTableDirect
rst.Index = "PrimaryKey"
rst.Seek localuserid, adSeekFirstEQ

Troubleshooting the procedure i got the error message in the last line of the instructions above.

Any help would be appreciated.
thanks
 
Hi!

I don't think you can use the seek method with linked tables because Access will open them as dynasets and not tables. You need to use the FindFirst method.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Thanks for replying,

I just finish coding a few days ago, it took me more than 6 months to build the software and changing all the seek instructions to a find it's gonna take me a while, do you guys thing is there any other way to solve this problem?.

Otherwise i thing i might have to avoid doing the split and just use one database as front-back-end.

Thanks again
 
It's either
- .Find
- "unsplit"
- or...

[tt] Dim rst As ADODB.Recordset
dim cn as adodb.connection
set cn = new adodb.connection
cn.open <string from the link>

Set rst = New ADODB.Recordset
rst.CursorLocation = adUseServer
rst.Open "users", cn, adOpenKeyset, adLockPessimistic, adCmdTableDirect

rst.Index = "PrimaryKey"
rst.Seek localuserid, adSeekFirstEQ[/tt]

as far as I know...

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top