repkin05

repkin05

  • NA
  • 10
  • 0

Error "Update requires a valid InsertCommand"

May 18 2004 8:59 AM
I have dataRow as named dRow; I have dataSet as named dSet; I have dataAdapter as named adapter; I have set like that dRow = dSet.Tables[0].NewRow(); then I have set dRow like dRow["colName"] = "value"; and then I have wrote that dSet.Tables[0] .Rows.Add( dRow ); at last I write that adapter.Update( dSet , "tableName" ); But it gives tihs error "Update requires a valid InsertCommand when passed DataRow collection with new rows." But I have insert only one row. Why it gives this error and how can I fix it?

Answers (2)