I am trying to use ODBC (Imports System.Data.odbc) to access data from a Microsoft Access database. I am able to use the following code in VB.Net for a Windows Application but when I debug the code in my Windows Mobile Application it cannot recognize ‘Imports Sestem.Data.odbc,’ ‘OdbcConnection,’ ‘OdbcDataReader’ or ‘OdbcCommand.’ How do I get the import to work? Is there another method I can use? Please help, thanks.
******************************************
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
“Driver={Microsoft Access Driver (*.mdb)};” & _
“Dbq=C:\Test.mdb;” & _
“Pwd=Password”
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()
Dim odr As OdbcDataReader
Dim cmd As New OdbcCommand()
cmd.Connection = oODBCConnection
cmd.CommandText = “SELECT * FROM Log”
odr = cmd.ExecuteReader()
odr.Read()
MsgBox(odr(“LogID”).ToString())