Showing posts with label fail. Show all posts
Showing posts with label fail. Show all posts

Tuesday, March 27, 2012

Error during sqlDataSource.Update() instruction

Hi, I have such a problem:

I try to update (or insert) a row in my table and i fail althought i,ve read many posts here. I.ve created a button and "on_click" event to this button and want that event to update or insert a record in my table. I wrote:

protected void selectButton_Click(object sender, EventArgs e)
{
String taskID = projectsGridView.SelectedRow.Cells[0].Text;
usersSqlDataSource.UpdateCommand = "update [Users] set [TaskID]=@.task where [UserID]=1";
usersSqlDataSource.UpdateParameters.Add("task", taskID);
usersSqlDataSource.Update();
}

The application creates error in the last line of code (usersSqlDataSource.Update();) and i receive such an error:

You have specified that your update command compares all values on SqlDataSource 'usersSqlDataSource', but the dictionary passed in for oldValues is empty.
Pass in a valid dictionary for update or change your mode to OverwriteChanges.
 
For me it looks like there is a problem while setting parameters. Shall i change some properties of the sqlDataSource or GridView? Please help.. 
 


Not seeing the code for your SqlDataSource, it's hard to tell. However, I suspect that you need to change the SqlDataSource.ConflictDetection property to OverwriteChanges instead of CompareAllValues.

|||

Yes!! It works!!!

The beginnings are difficult, thank you very much ;)

Friday, February 17, 2012

Error at parameter 93 during datastream processing of parameterize

Has anyone seen this error before? It ulimately causes replication to fail.
The error message is:
Error at parameter 93 during datastream processing of parameterized command.
Keino Jason
SQL DBA/Developer
Never seen or heard of this error before. Are you using the same service
pack/hotfix level on each of the servers involved in this replication setup?
If so, and it is >=sp3, can you give some more details on the setup you
have - replication type, which agent fails, at what stage does it fail, what
is the complete error message etc.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)