Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editing a Record
Message
From
18/03/2005 00:48:03
 
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Editing a Record
Miscellaneous
Thread ID:
00997113
Message ID:
00997113
Views:
46
Hi Amigos!

I am trying to update a record with the following code:

Dim UsersUpdateCmd As New SqlClient.SqlCommand
UsersUpdateCmd.Connection = cn
UsersUpdateCmd.CommandType = CommandType.StoredProcedure
UsersUpdateCmd.CommandText = "UpdateUser"

UsersUpdateCmd.Parameters.Add("@UserID", SqlDbType.VarChar, 10, "UserID")
UsersUpdateCmd.Parameters.Add("@UserName", SqlDbType.VarChar, 20, "UserName")
UsersUpdateCmd.Parameters.Add("@Password", SqlDbType.VarChar, 20, "Password")

daUsers.UpdateCommand = UsersUpdateCmd

Dim EditRow As Data.DataRow = dtUsers.Rows(dtUsers.Rows.Count - 1)

EditRow.BeginEdit()

When any of the following lines are executed, I get an error message saying that they are ReadOnly.

EditRow("UserID") = "005"
EditRow("UserName") = "Odie"
EditRow("Password") = "456"

Any ideas as to why this is so? I've been at this since yesterday. Please HELP!!!

By the way, I have similar routines for adding and deleting records and I do not have any problems. It is only when I try to modify a record that I encounter problems.

Desparately yours,

Martin
Shit happens!!!
Next
Reply
Map
View

Click here to load this message in the networking platform