Results 1 to 4 of 4

Thread: SQL Satement error

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Posts
    124

    SQL Satement error

    I'm trying to run the following statement

    Cmd = "SELECT * FROM Cabinets WHERE CabinetName = '" & txtServerCabinet.Text & "'"

    DsAll1.Cabinets.Select(Cmd)

    and im getting a missing operand after Cabinets error

    Cabinets is the table, and im searching for the string in txtServerCabinet

    then im trying to display the appropriate item in text boxes

    any idea whats wrong?

    db

  2. #2
    "SELECT * FROM Cabinets WHERE (CabinetName = " & txtServerCabinet.Text & ")"


    Are you trying to create a search box, to search your database for the input text?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Posts
    124
    I'm searching the db for the text located in the txtServerCabinet textbox.

  4. #4
    Is the text being entered into txtServerCabinet limited, or can they enter anything they want? What I want to know is do you want your search to find only EXACT macthes, or any record similar to what they typed in?

    If you're going to want EXACT matches only, you should change to a list/combo box, something that provides what they're options are. If not then you'll want to use a LIKE option with wildcards. If you want the latter, I'll post some code that should help.

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