S
Sebastian W.
Hi,
I am still a beginner concerning ADO.net. When I am trying to read
data from a Access-file into a dataset I always fail... :-(
I am using the following code. The DB-Connection (Me.Con) is
established and open. The SQL-Code is correct and the specified table
exists.
Dim DA As New OleDbDataAdapter()
DA.SelectCommand = New OleDbCommand _
("SELECT MID, From, To, Subject FROM gmx", Me.Con)
DA.TableMappings.Add("Table", "gmx")
Dim Tbl As DataTable
Dim NR As DataRow
Dim DS As DataSet
DS = New DataSet("gmx")
DA.Fill(DS)
....
The error "An unhandled exception of type
'System.Data.OleDb.OleDbException' occurred in system.data.dll" occurs
in at the DA.Fill(DS) Command. I can do what I want. I also tried just
to fill a datatable, but I always get the same error.
What am I doing wrong?
Thanks,
Sebastian Walters
I am still a beginner concerning ADO.net. When I am trying to read
data from a Access-file into a dataset I always fail... :-(
I am using the following code. The DB-Connection (Me.Con) is
established and open. The SQL-Code is correct and the specified table
exists.
Dim DA As New OleDbDataAdapter()
DA.SelectCommand = New OleDbCommand _
("SELECT MID, From, To, Subject FROM gmx", Me.Con)
DA.TableMappings.Add("Table", "gmx")
Dim Tbl As DataTable
Dim NR As DataRow
Dim DS As DataSet
DS = New DataSet("gmx")
DA.Fill(DS)
....
The error "An unhandled exception of type
'System.Data.OleDb.OleDbException' occurred in system.data.dll" occurs
in at the DA.Fill(DS) Command. I can do what I want. I also tried just
to fill a datatable, but I always get the same error.
What am I doing wrong?
Thanks,
Sebastian Walters