query ODBC call failed when using a parameter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is a bit strange but works fine with access tables
but NOT with ODBC. When I create a query using a hard
coded value for selection (i.e. = "486-66") my query
returns all data. If I try to use a parameter to be
inputted (i.e. [imputvalue] I get an ODBC error - call
failed. When I use the same approach with an access table
it returns whatever value I pass. On my ODBC it does not
seem to work. I even tried to use native SQL commands in
VBA and can't get it to work. Is it my ODBC setup? is it
an incompatibility with Pervasive SQL? if it works with
access tables why can't another table work when you can
get all recrds or select those with a hardcoded value but
not with an inputted value via a parameter entry? Help! I
can't go further until I get this resolved.
 
Maybe not your case, but....

I have seen "hard-coded" work,
but then not work with parameter
because the first "critical-mass" of
the field that were read did not give
proper clue to Access what type the
parameter should be treated as...

Simple test...implicitly declare type
of the parameter and see if works.

If still no work, post SQL back here,
plus type of field that parameter is being
run against.

Good luck,

Gary Walter
 
Back
Top