I'm making a C# application that uses a local database created with SQL Server
But when I create the database I used a connection to the local database with a file path on my local hard disk, and when I install the program on my computer it works correctly, because it is connected to the same database on my hard disk.
But when I publish my application and install it on a different computer it can't connect to the database because the connection in the C# code uses the same file path in my computer.
So now I create another database in C:\Program Files\Application Folder
and make a connection in C# code with the same database. When I install the application on another computer how can I make a copy of database with the tables, because when I make a copy on the database it doesn't contain the tables.
Please help if you can.
I think you can connect the database in the local network. And if you want to copy the database, you can attach your database file in the SQL server in the computer that you want to apply.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments