Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
can i make location free conntection to msaccess database
Posted 11-Jan-13 20:46pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can't - to connect to a database (of any type) you must identify the DB and / or the DB engine you wish to use.
For Access files directly, you have to specify which file you wish to connect to. For SQL you specify which SQL Sever instance you want, then connect to the DB by name - the service instance is a "location" in that sense.
  Permalink  
Comments
Muhamad Faizan Khan at 12-Jan-13 2:52am
   
i am facing problem publishing my app.
OriginalGriff at 12-Jan-13 3:07am
   
Sorry, I don't understand from that little what your problem is.
Remember that we can't see your screen, access your HDD, or read your mind.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

If this is a publishing problem concerning your application, include the database files in your project and set their properties so that the files are copied (but not compiled) into the output directory.
 
This way the initial database is always in the same directory where the executable is and if published for example using ClickOnce, you can include the database in the publication.
 
If this is a multi user situation (concerning the database), then I'd suggest creating a separate setup process to set up the database portion centrally and the applications would be installed separately.
  Permalink  

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

  Print Answers RSS
0 Gihan Liyanage 332
1 Sergey Alexandrovich Kryukov 250
2 ClimerChinna 222
3 vikinghunter 188
4 OriginalGriff 161
0 Sergey Alexandrovich Kryukov 8,373
1 OriginalGriff 7,112
2 CPallini 2,598
3 Richard MacCutchan 2,025
4 Abhinav S 1,788


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 12 Jan 2013
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