CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: db question

  1. #1
    Join Date
    Jul 2001
    Posts
    430

    db question

    Oracle db

    I want to check if the first character of the field, 'Name' is "L". I got problem with 'Like'. Besides 'Like', is there anything else I can use for this purpose?

    ***********
    cnn1.Open "Driver={Microsoft ODBC Driver For Oracle};UID=PO8;PWD=PO8;"

    rs.Open "select Name from test WHERE name Like 'L*'", cnn1

    **************

    Something wrong with the 'Like' operator. it returns 'eof' when the field, Name has the value of 'Linda'.

    Something wrong with my syntax?

    Thanks



  2. #2
    Join Date
    Jul 2001
    Location
    Trivandrum, Kerala, India
    Posts
    21

    Re: db question


    Hai,

    The wild card charactor supported by oracle is '%'. So your second line should be

    rs.Open "select Name from test WHERE name Like 'L%'", cnn1




    All the best and regards

    Kishore





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

Featured