473,462 Members | 1,350 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1477
smartchap
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
@smartchap
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
debasisdas
8,127 Expert 4TB
then how are you going to synch the database ?
Jun 12 '09 #4
smartchap
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

21
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...
2
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...
2
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...
1
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...
10
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...
1
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...
0
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...
0
MMcCarthy
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:...
1
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...
1
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...
1
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...
0
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.