Im getting the following error when running the code below;
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll
VB Code:
Private Sub btnMbrListImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMbrListImport.Click Dim DSMbrList As System.Data.DataSet Dim MyCommand As System.Data.OleDb.OleDbDataAdapter Dim MyConnection As System.Data.OleDb.OleDbConnection MyConnection = New System.Data.OleDb.OleDbConnection( _ "provider = Microsoft.Jet.OLEDB.4.0; " & _ "data source = " & txtMbrList.Text & ";" & _ "userid=Admin;Password=") MyCommand = New System.Data.OleDb.OleDbDataAdapter( _ "select individual_id, member_nbr, participation_type" & _ "from db2inst1_membershipparticipant", MyConnection) DSMbrList = New System.Data.DataSet MyCommand.Fill(DSMbrList) 'This is the line that the error highlights MyConnection.Close() End Sub
I'm sure I'm just missing something easy.
Thanks,
Brad




Reply With Quote