Some possibilities:

> $statement = odbc_prepare( $connection, "select * from System where A=?" );

Probably you would be better off using single quotes in the condition,
since you are tryng to match strings, like:

$statement=odbc_prepare($connection,"select * from System where A='?'");
                                                             here-^ ^

Also, I'm not sure that wildcards are allowed for string matching
unless you use "like":

$statement = odbc_prepare( $connection, "select * from System where A
like '?'" );

Inside access, wildcards are * and ?, but when invoked through ODBC, *
turns to %, and I think ? turns to _, but I'm not sure. Try the manual
on that.

And last, to eliminate possibilities, enclose any table or field names
that might by far chance be a reserved word, in sqare brackets. I
don't think that "A" is a reserved word, and am not sure about
"System", but just to make sure... and end your statement with a
semicolon. The final result would be:

$statement = odbc_prepare( $connection, "select * from [System] where
[A] like '?';" );

That, for syntax. But going further, "?" (or "_") is the single
character matching wildcard. Why would your comparison use only a
single character? If "A" is a single char field, use "like '%'", it
would be safer and probably faster. But, there might be the chance
that you're NOT trying to do a wildcard comparison, but are trying to
search for the literal "?". Then you would use your actual syntax, but
adding a backslash to escape the special char: "[A]='\?'".

Some wild shots... hope it works.
Gonzalo.



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to