I have created several command text with several command type to insert into a SQL Database. These command call 13 different Module SQL connection strings from a VB code form. Question: Is there a certain number of command and connections strings I'm allowed to use with this set up? yes or No
Here is the Error I get:
ExecuteNonQuery requires an open and available connection. The connection's current state is closed.
Public con13 As New SqlConnection("Data Source = localhost\GECACSQL; Initial Catalog = Housingtwoyrsbck; Integrated Security= True")
Public cmd13 As New Data.SqlClient.SqlCommand
cmd13.Connection = con
cmd13.CommandType = System.Data.CommandType.Text
cmd13.CommandText = " insert into ClientCounPLn values ('" & txthmSS.Text & "','" & txthmFn.Text & "','" & txthmLN.Text & "','" & cmbHomEvic.SelectedItem & "')"