Syntax Error while SELECTing Data From Sybase

Hello,

We are trying to query data from some tables in Sybase (System 11) running on Solaris.

Our client application consists of SqlDBX, running on Windows Vista, that connects to the Sybase server through ODBC.

The following query returns data:
  SELECT * FROM SYSOBJECTS WHERE 1=1

but the following query
  SELECT * FROM SYSOBJECTS

fails with this error:
    DIAG [42000] [INTERSOLV][ODBC SQL Server driver][SQL Server]Incorrect syntax    
    near 'FROMsysobjectss'. (102)

Note that in the error message, there is no space between "FROM" and "sysobjects", and there is an extra "s" at the end of "sysobjects".

The above is just an example of the odd behavior we have observed.  For other tables, behavior of the query depends on the content of the WHERE clause.

Thanks for your help.

Med
merimohAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ee_autoConnect With a Mentor Commented:
Question PAQ'd, 500 points refunded, and stored in the solution database.
0
 
LowfatspreadCommented:
do you have a problem with

select * from sysobjects;


?

does the problem persist if you STOP ABD START THE CONNECTION?

what has changed recently?
0
 
Joe WoodhousePrincipal ConsultantCommented:
What is the exact version of your ODBC driver? I know Sybase System 11 (now that's going back a bit Released in 1996!) was called "SQL Server" back then, but I want to make sure you're using the right one... and not, say, an ODBC driver for MS SQL Server instead.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
merimohAuthor Commented:
The ODBC driver version is 3.01.0000 (Date 08/12/1997).  On our client machine, we tried to use a new DataDirect driver but we could not get it to work (in the sense that sqlDBX just freezes when we open a session with a DSN created with the DataDirect driver).  It does not help that we do not have access to the server (machine) that hosts Sybase.

We started working on this only last week but the server has been running (with other apps) from several years now.  Therefore, what is happening is not due to a recent (inadvertant) config change.

One more data point we found today:
 --> The query "SELECT * FROM SYSOBJECTS" works fine from isql.  But this same query does not work from sqlDBX whether we end it with semi-colon or not.

I read somewhere that ODBC for System 11 and earlier is built on top of Open Client.  So the above proves that isql, which is at the Open Client level, works fine, but the ODBC layer is probably the one generating this error.

Thanks!
Med


0
 
Joe WoodhousePrincipal ConsultantCommented:
I agree it looks like ODBC is what's giving you the problem, since isql doesn't use it. And yes, the early versions of ODBC had to sit on top of Open Client.

All I can suggest is trying to find other (very old) ODBC drivers, and also trying any other ODBC client tool with your current driver - maybe sqlDBX is the problem here?
0
 
merimohAuthor Commented:
We tried to find a different ODBC driver that would work with this (old) version of the DB but could locate any.

However, one thing we found out is that Sybase acts only as an "interface" to another vendor-specific datastore.  I mean, what might be used here is this:
   
http://www.sybase.com/detail?id=1001338:
A Specialty Data Store allows Adaptive Server clients to access external data as if it were stored locally in the Adaptive Server. A Specialty Data Store is an Open Server application designed to interface with the Adaptive Server

No way to verify though.

Med
0
All Courses

From novice to tech pro — start learning today.