Board index » delphi » Problems with LIKE operator

Problems with LIKE operator

Hi,

I am using an ADO connection to run an update query which uses the WHERE
S.Code Like '011%' operator
to specify the records to be updated. The query runs great on SQL Server but
when I connect to an Access 2000 Database using the MS Jet OLEDB 4 provider
the query does not find the records. I am using the "*" wildcard for Access
and the "%" for SQL Server. Neither wildcard works with the Jet OLE 4
provider although it works fine in Access 2000 itself.

Does the Jet Ole 4 provider support the Like operator or am I just doing
something wrong?

thanx, Paul

 

Re:Problems with LIKE operator


Hi Paul,

This issue is just discussed in one of the previous threads (ADO partial
filtering). If you have a look at it you will see that there seems no way to
use the Like operator with Access. The Mid function can be an alternative in
most cases.

Thrse

"Paul Gavin" <pa...@productivesolutions.com.au> a crit dans le message
news: 8d1fde$b__BEGIN_MASK_n#9g02mG7!__...__END_MASK_i?a63jfAD$z__@bornews.borland.com...

Quote
> Hi,

> I am using an ADO connection to run an update query which uses the WHERE
> S.Code Like '011%' operator
> to specify the records to be updated. The query runs great on SQL Server
but
> when I connect to an Access 2000 Database using the MS Jet OLEDB 4
provider
> the query does not find the records. I am using the "*" wildcard for
Access
> and the "%" for SQL Server. Neither wildcard works with the Jet OLE 4
> provider although it works fine in Access 2000 itself.

> Does the Jet Ole 4 provider support the Like operator or am I just doing
> something wrong?

> thanx, Paul

Re:Problems with LIKE operator


In <8d1g4n$e...@bornews.borland.com>, Thrse Hanquet hastily scribbled:

Quote

> This issue is just discussed in one of the previous threads (ADO partial
> filtering). If you have a look at it you will see that there seems no way to
> use the Like operator with Access. The Mid function can be an alternative in
> most cases.

> Thrse

I responded to the same query in microsoft.public.data.ado saying it ought to work :-)

Is this a specific A2000 issue - the LIKE operator certainly works fine in an ADO 2.1 Find method with an Access 97 db.

Roger Morton
roger.mor...@dial.pipex.com

Re:Problems with LIKE operator


Hi Paul and Roger,

I apologise, Like operator does seem to work through Jet 4 with Access 2K if
you use the '%' wildcard. However it does not work with the normal '*'
wildcard. Thus if you open through ADO an existing query in Access 2K wich
includes the Like operator with the '*' wildcard, it does not return any
records even if it "should".

Thrse

"Roger Morton" <roger.mor...@nospamdial.pipex.com> a crit dans le message
news: RA15D510AE@LOFT...

Quote
> In <8d1g4n$e...@bornews.borland.com>, Thrse Hanquet hastily scribbled:

> > This issue is just discussed in one of the previous threads (ADO partial
> > filtering). If you have a look at it you will see that there seems no
way to
> > use the Like operator with Access. The Mid function can be an
alternative in
> > most cases.

> > Thrse

> I responded to the same query in microsoft.public.data.ado saying it ought
to work :-)

> Is this a specific A2000 issue - the LIKE operator certainly works fine in

an ADO 2.1 Find method with an Access 97 db.

- Show quoted text -

Quote

> Roger Morton
> roger.mor...@dial.pipex.com

Re:Problems with LIKE operator


Roger,
Yes, it does work if you use the % wildcard. Knew I was doing something
wrong :-)
thanks for the help

regards, Paul

Quote
"Roger Morton" <roger.mor...@nospamdial.pipex.com> wrote in message

news:RA15D510AE@LOFT...
Quote
> In <8d1g4n$e...@bornews.borland.com>, Thrse Hanquet hastily scribbled:

> > This issue is just discussed in one of the previous threads (ADO partial
> > filtering). If you have a look at it you will see that there seems no
way to
> > use the Like operator with Access. The Mid function can be an
alternative in
> > most cases.

> > Thrse

> I responded to the same query in microsoft.public.data.ado saying it ought
to work :-)

> Is this a specific A2000 issue - the LIKE operator certainly works fine in

an ADO 2.1 Find method with an Access 97 db.

- Show quoted text -

Quote

> Roger Morton
> roger.mor...@dial.pipex.com

Re:Problems with LIKE operator


Hi Thrse ,

Yes, it does work with the % via ADO. Funny it doesn't work with the % in
Access, ADO must convert it somehow.
Thanks for the input.

regards, Paul

Quote
"Thrse Hanquet" <therese.hanq...@skynet.be> wrote in message

news:8d1lnl$f072@bornews.borland.com...
Quote
> Hi Paul and Roger,

> I apologise, Like operator does seem to work through Jet 4 with Access 2K
if
> you use the '%' wildcard. However it does not work with the normal '*'
> wildcard. Thus if you open through ADO an existing query in Access 2K wich
> includes the Like operator with the '*' wildcard, it does not return any
> records even if it "should".

> Thrse

> "Roger Morton" <roger.mor...@nospamdial.pipex.com> a crit dans le message
> news: RA15D510AE@LOFT...
> > In <8d1g4n$e...@bornews.borland.com>, Thrse Hanquet hastily scribbled:

> > > This issue is just discussed in one of the previous threads (ADO
partial
> > > filtering). If you have a look at it you will see that there seems no
> way to
> > > use the Like operator with Access. The Mid function can be an
> alternative in
> > > most cases.

> > > Thrse

> > I responded to the same query in microsoft.public.data.ado saying it
ought
> to work :-)

> > Is this a specific A2000 issue - the LIKE operator certainly works fine
in
> an ADO 2.1 Find method with an Access 97 db.

> > Roger Morton
> > roger.mor...@dial.pipex.com

Other Threads