PDA

Click to See Complete Forum and Search --> : SQL & option compare binary : NOT.....


Sep 13th, 2000, 07:01 AM
Hoi folks,

I'm developing my first program in VB. I have setup a
database with Access 7.0 and added records to several
tables with my program. SQL-querie "SELECT ..." returns
more info than i supposed to get, example : word and WORD
are both selected : upper- and lowercase is not taken
into effect. I included the 'OPTION COMPARE BINARY'
statement in every module and form.

Is there anything more to declare / set ?

JHausmann
Sep 13th, 2000, 11:58 AM
It is possible in SQL server (granted, that's of little help to you) to declare the server case sensitive (it defaults to case insensitive). The option you're setting affects how VB compares data, not how Jet finds/returns it. I cannot find a way to do it in Access 97, I'm not sure that you can.

Sep 14th, 2000, 09:09 AM
Hoi John and whoever reads this :

A case sensitive query can be performed in the following way ( found at Microsoft ) :

Dim searchme as string

searchme = "SeArChStRiNg"

SELECT Fieldname1,Fieldname2 From Table1 WHERE
StrComp ([Fieldname1],"searchme",0) = 0