views:

24

answers:

2

We have our sql database on a server (remote) . I have various clients at different location who have windows application (exe ) installed on their pc.How do we connect to the server .Should I go for change in connection string contaning ip address or ceate webservices for accessing database.Please provide me your suggestion as this is going to be software related to account.

+2  A: 

I would personally rather deliver the data using web services, rather than have client applications connecting to the database.

Sohnee
+1 - this is more complicated to set up but is much more secure. Using the connection string means a user can run their own queries as though they were the application.
ck
I absolutely agree
Siblja
A: 

If you have SQL Server Browser installed in the server machine, then you can connect to the database by using the server instance name in the connection string, otherwise you need to provide the appropriate server IP address and databse engine port; but in any case, using a SQL Server client library and an appropriate connection string is enough: you don't need a web service if you are using windows desktop applications only.

That said, using a webservice has some advantages, such as security (you don't have to worry about clients misusing the database if you provide just read-only methods), abstraction (you can completely change the database in the future while keeping the webservice methods' public interface) and extensibility (other clients that do not support direct database access, such as Silverlight clients, can be developed in the future without changing the server code).

Konamiman