|
-
Jun 20th, 2003, 12:56 PM
#1
Thread Starter
Lively Member
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
-
Jun 20th, 2003, 02:11 PM
#2
Member
"SELECT * FROM Cabinets WHERE (CabinetName = " & txtServerCabinet.Text & ")"
Are you trying to create a search box, to search your database for the input text?
-
Jun 20th, 2003, 02:14 PM
#3
Thread Starter
Lively Member
I'm searching the db for the text located in the txtServerCabinet textbox.
-
Jun 20th, 2003, 02:20 PM
#4
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|