G
Guest
I'm fairly new to ado.net, using SQL Server stored procedures, asp.net, and
all that entails, so I'm sure I'm missing something simple and fundamental.
Hopefully you can point it out to me.
Ultimately the problem is I am getting an error: "There is no Original data
to access." when trying to execute the following line:
if (drCur["Contact", DataRowVersion.Original].ToString() != "")
this.sqldaAddSite.UpdateCommand.Parameters["@Original_Contact"].Value =
drCur["Contact", DataRowVersion.Original].ToString();
You ask a lot of questions as to why I'm doing this in the first place that
I'm not sure I can answer and I'm sure down the road I'll find better
methods. Still...
The webform that is having this problem is almost identical in logic to one
that works just fine. One difference I have noticed is that when I execute
these 3 lines:
this.sqldaAddSite.SelectCommand.Parameters["@SiteID"].Value = (string)
Session["SiteID"];
this.sqldaAddSite.Fill(this.dsAddSite1);
drCur = this.dsAddSite1.scs_GetSiteUpdate.Rows[0];
The rowstate of drCur is "Added" while on the webform that works it's
"Unchanged". Both are using store procedures for select commands.
Can anybody give me clues as to what's going on and what to do about it?
all that entails, so I'm sure I'm missing something simple and fundamental.
Hopefully you can point it out to me.
Ultimately the problem is I am getting an error: "There is no Original data
to access." when trying to execute the following line:
if (drCur["Contact", DataRowVersion.Original].ToString() != "")
this.sqldaAddSite.UpdateCommand.Parameters["@Original_Contact"].Value =
drCur["Contact", DataRowVersion.Original].ToString();
You ask a lot of questions as to why I'm doing this in the first place that
I'm not sure I can answer and I'm sure down the road I'll find better
methods. Still...
The webform that is having this problem is almost identical in logic to one
that works just fine. One difference I have noticed is that when I execute
these 3 lines:
this.sqldaAddSite.SelectCommand.Parameters["@SiteID"].Value = (string)
Session["SiteID"];
this.sqldaAddSite.Fill(this.dsAddSite1);
drCur = this.dsAddSite1.scs_GetSiteUpdate.Rows[0];
The rowstate of drCur is "Added" while on the webform that works it's
"Unchanged". Both are using store procedures for select commands.
Can anybody give me clues as to what's going on and what to do about it?