Click here to Skip to main content
14,713,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use two databases in my application. One for user/password and another for information. I want to link those two databases to my application in a way they can be read from the main directory where EXE file exists, so when I copy my application folder to another computer, the link between my app and databases is kept.
My current connection string is:
sqlcon.ConnectionString = @"Data Source=C:\Users\Dell\Desktop\PMinfo\DataGridView\dbLogin.sdf";

How can I solve this issue?

What I have tried:

sqlcon.ConnectionString = @"Data Source=C:\Users\Dell\Desktop\PMinfo\DataGridView\dbLogin.sdf";
Updated 1hr 20mins ago

1 solution

See here: Where should I store my data?[^] for some better ideas.

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900