|
-
Feb 3rd, 2008, 03:37 AM
#1
Thread Starter
Frenzied Member
[2008] using VB variables in SQL statements
I want to use VB variables in SQL code...
Dim varCount As Integer = 3
Dim sqlCmd As New SqlCommand("SELECT test FROM MyTable WHERE id = {varCount}")
The sql syntax may be wrong, because I typed this by hand, but I want to know how I can use varCount in my SQL statement...
Can anyone help me?
Thanks
Last edited by Icyculyr; Feb 3rd, 2008 at 03:54 AM.
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
|