Geeks With Blogs

@philsando
  • philsando Why am I dealing with returning sqldatareader bugs in the enterprise framework 5 DAAB? Cant MS fix this shit b4 release http://bit.ly/cxSVWo about 1097 days ago
  • philsando Working on some DAL stuff across many MSSQL and Oracle DB Servers ... Joy :0) about 1139 days ago
  • philsando got hit off my motorbike by a car and just had to take a 12km walk to work.. the joy about 1159 days ago
  • philsando is trying to find a way to loop through dynamically created web controls, inputting their values into an mssql database #dotnet #in about 1190 days ago
  • philsando is trying to find a way to loop through dynamically created web controls, inputting their values into an mssql database #dotnet about 1190 days ago

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 | Join free