Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: VB.NET
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
Sergey Alexandrovich Kryukov at 17-Dec-12 0:44am
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 at 17-Dec-12 0:05am
Is there ant other way??This doesnt work.
Sergey Alexandrovich Kryukov at 17-Dec-12 0:32am
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 at 17-Dec-12 0:53am
Sergey Alexandrovich Kryukov at 17-Dec-12 1:06am
You are welcome.
Ashok19r91d at 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.
Sergey Alexandrovich Kryukov at 17-Dec-12 0:44am
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
0 Sergey Alexandrovich Kryukov 643
1 OriginalGriff 550
2 CPallini 415
3 George Jonsson 231
4 ChauhanAjay 150
0 OriginalGriff 5,450
1 CPallini 4,500
2 Sergey Alexandrovich Kryukov 4,032
3 George Jonsson 3,057
4 Gihan Liyanage 2,445

Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 16 Dec 2012
Copyright © CodeProject, 1999-2014
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