The following query returns the all designs with the word Christmas in it
when executed in Access but returns no records when executed in VB 6.0
Select * from PI where DesignName Like '*Christmas*'
Could someone help point me in the right direction please.
I'm executing with the following code:
Set dbCN = New ADODB.Connection
strAd = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
dbPath & ";Persist Security Info=False"
dbCN.ConnectionString = strAd
dbCN.Open
Set rsDetail = New ADODB.Recordset
strseq = "Select * from PI where DesignName Like '*Christmas*'"
rsDetail.Open strSeq, dbCN, adOpenKeyset, adLockOptimistic, adCmdStoredProc
Al Reid - 28 Jun 2005 15:26 GMT
> The following query returns the all designs with the word Christmas in it
> when executed in Access but returns no records when executed in VB 6.0
[quoted text clipped - 16 lines]
>
> rsDetail.Open strSeq, dbCN, adOpenKeyset, adLockOptimistic, adCmdStoredProc
When executing a query via ADO, it uses the ANSI SQL standard wild cards. Thus, replace the '*' with '%'.
--
Al Reid