R
rbs
Guest
Hi,
I am getting the following error message with my script...
Fill: SelectCommand.Connectin property has not been initialized.
Can someone please help.
Private Sub UpdateDataset()
'(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim strConnectionString
Dim Query As String
Dim conn As New System.Data.Odbc.OdbcConnection
Dim odbcWageSurvey As New System.Data.Odbc.OdbcDataAdapter
OdbcWageSurvey.SelectCommand.Parameters("State_Id").Value = StateIndex.Text
OdbcWageSurvey.SelectCommand.Parameters("Date_Id").Value = DateIndex.Text
WageSurvey1.Clear()
odbcWageSurvey.SelectCommand = New System.Data.Odbc.OdbcCommand(Query, conn)
OdbcWageSurvey.Fill(WageSurvey1)
End Sub
Thanks,
Natalie.
I am getting the following error message with my script...
Fill: SelectCommand.Connectin property has not been initialized.
Can someone please help.
Private Sub UpdateDataset()
'(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim strConnectionString
Dim Query As String
Dim conn As New System.Data.Odbc.OdbcConnection
Dim odbcWageSurvey As New System.Data.Odbc.OdbcDataAdapter
OdbcWageSurvey.SelectCommand.Parameters("State_Id").Value = StateIndex.Text
OdbcWageSurvey.SelectCommand.Parameters("Date_Id").Value = DateIndex.Text
WageSurvey1.Clear()
odbcWageSurvey.SelectCommand = New System.Data.Odbc.OdbcCommand(Query, conn)
OdbcWageSurvey.Fill(WageSurvey1)
End Sub
Thanks,
Natalie.