ODBC Call Failed error

B

Bryan

I have an SQL Pass through query to an Oracle datrabase.

I can see live data with the query but when I use it in a subform, it
displays the data for a couple of seconds then gives an error:

ODBC -- Call Failed.
[Microsoft][ODBC Driver Manger] Function Sequence error (#0)

The fields then display #NAME? in the subform.

The sub form is not related to the main form - there is no Master/Child Link.

My SQL is fairly simple - I'm just getting one row of data from one table:

SELECT DBIS_PROD.STUDENT.* FROM DBIS_PROD.STUDENT WHERE
DBIS_PROD.STUDENT.StuID='999999999' and DBIS_PROD.STUDENT.INSTITUTION_ID=401

The ID is changed before the form is opened by rewritting the sql -
CurrentDb.QueryDefs("Students").sql= newSQL.

Any ideas as to why this error is occuring and how to make it work correctly?
I don't see why it would display the data for a few seconds then give the
error.


I could completely change everything to make the main form based on the
Oracle data, but that would require a lot of other changes.

Grabbing the data and putting it on an unbound form is another option but
the users want to see live data.

Any help is figuring this out is appreciated.

Bryan..
 
J

Jeff Boyce

Bryan

You don't mention which version of Access...

Any chance there's a Timer event and code that runs on that form or subform?

Is there a business need/reason why you show that information in a subform
rather than in an unbound textbox on your main form?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
B

Bryan

Sorry, Jeff -

I'm using Access 2003.

There are no timer events, just a few unbound fields that are populated with
data from global variables that are calculated before the form is open. I
still get the error without these Form Open events.

I don't think the users need see live data but they believe so. The data
can be updated by other users in other locations that would affect our users
process. They liked the idea of seeing updates from the other data from
other SQL databases.

I don't see why it would work with queries to other databases but not with
the Oracle pass-thru query when it's in a sub-form. If I just use the form
as a stand-alone, it works.


Bryan..



Jeff Boyce said:
Bryan

You don't mention which version of Access...

Any chance there's a Timer event and code that runs on that form or subform?

Is there a business need/reason why you show that information in a subform
rather than in an unbound textbox on your main form?

Regards

Jeff Boyce
Microsoft Office/Access MVP


Bryan said:
I have an SQL Pass through query to an Oracle datrabase.

I can see live data with the query but when I use it in a subform, it
displays the data for a couple of seconds then gives an error:

ODBC -- Call Failed.
[Microsoft][ODBC Driver Manger] Function Sequence error (#0)

The fields then display #NAME? in the subform.

The sub form is not related to the main form - there is no Master/Child
Link.

My SQL is fairly simple - I'm just getting one row of data from one table:

SELECT DBIS_PROD.STUDENT.* FROM DBIS_PROD.STUDENT WHERE
DBIS_PROD.STUDENT.StuID='999999999' and
DBIS_PROD.STUDENT.INSTITUTION_ID=401

The ID is changed before the form is opened by rewritting the sql -
CurrentDb.QueryDefs("Students").sql= newSQL.

Any ideas as to why this error is occuring and how to make it work
correctly?
I don't see why it would display the data for a few seconds then give the
error.


I could completely change everything to make the main form based on the
Oracle data, but that would require a lot of other changes.

Grabbing the data and putting it on an unbound form is another option but
the users want to see live data.

Any help is figuring this out is appreciated.

Bryan..
 
J

Jeff Boyce

Bryan

I've not run across this before. Perhaps one of the other newsgroup readers
can offer some insight...

Good luck

Regards

Jeff Boyce
Microsoft Office/Access MVP


Bryan said:
Sorry, Jeff -

I'm using Access 2003.

There are no timer events, just a few unbound fields that are populated
with
data from global variables that are calculated before the form is open. I
still get the error without these Form Open events.

I don't think the users need see live data but they believe so. The data
can be updated by other users in other locations that would affect our
users
process. They liked the idea of seeing updates from the other data from
other SQL databases.

I don't see why it would work with queries to other databases but not with
the Oracle pass-thru query when it's in a sub-form. If I just use the
form
as a stand-alone, it works.


Bryan..



Jeff Boyce said:
Bryan

You don't mention which version of Access...

Any chance there's a Timer event and code that runs on that form or
subform?

Is there a business need/reason why you show that information in a
subform
rather than in an unbound textbox on your main form?

Regards

Jeff Boyce
Microsoft Office/Access MVP


Bryan said:
I have an SQL Pass through query to an Oracle datrabase.

I can see live data with the query but when I use it in a subform, it
displays the data for a couple of seconds then gives an error:

ODBC -- Call Failed.
[Microsoft][ODBC Driver Manger] Function Sequence error (#0)

The fields then display #NAME? in the subform.

The sub form is not related to the main form - there is no Master/Child
Link.

My SQL is fairly simple - I'm just getting one row of data from one
table:

SELECT DBIS_PROD.STUDENT.* FROM DBIS_PROD.STUDENT WHERE
DBIS_PROD.STUDENT.StuID='999999999' and
DBIS_PROD.STUDENT.INSTITUTION_ID=401

The ID is changed before the form is opened by rewritting the sql -
CurrentDb.QueryDefs("Students").sql= newSQL.

Any ideas as to why this error is occuring and how to make it work
correctly?
I don't see why it would display the data for a few seconds then give
the
error.


I could completely change everything to make the main form based on the
Oracle data, but that would require a lot of other changes.

Grabbing the data and putting it on an unbound form is another option
but
the users want to see live data.

Any help is figuring this out is appreciated.

Bryan..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top