472,960 Members | 2,131 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,960 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 1424
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Yannick Turgeon | last post by:
Oups! I did a typing error in my last post. Fixed. ----------- Hello all, We are currently changing our web server and, in the process, updating PHP version from 4.3.0 to 4.3.5. The problem...
6
by: Puzzled | last post by:
This is a weird problem, but perhaps someone else has seen it before (I hope!) If I use a fully qualified include call include ( 'http://localhost/subtree/filename.php') I get an 'undefined...
10
by: EnjoyNews | last post by:
I have a php site I have an include line called "include 'Cookie.php';" In this Cookie.php file I have these codes. <?php $conn = mysql_connect("$db", "$user", "$pass");...
2
by: Susan Baker | last post by:
Hi, I am (trying) to compile some code I downloaded from the internet. The sources contain references to header files - using the form : #include <pathname/file> If I change the form to...
6
by: Gideon de Swardt | last post by:
I am trying to do a server side transformation using an xsl:include in my xslt stylesheet. The include stylesheet is stored /Library/abo.Library.xslt and is included in multiple xslts, one example...
5
by: Viken Karaguesian | last post by:
Hello all, I've used the SSI Include command successfully in the past to include frequently used files that are based within my own site. However, what if I was to use a file located in a...
14
by: Julesh | last post by:
Hello, I am new to ASP and am trying to make some changes to some ASP 3.0 code I have inherited. I have a number of ASP pages with VBS as the base language, on each of these pages I have...
2
by: martin1 | last post by:
Hi, All, I used to use include file (filename.inc) in asp to incude common varibles' value and DB connection, I tried to use same include file but failed, so anyone knows how to use include file...
18
by: gutmant | last post by:
Say you have a file, a.h with an include guard. If you include it twice and look at the preprocessed output, you see there's no sign for the second inclusion. However, if you include it twice -...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.