Read from MSAccess linked table
- From: "Gerard" <gerard-van-dorth@xxxxxxxxxx>
- Date: Fri, 23 Sep 2005 09:57:03 +0100
Hi,
Trying to read data from MsAccess, everything OK except accessing a linked
table, then an error occurs: "ODBC--connection to 'myDb' failed". Here is
the code that fails:
________________
Dim connectStr As String = "C:\myDb.mdb"
myConnection = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Mode=Read;Data Source=" &
connectStr)
Dim cmd As OleDbCommand
Dim rd As OleDbDataReader
Dim query As string = "SELECT ID FROM linkedTable"
cmd = New OleDb.OleDbCommand(query, myConnection)
cmd.Connection.Open()
rd = cmd.ExecuteReader(CommandBehavior.Default) 'FAILS...
_______________________________
Any idea how to read from linked tables?
TIA,
Gerard
.
- Follow-Ups:
- Re: Read from MSAccess linked table
- From: Mary Chipman [MSFT]
- Re: Read from MSAccess linked table
- Prev by Date: Connection string to MDF
- Next by Date: Re: Connection string to MDF
- Previous by thread: Connection string to MDF
- Next by thread: Re: Read from MSAccess linked table
- Index(es):
Relevant Pages
|