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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC.. call failed on parameter, but works in criteria field

Status
Not open for further replies.

TheKval

Technical User
Nov 16, 2003
2
US
Hopefully somebody can show me the errors of my ways!! I'm using Access 2000 linkd to Macola data files using Pervasive 2000 database manager.

The records I'm trying to pull have a 3-character text field named Ship_Via_Cd. If I enter a value in the criteria field on the query form, i.e., D, or DM, or D*, etc., the query pulls all the records just fine. But, as soon as I enter a parameter in the criteria field, ala, [enter ship via code], and then enter D, or DM, etc in the input box, I get the dreaded "ODBC... call faied" error message.

I've tried to Trim, Rtrim, the table record. I've tried to use an input mask of ### for the parameter. I've tried to StrComp([Ship_Via_Cd],[Enter ship via code],0) (or 1 or -1) without any luck.

It's driving me crazy... it shouldn't be that difficult to figure out!

Anybody got any hints?
 
I don't know if this will make much of any difference, but might as well try it.

Go to the control panel, administrative tools, odbc. Then make sure that there is a connection to the data source set there.

That might help so that when a parameter asks the datasource, it is asking an established source that has been set up to be trusted.

Let us know if this is way off, lol.

misscrf

It is never too late to become what you could have been ~ George Eliot
 
I've set up the DNS in ODBC.. that's how you get to the database. The problem is that while I can set up a parameter in the criteria field for a numeric data type, the 3 character text field errors out if I try to use a parameter. I can enter the text in the criteria box (including a wild card) and execute the query. But if I change it to a parameter and enter the same information in the input box, it errors out... strange!
 
Have you defined the parameter as text ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top