LIKE does not working with VB-Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

SELECT Ctmid , CtmName , CtmAddress1 , CtyCityName , StmStateName , CtmPhNo1
, CtmWebsite FROM (StateMst RIGHT JOIN (CityMst RIGHT JOIN CustomerMst ON
CityMst.CtyCityId = CustomerMst.CtmCityId) ON StateMst.StmStateId =
CustomerMst.CtmStateId) RIGHT JOIN CustomerContact ON CustomerMst.CtmId =
CustomerContact.CcmCompanyId WHERE 1 = 1
AND CtmName LIKE 'r*'

when i run this query thru Access query , records are retrieving , but if i
run this thru VB (Jet 4.0 provider) no records are retriving , if i remove
the like condition records are retrieving....so the problem is with LIKE and
*

Plz help soon.
my client is waiting for it....

Renjith
 
Try using % as the wildcard instead of *.

There are differences, depending on what you are connecting to, what library
you are using, and (in Access) the setting under:
Tools | Options | Tables/Queries | SQL Server compatible syntax
 
Hi

im using Microsoft.Jet.OLEDB.4.0,
but in access i cant find the option u specified
im using Access 2000

Renjith
 
Back
Top