G
Guest
Hi,
I'm having a little problem with the Find method. It keeps returning no
rows. The code is
oDA.Fill (oDS, "EDI_Files");
object[] aryKeys = new object[1];
DataColumn[] aryKC = new DataColumn[1];
aryKeys[0] = Int32.Parse(Request.QueryString["ID"]);
aryKC[0] = oDS.Tables["EDI_Files"].Columns["ID"];
oDS.Tables["EDI_Files"].PrimaryKey = aryKC;
EditRow = oDS.Tables["EDI_Files"].Rows.Find(aryKeys);
When I run this code, the EditRow is always empty. No matter what I put in
the Find criteria.
HOWEVER if for testing purposes I replace the "EditRow =
oDS.Tables["EDI_Files"].Rows.Find(aryKeys);" with something like "EditRow =
oDS.Tables["EDI_Files"].Rows[0];", EditRow contains the correct row.
Why would the find method seem to choke like this?
By the way, all objects/variables have been declared--i left them out for
brevity.
Thanks for any help
Philip
I'm having a little problem with the Find method. It keeps returning no
rows. The code is
oDA.Fill (oDS, "EDI_Files");
object[] aryKeys = new object[1];
DataColumn[] aryKC = new DataColumn[1];
aryKeys[0] = Int32.Parse(Request.QueryString["ID"]);
aryKC[0] = oDS.Tables["EDI_Files"].Columns["ID"];
oDS.Tables["EDI_Files"].PrimaryKey = aryKC;
EditRow = oDS.Tables["EDI_Files"].Rows.Find(aryKeys);
When I run this code, the EditRow is always empty. No matter what I put in
the Find criteria.
HOWEVER if for testing purposes I replace the "EditRow =
oDS.Tables["EDI_Files"].Rows.Find(aryKeys);" with something like "EditRow =
oDS.Tables["EDI_Files"].Rows[0];", EditRow contains the correct row.
Why would the find method seem to choke like this?
By the way, all objects/variables have been declared--i left them out for
brevity.
Thanks for any help
Philip