Solved

Web Service to update SQL Server table

Posted on 2009-03-29
3
482 Views
Last Modified: 2012-05-06
I've got a web service written in VB.NET that I use to send datasets to an application and receive data back as a dataset after the user has modified the data within the application.  The biggest drawback to this method is that it could be a large dataset and sometimes the people work over a slow connection.  I've been looking for a way to send back and update an SQL table everytime they modify a record.  The code on the application isn't a problem, but I haven't found a good example of a web service that will update the SQL Server.  I only need to update two fields (a date the record was updated and who it was update by).
0
Comment
Question by:TomCoon
  • 2
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
Comment Utility
What kind of "example" are you looking for.  If you are only looking for a way to pass in a primary key value, and any field values, I wouldn't think that would be too difficult.
0
 

Author Comment

by:TomCoon
Comment Utility
Want to pass primary key and two field values to be updated, one a date field (smalldatetime) and the other text (nvarchar(10)).  Passing it back to the web service isn't a problem, but the code to get the web service to update the SQL Server table is what I'm looking for.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
Comment Utility
Are you looking for SqlCommand.ExecuteNonQuery to insert data?

Example:

http://www.startvbdotnet.com/ado/sqlserver1.aspx
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now