wildcard "*"

wildcard "*"

Post by Egbert Hulsma » Thu, 27 Jun 2002 05:55:59



Why is the recordset empty after using a wildcard "*"  ????????

Public sub command1_click()
Adodc1.RecordSource = "Select * from Lid where Achternaam like '" &
txtZoek.Text & "*' "
Adodc1.Refresh
.
.
.
.
End Sub

 
 
 

wildcard "*"

Post by Patrick Loga » Thu, 27 Jun 2002 06:03:53


Try the ANSI SQL wildcard of '%'

HTH
--
Patrick Logan, MCSD
Opinions expressed are my own and not necessarily those of my employer.


Quote:> Why is the recordset empty after using a wildcard "*"  ????????

> Public sub command1_click()
> Adodc1.RecordSource = "Select * from Lid where Achternaam like '" &
> txtZoek.Text & "*' "
> Adodc1.Refresh
> .
> .
> .
> .
> End Sub


 
 
 

wildcard "*"

Post by Diane Shart » Thu, 27 Jun 2002 06:45:25


If you are connected to Access you can use the "*" as a wildcard in your
criteria. If you are using Oracle you must use the "%" in the criteria
expression. If you are not used to using anything other than Access you can
also get problems if you try to specify dates in a query so be careful.


Quote:> Why is the recordset empty after using a wildcard "*"  ????????

> Public sub command1_click()
> Adodc1.RecordSource = "Select * from Lid where Achternaam like '" &
> txtZoek.Text & "*' "
> Adodc1.Refresh
> .
> .
> .
> .
> End Sub

 
 
 

wildcard "*"

Post by Val Mazu » Thu, 27 Jun 2002 21:36:42


Hi,

I think you are using OLEDB JET provider. In case of Jet 3.51 you need to
use *, but in case of Jet 4.0 default is % wildcard instead of *.

--
Val Mazur
Microsoft MVP


Quote:> Why is the recordset empty after using a wildcard "*"  ????????

> Public sub command1_click()
> Adodc1.RecordSource = "Select * from Lid where Achternaam like '" &
> txtZoek.Text & "*' "
> Adodc1.Refresh
> .
> .
> .
> .
> End Sub