473,372 Members | 1,352 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,372 software developers and data experts.

I want to run a program, while I have the files of it in 2 folders.

Hello everyone and good morning from Greece.
I need some help, PLEASE.

I made a program that needs a database file (.mdb) to open, if the database file is outside the program folder, creates an error and stoped running.

I dont want to have the database file in the program folder.

Is there any way to create another program, which i will give to it the path from my exe and the path from the database file to connect them some how and run the program?

Thank you
Jun 12 '09 #1
5 1473
236 100+
May be u r using App.Path in your program. If yes, replace it with the full path of the folder containing database file.
Jun 12 '09 #2
Thank you smartchap for your answer, but the reason that i want to make another program to connect them is that my program will run in a difrent os and the database file will be in difrent path from one pc to another.
Jun 12 '09 #3
8,127 Expert 4TB
then how are you going to synch the database ?
Jun 12 '09 #4
236 100+
I think you must develop Client-Server type application for this.
Jun 13 '09 #5
daniel aristidou
491 256MB
why don't u simply use a filedialog for the user to select the database on first use of the program (easily done in new versions of vb. im not sure about older versions) , you can then store this in a text file which is located in the applications folder, or in the registry. Then on start-up make you program retrieve the path of the database to use in your application.
Also it sounds like you are looking for a solution that does not mean rewriting the application, From newer versions of vb, i think (im not 100% sure) the database connection string is stored in a settings file or the registry. (Try querying the registry to see if u can find the connection string in which case you can edit it. )

I think this Article will be of some use
Jun 13 '09 #6

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

Similar topics

by: Roy Riddex | last post by:
Hi I'm wanting to create a cd-rom which boots automatically when it's inserted into the computer. What I hope to achieve is for a VB6 program to run automatically when the cd boots up. Can this...
by: Jon Maz | last post by:
Hi All, I'm in a possibly unusual situation, that is working alternately on an ASP.NET web site from two dev computers, one of which has VS.Net installed on it, the other of which does not. As...
by: D Wright | last post by:
It would suffice to state, I am very new to the .NET world, as well as to Visual Studio, Visual C#, and ASP.NET. Nonetheless, I'm certain the solution to several challenges I've presented myself...
by: noleander | last post by:
Hello. Ive got a VC++ program. Inside the program Ive got some code that has a full file path: C:\aa\bb\cc\dd\file.txt One of the folders in that path (cc) is a shortcut pointing to some...
by: Dan | last post by:
Hi - I'm about a week into learning VB.NET, and I'm finding I can't delete any of the VB.NET directory structures that contain my test projects I've been trying to create. I've never seen this...
by: Military Smurf | last post by:
Okay, so I have some code that can do a recursive search to get the raw number of files and folders. No big. As a user, I can right click on any parent folder, get the properites, and then on...
by: bendavid | last post by:
Hello, I work on WinXP SP1. with VB6 - MS-Access(VisData). I created a setup.exe using Package and Deployment Wizard for VB 6. But when the program is installed all the files are installed to...
by: MMcCarthy | last post by:
This is a module that scans for files and folders on a specified path and describe them in comma separated values file in a text format. The information is stored in this file consecutively like:...
by: semedao | last post by:
Hi all, I'm looking for some example , open source etc code that implement caching of files and folders with those requirments: 1. like every file system , I can write , read , delete etc files...
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
Using .NET 2.0 is it more efficient to copy files to a single folder versus spreading them across multiple folders. For instance if we have 100,000 files to be copied, Do we copy all of them to...
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...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.