0

I have created a Windows Forms desktop application using Visual Studio 2019. I also created a database using SQL Server Management Studio. I connected the database with my application with connection string

"Data Source=CYBERCELL\\SQLEXPRESS;Initial Catalog=Details;Integrated Security=True;"

The application is running without any error. I published this application and installed in another computer. But I can't understand how to use and connect the database with the application in that system. Iam looking to install SQL Server in every computer.

5
  • 1
    Are you installing SQL Server on the new computer? Or trying to access SQL Server via the network? Commented Dec 29, 2021 at 6:07
  • 2
    I have the same question as Dale; are you going to install SQLServer on every computer that you install the app on and each app on each computer uses its own local database... or are you wanting it to be that one computer on the network will have the database on it and all the other computers the app is installed on will use that one central database? Commented Dec 29, 2021 at 6:12
  • Am installing SQL Server on every computer. Commented Dec 29, 2021 at 7:55
  • Is CYBERCELL the name of the server you are going to use? Can all machines access it (probably not if it's not on the same LAN)? Has it been configured for remote access? Commented Dec 29, 2021 at 12:11
  • I think answer is on your another question Commented Jan 8, 2022 at 14:24

1 Answer 1

0

1- Each computer has a different data source, so in the first step, you must correct the data source of the new computer in the connection string.

2- In the second step, it is necessary to mention this point, when you install SQL Server, be sure to set the connection type on both authentications, otherwise the value Integrated Security = True; will not work properly.

3- In the last step, you must create the database that you created in your system in the new system, which you can do by backup and restoring.

for set authentication , see this link : https://www.dundas.com/support/learning/documentation/installation/how-to-enable-sql-server-authentication

Sign up to request clarification or add additional context in comments.

2 Comments

How can i give common connection string to work all system
You can design a program in which the connection information to the database is entered by the user and then the information is created in the Windows registry file, and then you can read the connection string information from the registry file. I think the following links can help you: link also this link about same issue : link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.