Click here to Skip to main content
13,197,271 members (49,935 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I use ODBC data source to connect application to MS ACCESS database.When I have to install it in my clients PC,I have to manually make ODBC connection
from(Control Panel ->Administrative Tools->Data source(ODBC)).
Now what I want to do is,include odbc connection string in code itself so that I dont have to manually create odbc connection in clients PC.Is it possible to do so??
If no,then is there any other alternative?
Thanks in advance.
Posted 16-Dec-12 17:40pm
Why ODBC?!

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Basically, you can use ADO.NET with System.Data.Odbc. This is a minimal introductory tutorial:[^].

Rachna0309 17-Dec-12 0:05am
Is there ant other way??This doesnt work.
Is there a different attitude? Yours does not work. You need to do the effort to make things work. This is a right way, and it works.
Rachna0309 17-Dec-12 0:53am
You are welcome.
Ashok19r91d 17-Dec-12 0:42am
Use OleDb method to work with .Net and Access, OleDb Not require any DSN so you can just distribute Your app with DB and .Net FW.
It depends on the providers a particular database product has, but this is generally a right idea, of course. I just answered on ODBC, but, come to think about, I should have first questioned: why ODBC.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171020.1 | Last Updated 16 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100