471,326 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,326 software developers and data experts.

Include MDB file in Solution

Hi, i include an Access Db in the solution of my project; now how can
i connect to DB?
Jun 27 '08 #1
5 1358
On Apr 23, 9:30*am, Christian <christian.per...@gmail.comwrote:
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.
Jun 27 '08 #2
On 23 Apr, 15:41, za...@construction-imaging.com wrote:
On Apr 23, 9:30*am, Christian <christian.per...@gmail.comwrote:
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.


ah ok!
but what is the different between include MDB and not include(for
example store it in c:\)?
Jun 27 '08 #3
On Apr 23, 9:45*am, Christian <christian.per...@gmail.comwrote:
On 23 Apr, 15:41, za...@construction-imaging.com wrote:


On Apr 23, 9:30*am, Christian <christian.per...@gmail.comwrote:
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.

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.
Jun 27 '08 #4
On Apr 23, 9:30*am, Christian <christian.per...@gmail.comwrote:
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.
Jun 27 '08 #5
On Apr 23, 9:41*am, za...@construction-imaging.com wrote:
On Apr 23, 9:30*am, Christian <christian.per...@gmail.comwrote:
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.
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
Jun 27 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Yannick Turgeon | last post: by
10 posts views Thread by EnjoyNews | last post: by
6 posts views Thread by Gideon de Swardt | last post: by
5 posts views Thread by Viken Karaguesian | last post: by
2 posts views Thread by martin1 | last post: by
18 posts views Thread by gutmant | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.