View Full Version : ODBC Failed


aziz rasul
05-07-2008, 03:54 AM
I have a colleague is having the following problem. She has an initial pass thru query. She now wants to run a second pass thru query using the first pass thru query. Here's the SQL code and the error message she's getting:

SELECT stgeorge.STG_outpatient_appointment.InternalNo, stgeorge.STG_outpatient_appointment.Clinic, stgeorge.STG_outpatient_appointment.EpisodeNo, stgeorge.STG_outpatient_appointment.OrderOfAttend, stgeorge.STG_outpatient_appointment.OrderOfAppoint , stgeorge.STG_outpatient_appointment.Disposal, stgeorge.STG_outpatient_appointment.ApptDate, stgeorge.STG_outpatient_appointment.AttendStat, stgeorge.STG_outpatient_appointment.ClinicSpecialt y, stgeorge.STG_outpatient_appointment.PrimaryProc, stgeorge.STG_outpatient_appointment.ContractId
FROM stgeorge.a01_q, stgeorge.STG_outpatient_appointment
WHERE stgeorge.a01_q.InternalNo = stgeorge.STG_outpatient_appointment.InternalNo
AND stgeorge.a01_q.EpisodeNo = stgeorge.STG_outpatient_appointment.EpisodelNo

ODBC call failed.
[SYBASE][ODBC Sybase driver][SQL Server]stgeorge.a01_q not found. Specify owner.objectname or use sp_help to check whether the object exists ...

Any ideas anyone?

namliam
05-07-2008, 04:00 AM
The pass thru query only excists in the Access DB, not in the SQL server.

You can use the original pass thru query but only inside access AND it will be teribly slow.
My advice: Re-write the second query to work without the actual first one.

aziz rasul
05-07-2008, 07:46 AM
Thanks for that. I think that's the best way forward. The db normally sits on a slow server. I have asked my colleague to place a copy of the db on her local machine and create an MS Access query which will, insha-allah run faster.

namliam
05-07-2008, 08:02 AM
If your local machine is faster than a server.... that is either one busy server or... one hell of a desktop.

aziz rasul
05-07-2008, 08:04 AM
It's the former rather than the latter.

namliam
05-07-2008, 08:08 AM
Copying over a lot of data is going to take a lot of time as well... and cause bloating of the DB.

So maybe it is better to run it on the server as well, unless you are making some user interface where time really matters.