R
Roger
I have the following partial class:
Namespace DataSet1TableAdapters
Partial Class QueriesTableAdapter
Public Sub changeConnection(ByVal strConn As String)
Dim conn As New SqlClient.SqlConnection
conn.ConnectionString = strConn
Dim c As New SqlClient.SqlCommand
For Each c In Me.CommandCollection
c.Connection = conn
Next
End Sub
End Class
End Namespace
I have used this code in other windows apps successfully, however in the
current one I get an error with the line
c.Connection = conn
The error is: CommandCollection is not a member of
[Project].DataSet1TableAdapters.QueriesTableAdapter
Any ideas what's wrong??
My dataset is DataSet1.xsd
Namespace DataSet1TableAdapters
Partial Class QueriesTableAdapter
Public Sub changeConnection(ByVal strConn As String)
Dim conn As New SqlClient.SqlConnection
conn.ConnectionString = strConn
Dim c As New SqlClient.SqlCommand
For Each c In Me.CommandCollection
c.Connection = conn
Next
End Sub
End Class
End Namespace
I have used this code in other windows apps successfully, however in the
current one I get an error with the line
c.Connection = conn
The error is: CommandCollection is not a member of
[Project].DataSet1TableAdapters.QueriesTableAdapter
Any ideas what's wrong??
My dataset is DataSet1.xsd