Re: VB, Informix and selecting by date woes
Posted in 2000
From: Andrew Pearson <apearson@pt.lu>
>
>Rob Stevens wrote:
> >
> > I want to run a select statement from vb which selects by a date. With
>an
> > access databse I would do (for example):
> >
> > rs.Open "SELECT * From member WHERE l_date_joined = #3/29/2000#", cn
> >
> > but informix dosn't like this and complains bitterly!!!
> >
> > how can I achieve what I'm after? what am I doing wrong?
Using hashes as quotes?
> > I'm using VB6, ADO, Informix client sdk (odbc driver ver 3.31), informix
>se
> > v.7.23 (apparently) and windows 2000.
> >
>
>Have you tried:
>
>SELECT * From member WHERE l_date_joined = "3/29/2000">
>SQL will not like the hash signs, which it takes as comment
>characters. Quoting the date string instead may well fix it. I
>don't know about Visual Basic (am I the only person in the world
>who's never used it?) but in other languages you can get round
No, I also haven't -- sorry.
>the problems of a string containing quotes by using two kinds of
>quotes "SELECT * From member WHERE l_date_joined = '3/29/2000'"
>or by escaping the quotes with a backslash (which is very hard to
>find on a Swiss-german keyboard, but I digress).
Gesundheit!
>Do you have access to the Informix manuals? The SQL manual is on
>line at www.informix.com/answers somewhere.
You don't want to read manuals mate, rots yer brain.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com