Sending data to a web database from Windows forms application

S

steve

Hi All

I need to learn how to update a SQl server or Access database located on a
web server from my windows forms application, via the internet

I have a customer who wants to run several windows forms applications in
different shop locations but all have to update a Web based database with
products sold etc

Is Web services the way to go? or are there better options

Any links to code examples appreciated

Regards
Steve
 
G

Guest

Is Web services the way to go? or are there better options

Web services would be ideal for this sort of thing.

Remoting may work too ... if you need access to .NET data types/
 
S

Steven Cheng[MSFT]

Hello Steve,

As you mentioned that the application communcation is over internet, so the
database server should be be directly accessible via other remote
clients(due to security and network restriction). I also think that
webservice should be a reasonable approach as it is designed for loose
coupled distributed environment.

Using webservice, the most important thing is defining class types that
will be transfered over internet(over webservice http protocol). Normally,
for data accessing application, you need to define class types that
represent those database table, record and fields. The .net dataset is a
built-in data component class that can be transferred over XML
serialization based protocol. You can also define your custom class that
can be corretly serialized as XML and transfer over http.

For example, you can directly transfer the data base query/update command
to server-side for execution or transfer DataSet (or custom class
collection and command objects) to server-side and let the server-side
webmethod do the actucal data accessing to backend database:

#How To Update Server Data Through a Web Service by Using ADO.NET and
Visual C# .NET
http://support.microsoft.com/kb/310143/en-us

#Querying and Updating a Database Using Web Services in InfoPath and ASP.NET
http://msdn2.microsoft.com/en-us/library/aa192516(office.11).aspx

#Toward a Generic Data Access WebService
http://www.eggheadcafe.com/articles/20031106.asp

For more information about webservice, you can visit the MSDN websevice dev
center:

#Web Services and Other Distributed Technologies
http://msdn2.microsoft.com/en-us/webservices/default.aspx

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top