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
- <WebMethod()> _
- Public Function Change_Pin_Number_Nurse(ByVal id As Integer, ByVal pin As String) As Boolean
- Dim b As Boolean // boolean to return if webmethod is successfull in operation
- Dim ds As UserTableAdapters.NurseTableAdapter // the table adadpter from the dataset i want to use
- Dim myds As Data.DataTable// the data table to update
- Try
- ds = New UserTableAdapters.NurseTableAdapter
- myds = ds.Get_Nurses_by_ID(id) // the row to update
- ds.Update(myds)// returns the record
- // enter the pin number and keep the other data as they are
- b = True
- Catch ex As Exception
- b = False
- End Try
- Return b
- End Function
Thanks
Kunal