Geeks With Blogs
Phil Sando

Here is the code you need to start adding parameters to your sql commands:

Add parameter then add value:

Dim cmd As SqlCommand = New SqlCommand(s,c)
cmd.Parameters.Add("@id", SqlDbType.Int)
cmd.Parameters("@id").Value = foo

or

Add parameter with value:

command.Parameters.AddWithValue("@id", foo)

Posted on Wednesday, January 27, 2010 8:21 AM | Back to top


Comments on this post: Working with SqlCommand Parameters

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © PhilSando | Powered by: GeeksWithBlogs.net