Generating a query for Microsoft Access Database
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   parag_dharmadhikari
Posted On:   Monday, December 17, 2001 03:49 AM

HI all, I want to generate a query for MS Access.I have to build it using MSAccess wild char "*". my query statement is query="select * from "+table+" where "+colarr.elementAt(0)+" like '"+valarr.elementAt(0)+"*"+"' "; where all variables are decleared properly. here my problem is there is no syntax or runtime error but after firing the query I can not get the output as resultset is zero though data is present. Without wild char. it works fine. can anybody pls help me regards parag    More>>

HI all,


I want to generate a query for MS Access.I have to build it using MSAccess wild char "*".


my query statement is


query="select * from "+table+" where "+colarr.elementAt(0)+" like '"+valarr.elementAt(0)+"*"+"' ";
where all variables are decleared properly. here my problem is there is no syntax or runtime error but after firing the query I can not get the output as resultset is zero though data is present. Without wild char. it works fine.


can anybody pls help me



regards
parag

   <<Less

Re: Generating a query for Microsoft Access Database

Posted By:   Sajith_Kumar  
Posted On:   Friday, January 4, 2002 06:11 AM

INSTEAD OF * use %

ie your query should be
select * from table where column like 'abc%'
About | Sitemap | Contact