I
id
Hi
I am using .NET framework 1.0. I am having problems with the following
VB.NET code:
----
..
..
..
..
Dim da As New OleDbDataAdapter(selectQuery, connection)
Dim ds As New DataSet()
Try
da.Fill(ds)
Catch eDB As OleDbException
showException("Database exception while filling dataset.", eDB)
Return Nothing
End Try
..
..
..
-----
The connection object i pass into the OleDbDataAdapter constructor has been
initialised with the connection string:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=x:\projects\TestData
\tracking.mdb;User ID=Admin;Password=;Mode=Share Deny None"
I checked that the data adapter's SelectCommand's connection was set to the
correct connection string using the debugger.
On the line: da.Fill(ds), i get an exception with the message:
"Could not find file 'x:\projects\MyAppName\bin\tracking.mdb'."
Now, obviously this occurs because the database does not exist at this
location. But what I can't understand is why the path it's using to look
for the database is the executable path.
Has anyone seen this issue?
Any help/comments greatly appreciated!
Thanks
id
I am using .NET framework 1.0. I am having problems with the following
VB.NET code:
----
..
..
..
..
Dim da As New OleDbDataAdapter(selectQuery, connection)
Dim ds As New DataSet()
Try
da.Fill(ds)
Catch eDB As OleDbException
showException("Database exception while filling dataset.", eDB)
Return Nothing
End Try
..
..
..
-----
The connection object i pass into the OleDbDataAdapter constructor has been
initialised with the connection string:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=x:\projects\TestData
\tracking.mdb;User ID=Admin;Password=;Mode=Share Deny None"
I checked that the data adapter's SelectCommand's connection was set to the
correct connection string using the debugger.
On the line: da.Fill(ds), i get an exception with the message:
"Could not find file 'x:\projects\MyAppName\bin\tracking.mdb'."
Now, obviously this occurs because the database does not exist at this
location. But what I can't understand is why the path it's using to look
for the database is the executable path.
Has anyone seen this issue?
Any help/comments greatly appreciated!
Thanks
id