473,320 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

database path to be added in the coding

I am using MS Access and vb.net, Now I have included ms access into the application.when I did my coding I did by

Expand|Select|Wrap|Line Numbers
  1. cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\emp.mdb;_
  2.   PersistSecurityInfo=False")
  3.  
  4.  
but when I need to deploy it in client system I cant know in which drive they are going to put that? so how could I change it?

Thanks in advance
Raghul
Jan 16 '09 #1
2 1152
lotus18
866 512MB
@raghulvarma
Your access database resides in C:\ drive so you should deploy it also in that directory.

If you to make it more dynamic, see this related article


Rey Sean
Jan 17 '09 #2
truezplaya
115 100+
You could look in to putting the connection info into an xml file. This will allow you to specify a genral path. So when the program is installed you just put the XML file in to the location you stated within your program.

This also helps if the location of the DB changes or the name.
Jan 20 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Shabam | last post by:
I have an application that lets users upload pictures. These pictures are stored in different folders depending on the user ID (of the user that it belongs to). The path can be figured out...
3
by: Sam | last post by:
I have developed a small database which is setup with the front end and backend files. There are 12 linked tables withe the datafile located on our server. Now the boss wants to be able to...
6
by: Sandy | last post by:
Hello - I have a book that illustrates pulling menu items from a Sql Server table into an ascx via a stored procedure. Is this something that is done in the real world? I do like the effect...
13
by: Adam | last post by:
Trying to get an asp.net 2.0 app running and am receiving this error. I see a bunch of people with this error on the net, but no solution: Works fine on my local machine, deployed to a server it...
3
by: route_coder | last post by:
I am using access database to create a crystal report in VB.NET Everything works fine when I run on my machine. But when I am deploying it other windows machines. It is asking for database server...
1
by: leen | last post by:
helo..i'm az...from kuala lumpur...i would like to ask a question about access...i have doing a project based on access...i have done it successfully but now the problem is size of the file...the...
0
by: leen85 | last post by:
helo everybody...i'm lina...i need your help...i have a problem in VB and Access...i have 38000 images for my company employee which size about 5GB to stored in database...as we know we cant stored...
11
by: =?Utf-8?B?c2NodXJzdDMw?= | last post by:
Hi, I am currently trying to get back into ASP and have begun looking at an old webpage I developed some years ago, it was fully functional back in 2002 and I had it up and running with no...
2
by: Shrividya | last post by:
Hello, How to set Database Path(Access) for Crystal Report XI by coding in VB. I am setting the path during Crystal Report Design but if i install the software on client's PC the path is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.