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!

WHy do i get this error

Status
Not open for further replies.

simran1

Programmer
Apr 23, 2002
82
US
Hi,

I have developed a project using VB6 and Sybase. Works fine without any problems.
Now when i deploy this project on the clients server, i have a problem. It throws me an error right when i am trying to open a table.
The error is like this
Run-Time Error '-2147217865 (80040e37)':
[Sybase][OBCD Driver] Table or view not found: Table 'StoreOptions' not found.

I am using 2 databases. I am using one database, reading values from this database and putting it in another table in another database.
Table 'StoreOptions' is supposed to be in the first database. And it is there when i physically check it.
My code looks like this:
Code:
Dim RS As New ADODB.Recordset
Dim SQL As String

bdsn = "Driver=Sybase SQL Anywhere 5.0; " & _
"defaultDir=""c:\Bass\Basspoint\data\db\""; " & _
    "Database=""C:\BASS\Basspoint\data\db\basspoint.db""; " & _
    "Uid=dba;Pwd=sql;"
SQL = "SELECT StoreOptions.GenerationFlag, "
SQL = SQL & " StoreOptions.StoreNum "
SQL = SQL & " FROM DBA.StoreOptions StoreOptions"
SQL = SQL & "  WHERE (StoreOptions.GenerationFlag='C')"

RS.CursorLocation = adUseClient
RS.Open SQL, bdsn, adOpenDynamic, adLockOptimistic

I get error on the last line. What is it?
 
Um, maybe pointing out the obvious here (or have I missed something important) but the database you are connecting to is a local one. Have you checked the database on the client server? You will need to physically check it yourself, not rely on what the client's are telling you!
 
hi,

Yes i have checked the database on the client server myself physically.
 
Have you checked ownership and/or access rights on the table in question. Thanks and Good Luck!

zemp
 
hi,
Yes i have.

I put a adodc control on the form and made it invisible. I set the connectionstring property to point to my database in administrative tools/odbc data source/filedsn. And using
bdsn=adodc.connectionstring
and
RS.Open SQL, bdsn, adOpenDynamic, adLockOptimistic
This works absolutely fine. What is wrong in the way i had defined my bDSN earlier.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top