Link to home
Start Free TrialLog in
Avatar of pcornel2k
pcornel2k

asked on

case-sensitive substring search in visual basic 6 on an access database

I conect to the database with an AdoDB.Connection object
I use AdoDB.command and AdoDb.recordset to execute my queries and to retrieve the results.
I need to search a given text into a field from a table and i need this search to be case-sensitive:

My code looks like this:

cmnd = "select DISTINCT(lege.lege_id),lege_tip.presc,Repub_den.Denumire,lege.numar,lege.data,lege_emit.nume,lege.mo,lege.data_mo from lege,lege_emit,lege_tip,Repub_Den,lege_texte where lege.tip_id=lege_tip.tip_id and lege.emitent_id=lege_emit.emitent_id and repub_den.Repub=lege.Repub and lege_texte.lege_id=lege.lege_id and lege_texte.header LIKE " & "'%" & str & "%'"

Adodc1.recordsource=cmnd
adodc1.refresh

'Where Adodc1 is an Ado Data Control

So the question is how do i find a substring in a filed in case-sensitive way in this conditions?
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial