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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing a Pervasive db from VB thru ADO

Status
Not open for further replies.

jbrowne

Programmer
Feb 1, 2000
182
IE
Hi,

I am accessing a Pervasive database from VB6 using ADO(2.5).
I would like to ask the following question. This one relates to the SEEK method. The system issues a run time error '-2147467259 (80004005) when we perform a seek after setting the primary index on a file. This only happens every second time we perform the SEEK and only when the value we are seeking doesn't exist on the file. Any help would be greatly appreciated.

John B
 
If Seek doesn't find the value, it will position the current record pointer at the end of the file. You may need to reposition the Index before executing Seek the next time.
 
Hi atosh,
Firstly, I am using Pervasive's OLEDB provider (Version 1). When I don't get a hit, the file's eof property is still false (not true) as you and all help that I've read, suggest that it should be. This is most frustrating as it makes checking for a hit rather difficult as there is no nomatch property in ADO.
Now, you say that I need to reposition the index after a seek that does not get a hit, how exactly do I reposition the index ??

Thanks for your help in advance,
John B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top