Quote:
1.I wanna know how to make a connection string to selected old database(that I selected with browse)
Simple SQL Connection String Creation[
^] - use the "Provider" tab to select the Access DB engine and it works for Access DBs as well.
Then you can import that string into your app, and replace the DB path part with the path the user selected.
Quote:
2.how to make query to copy all of its tables and data to my new database(directory database).
**all tables have the same name and columns.
c# copy table from one database to another access - Google Search[
^]
Quote:
is not gonna work cuz he wrote the address "Z:\Docs\first.accdb"
I dont have a address
:sigh:
You replace the path in your example: "Z:\Docs\first.accdb" with a unique marker: "%PATH%" say.
string conPattern =
@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=%PATH%";
You browse.
It returns a path string.
You replace the marker with the string he browsed to.