Solved

Web Service to update SQL Server table

Posted on 2009-03-29
3
505 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
ID: 24017392
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
ID: 24018399
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
ID: 24018516
Are you looking for SqlCommand.ExecuteNonQuery to insert data?

Example:

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

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
OWA - local directory not showing 5 31
Web Application Architecture 6 77
jax-ws end to end example 2 74
Application.cfc - what is the order of events? 4 29
Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

813 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

15 Experts available now in Live!

Get 1:1 Help Now