Include MDB file in Solution

  • Thread starter Thread starter Christian
  • Start date Start date
C

Christian

Hi, i include an Access Db in the solution of my project; now how can
i connect to DB?
 
Hi, i include an Access Db in the solution of my project; now how can
i connect to DB?

You don't need to include the MDB in your solution to be able to
access it.

You need to make use of several class objects in the System.Data.ODBC
namespace.

ODBCConnection to connect.

ODBCCommand to access data.

ODBCDataReader to retrieve the data.
 
You don't need to include the MDB in your solution to be able to
access it.

You need to make use of several class objects in the System.Data.ODBC
namespace.

ODBCConnection to connect.

ODBCCommand to access data.

ODBCDataReader to retrieve the data.



ah ok!
but what is the different between include MDB and not include(for
example store it in c:\)?
 
ah ok!
but what is the different between include MDB and not include(for
example store it in c:\)?

There is no real reason, as far as I am aware, to include an MDB with
the VS solution, other than maybe distributing it with the app.

The connection string used by the ODBCConnection object includes a
full path to the MDB file, so it can essentially be anywhere you want
it to be.
 
Hi, i include an Access Db in the solution of my project; now how can
i connect to DB?

All you need to know is where you placed it. After that you access it
the same way you do in your program.
 
You don't need to include the MDB in your solution to be able to
access it.

Yes you do, otherwise the application will not have a DB to connect
to :)
You need to make use of several class objects in the System.Data.ODBC
namespace.

Mdb is access, IIRC you can use OleDb provider with it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top