473,503 Members | 4,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web Service update record method

10 New Member
Hi,
Im trying to logically figure out how to update a record in a database through a web service to the database I have created this web method function but im stuck on completing this

the database record to update is ...
- User Table
- ID
- ForeName
- SurName
- Pin Number


I am writing a method to update the pin number

I have done it like this so far...
Expand|Select|Wrap|Line Numbers
  1. <WebMethod()> _
  2.     Public Function Change_Pin_Number_Nurse(ByVal id As Integer, ByVal pin As String) As Boolean
  3.  
  4.  
  5. Dim b As Boolean // boolean to return if webmethod is successfull in operation
  6.         Dim ds As UserTableAdapters.NurseTableAdapter // the table adadpter from the dataset i want to use
  7.         Dim myds As Data.DataTable// the data table to update
  8.         Try
  9.             ds = New UserTableAdapters.NurseTableAdapter
  10.             myds = ds.Get_Nurses_by_ID(id)  // the row to update
  11.             ds.Update(myds)// returns the record 
  12.                                // enter the pin number and keep the other data as they are
  13.             b = True
  14.         Catch ex As Exception
  15.             b = False
  16.         End Try
  17.         Return b
  18.     End Function
  19.  
I hope someone could please help me Please

Thanks

Kunal
Apr 2 '09 #1
1 1693
Kunal101
10 New Member
never mind i sorted it myself thanks anyway

Kunal
Apr 4 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1497
by: Fritz Bosch | last post by:
We are in the process of refactoring our GUI-based test application for radio equipment and are rewriting a significant part in Python. The new architecture will substantially be based on the...
3
15400
by: Mihaly | last post by:
I want to update a record into a table in SQL Server 2000 database from C#. This table is used concurently for other users too, and I want to be sure that from the read of record to the update no...
5
2575
by: joeblast | last post by:
I have a Web service that gets the financial periods and hold a reference to a disconnected dataset built at initialization. Web methods work on the dataset inside the web service. Everything is...
9
3193
by: zMisc | last post by:
When I try to update record, I kept getting this error: Row cannot be located for updating. Some values may have been changed since it was last read. No other users are accessing the database...
2
75011
by: DaveN | last post by:
Hi all, I'm trying to update a record in a table with data from text boxes on a form. As a background to this, I managed to add a new record to the table in a similar manner with the following:...
7
2628
by: David P. Donahue | last post by:
My experience with databases using C# has been pretty limited thus far. Mostly I just use a SELECT statement to populate a DataSet, which is just read-only (mostly for display on a web page), or...
0
2186
by: Emanuele | last post by:
I have write a program using MS Visual studio C++ 7.0 (platform Windows XP professional). I'm not using .NET. This program save data in a SQL server 2000 database using ADO. Everything works...
6
595
by: Chris Marsh | last post by:
All I have a database table, changes to the data within which I am interested in acting on. The approach that I'm taking is to have the database update a file every time data is updated. This...
1
5403
by: Max2006 | last post by:
Hi, I am truing to find a pattern for my Business Logic Layer to be able to work fine win ObjectDataSource's Update method. The challenge is ObjectDataSource is not able to work with an...
0
7070
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5566
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.