p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: Re: Searching using wildcards


Message #1 by "Sandra" <salau@p...> on Fri, 28 Jun 2002 18:26:05
> I am trying to search a data base in access using vb,...i want to be 
able 
t> o enter for example "ne*" and return all results that match in a list 
b> ox. Does anyone know the coding for that?

Assumption: connection set through objConn, recordset through objRS,
            condition entered in through form. 

objRS.Open "select field1, field2 from table1, where field3 LIKE '%" & 
conditionVariable & " %'", objConn.

% is your wildcard. 
ne% - return all results starting with ne.
%ne - return all results ending with ne.
%ne% - ne is somewhere in your word.

HTH, 
Sandra  
Message #2 by "Jamaal Sabdul" <jamfl_1999@y...> on Fri, 28 Jun 2002 12:20:33
I am trying to search a data base in access using vb,...i want to be able 
to enter for example "ne*" and return all results that match in a list 
box. Does anyone know the coding for that?

  Return to Index