简体   繁体   中英

How could my application on client communicate database on server

I am working on windows forms application using c#.net. i have developed an application(3-tier) that uses sql database as backend. i need to deploy the database on server and my app. on client machine. but how could my application communicate with database on server. please guide me.

you need a connection string that works fine during development. On your development machine if the application is connecting fine to the database server, chances are that on your client machine, it would work as well. Sometimes, the problem occurs with the credentials that you use, that might work on the development machine but on the client it wont connect due to the lack of access rights. so you need to make sure that you give proper credentials to connect to the SQL server

You don't need to do any rocket science for this. All you need to do is on the client side use the proper connection string that can connect to a remotely installed SQL Server.

Use EntityFramework for your sql server connection for updating, inserting and deleting. Use storedprocedures for the insert/update/delete functions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM