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:
Hi,
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";
Posted
Updated 1hr 20mins ago
v3

1 solution

Don't.
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
亚洲日韩欧美国产专区_一本二本三本道不卡日本_在线不卡日本v二区三区18