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!

Pervasive.SQL and VB

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Code:
Dim cnGold As adodb.Connection
Dim rsAR As adodb.Recordset
        
Set cnGold = New adodb.Connection
Set rsAR = New adodb.Recordset
    
With cnGold
 .ConnectionString = "Provider=PervasiveOLEDB;Data Source=manordatabase"
 .CursorLocation = adUseServer
 .Mode = adModeReadWrite
 .Open
End With
sql = "select * from staff"
rsAR.Open sql, cnGold, adOpenDynamic, adLockPessimistic

i get an error on the last line as
Run time error -'2147217865(80040e37)';
Table does not exist.
but if i try to execute it as
rsAR.Open "staff", cnGold, adOpenDynamic, adLockPessimistic
i have no problems.
Please help

 
Make sure you are using the latest version of the PervasiveOLEDB. Older versions (SP2a) did not support SQL statements.
mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
The easiest way is to look at the version of the W3ODBCCI.DLL, W3ODBCEI.DLL, W3DBSMGR.EXE, or W3DADBV2.DLL. The versions break down like this:
7.50 - Original release of Pervasive.SQL 2000
7.51 - Service Pack 1
7.82 - Service Pack 2a
7.90 - Service Pack 3
7.94 - Service Pack 4
mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top