Results 1 to 4 of 4

Thread: help! case sensitive.

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2000
    Posts
    44

    Angry

    Hello
    When use SQL query agaisnt access DB it is NOT case sensitive for me.

    example, lets say i have this record on the DB:

    Name: Amir
    Last Name: Gershman
    Age: 27

    Now i use this query against this table:

    SELECT *
    FROM Table_Name
    WHERE Name = amIR

    This WILL return me this record . i dont want this to come back,
    I want it to be case sensitive.

    How can i do it? please help .

    btw - how is it working with sql server? what is the default? anything else i need to know?

    Thanks ALOT.

    Namo.


  2. #2
    Addicted Member
    Join Date
    Sep 2000
    Posts
    138
    Would you like to try this? But make sure of the result before you put it into actual use.

    Code
    -----------------------------------------------------------
    Option Compare Binary
    .
    .
    .
    Set yourRecordSet = yourDatabase.OpenRecordset(¡°Select * From Table_Name Where Name = ¡®Amir¡¯;¡±, dbOpenDynaset)

    With yourRecordSet
    .MoveFirst
    Do
    If StrComp(!Name,¡±Amir¡±) <>0 Then .Delete
    .MoveNext
    Loop Until .EOF
    End With
    .
    .
    .
    -----------------------------------------------------------
    Visual Basic Professional 6.0

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2000
    Posts
    44

    Question

    What?
    I dont understand what u mean..
    Can u explain?

  4. #4
    Addicted Member
    Join Date
    Sep 2000
    Posts
    138
    I mean you can select all the Amirs, aMirs, amIRs... and then delete all that are not exactly Amir (With Option Compare Binary, the StrComp function is case sensitive). Isn't the rest what you want?
    But don't update your recordset, or your table will be destroyed.
    ____________________________________________________________
    Visual Basic Professional 6.0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width