|
-
Jun 27th, 2008, 01:54 PM
#8
Re: [02/03] Combobox/Textbox help please
 Originally Posted by onlyGirl
Code:
SELECT CallerID, CallerName, PhoneNumber
FROM Caller
WHERE CustomerID = @CustomerID
cmd.Parameters.AddWithValue ("@CustomerId", textbox1.Text)
Cmd will be the name of your command
Yes, this is another way of doing it. You set the Cmd.CommandText = the SQL string and then add the parameters.
OnlyGirl: Does this automatically put in single quote around the parameter value if they're needed?
 I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
My war with a browser-redirect trojan
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
|