morenoa

morenoa

  • NA
  • 3
  • 0

window forms - finding record error

Feb 25 2004 6:38 PM
Hi evreyone ! While trying to find a record in a dataset by the key with the following code: object[] key = new object[4]; key[0]=x; key[1]=y; key[2]=Q; key[3]=z; DataRow row = dataset1.tablename.Rows.find(key); I got the error message: An unhandled exception of type 'System.ArgumentException' occurred in system.data.dll Additional information: Expecting 2 value(s) for the key being indexed, but received 4 value(s). I don't understand the meening of it because my table in the sqlServerDB has 4 column key. Does someone has a clue ???