Subject | Visual Basic - ADO - Select From blah Where blah = blah1 SQL Statements |
---|---|
Author | dkoder2 |
Post date | 2007-03-09T20:26:40Z |
I'm using Firebird 2.0 and Firebird ODBC. I have searched the web and
the ODBC forum to try and figure out why SQL statments with 'Where'
clause does not work. If anyone could point me in the right direction
I would be most greateful.
The SQL statment is a follows:
SQL = "SELECT * FROM USERS WHERE USERNAME='" & userName & "'"
rs.Open SQL, cnBase, adOpenDynamic, adLockOptimistic
The SQL statement resolves to:
SELECT * FROM USERS WHERE USERNAME='dkoder2'"
If I copy the select statement to IBAccess's SQL Window it works but
it will not work in my VB code. If I change the SQL to:
SQL = "SELECT * FROM USERS"
rs.Open SQL, cnBase, adOpenDynamic, adLockOptimistic
It works as expected in code. When I add the WERE clause I get an
error stating "ODBC Driver does not support the requested properties".
If I remove the adOpenDynamic, adLockOptimistic options no errors are
reported but the SQL result in EOF/BOF. Without the EOF/BOF trap the
reulting error is:
[ODBC Firebird Driver][Firebird]CHARACTER SET ISO8859_1 is not installed
Evidently I'm missing something...
TIA
the ODBC forum to try and figure out why SQL statments with 'Where'
clause does not work. If anyone could point me in the right direction
I would be most greateful.
The SQL statment is a follows:
SQL = "SELECT * FROM USERS WHERE USERNAME='" & userName & "'"
rs.Open SQL, cnBase, adOpenDynamic, adLockOptimistic
The SQL statement resolves to:
SELECT * FROM USERS WHERE USERNAME='dkoder2'"
If I copy the select statement to IBAccess's SQL Window it works but
it will not work in my VB code. If I change the SQL to:
SQL = "SELECT * FROM USERS"
rs.Open SQL, cnBase, adOpenDynamic, adLockOptimistic
It works as expected in code. When I add the WERE clause I get an
error stating "ODBC Driver does not support the requested properties".
If I remove the adOpenDynamic, adLockOptimistic options no errors are
reported but the SQL result in EOF/BOF. Without the EOF/BOF trap the
reulting error is:
[ODBC Firebird Driver][Firebird]CHARACTER SET ISO8859_1 is not installed
Evidently I'm missing something...
TIA