473,786 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1456
On Apr 23, 9:30*am, Christian <christian.per. ..@gmail.comwro te:
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.ODB C
namespace.

ODBCConnection to connect.

ODBCCommand to access data.

ODBCDataReader to retrieve the data.
Jun 27 '08 #2
On 23 Apr, 15:41, za...@construct ion-imaging.com wrote:
On Apr 23, 9:30*am, Christian <christian.per. ..@gmail.comwro te:
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.ODB C
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.comwro te:
On 23 Apr, 15:41, za...@construct ion-imaging.com wrote:


On Apr 23, 9:30*am, Christian <christian.per. ..@gmail.comwro te:
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.ODB C
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.comwro te:
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...@construct ion-imaging.com wrote:
On Apr 23, 9:30*am, Christian <christian.per. ..@gmail.comwro te:
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.ODB C
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
2998
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 we've got is that our way to include some files in other ones is no more working properly. The message we are getting looks like: "PHP Warning: main(..\db.inc.php): failed to open stream: No such file or directory in ..."
6
1909
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 function' error when calling a routine that's defined in that file.
10
3158
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"); mysql_select_db("$db"); //-------------------------------------------------------------------------- -------------
2
3015
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 this: #include "pathname/file"
6
2926
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 would be /Valuation/ValuationSelect.xslt which is also used on the client side via JavaScript and MSXML2.FreeThreadedDOMDocument.4.0. Client side the include and transformation without any problems but it is when I am trying to do the...
5
4067
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 differnt location - a different site altogether? I've Googled different variations of "how to insert an URL using #include" but all of the sites that came up never got beyond "file=" and "virtual=". There may be no more to it that that, but I'm not
14
2343
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 successfully included a piece of VBS code that produces output in a table cell by using: <!--#include file="showAnswers.inc" -->
2
1506
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 in VB 2005 ASP? or has another solution on how to use separeate file to include comman varible vaule like session varible? Thanks, Ma
18
2163
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 - once from a relative path, and once from an absolute one - you see that the second inclusion indeed occurs (enters the file and leaves immediately due to the include guard). Why does this happen (I have my speculations, but I want some...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.