|
James K
Flowing Fount of Yak Knowledge
1481 Posts |
Posted - 02/13/2013 : 11:26:17
|
| You need to set the connection property of the command object to an instance of the SqlConnection object. Alternatively, you can use a different constructor of the SqlCommand object that takes a connection string property (which will then construct the connection object for you). That connection object describes how to connect to your server. Take a look here for an example - what you want is the SqlClient example: http://msdn.microsoft.com/en-us/library/dw70f090.aspx |
 |
|