G
Guest
Hello,
Need help with this:
I am trying to connect to an existing Access Database via ODBC.
My code is like this: It always generates a system error.
What am I doing wrong? Any help much appreciated.
-----------------------------------------------------------
'Code in VB.net
Dim conn As String = InputBox("Conn string?")
Dim sql As String = InputBox("Sql string?")
Dim dt As New DataTable
Dim co As New Odbc.OdbcConnection(conn)
co.Open()
Dim dataadapter As New _
System.Data.Odbc.OdbcDataAdapter(sql, co)
dataadapter.Fill(dt)
dataadapter.Dispose()
Me.DataGrid1.DataSource = d
Need help with this:
I am trying to connect to an existing Access Database via ODBC.
My code is like this: It always generates a system error.
What am I doing wrong? Any help much appreciated.
-----------------------------------------------------------
'Code in VB.net
Dim conn As String = InputBox("Conn string?")
Dim sql As String = InputBox("Sql string?")
Dim dt As New DataTable
Dim co As New Odbc.OdbcConnection(conn)
co.Open()
Dim dataadapter As New _
System.Data.Odbc.OdbcDataAdapter(sql, co)
dataadapter.Fill(dt)
dataadapter.Dispose()
Me.DataGrid1.DataSource = d