Subject Re: Re: [firebird-support] Visual Basic - ADO - Select From blah Where blah = bl
Author jmashburn2@bellsouth.net
Thanks for the reply but the results are the same. I only have this problkem when using a Firebird embedded database. The same code works when using either server version. If I use:

SQL = "SELECT * FROM USERS"
rs.Open SQL, cnBase

it works just fine. It's only when I add parameters that it fails.


>
> From: Lin XG <sbdlinxg@...>
> Date: 2007/03/11 Sun AM 12:53:05 EST
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] Visual Basic - ADO - Select From blah Where blah = blah1 SQL Statements
>
>
> Try changing
>
> rs.Open SQL, cnBase, adOpenDynamic, adLockOptimistic
>
> to
>
> rs.Open SQL, cnBase,,, adCmdUnknown
>
>
>
>
> --- dkoder2 <dkoder2@...> wrote:
>
> > 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
> >
> >
>
>
>
>
> ____________________________________________________________________________________
> 8:00? 8:25? 8:40? Find a flick in no time
> with the Yahoo! Search movie showtime shortcut.
> http://tools.search.yahoo.com/shortcuts/#news
>
>