Sqldatasource Inserting calculated values:
I am submitting this in both begginer and advance, 'cos I am not really sure where it really belongs:
Background:
Using sqldatasource, capturing values for labor costs per person per hour, parts charge etc. I set up text boxes for all the calculated values, and then named them as form control in my parameter specs.
******************
<asp:QueryStringParameter DefaultValue="1" Name="subtotal1" QueryStringField="sub1" Type="Decimal" />
<asp:FormParameter DefaultValue="1" FormField="txtpeople" Name="labor" Type="Int32" />
<asp:FormParameter DefaultValue="1" FormField="txthrs" Name="laborhrs" Type="Decimal" />
<asp:FormParameter DefaultValue="1" FormField="txttotlab" Name="totlabchg" Type="Decimal" />
<asp:Parameter DefaultValue="300.00" Name="flatrate" Type="Decimal" />
<asp:FormParameter DefaultValue="1" FormField="txttotalcharge" Name="totalcharge"
Type="Decimal" />
<asp:FormParameter DefaultValue="1" FormField="txtgrandtotal" Name="grandtotal" Type="Decimal" />
*****************
I also tried the query string parameter:
<asp:QueryStringParameter DefaultValue="1" Name="totlabchg" QueryStringField="laborcharge"
Type="Decimal" />
********************
the regular data is getting posted into the database but not the calculated fields, my store procedure works when I execute it in query analyzer. Please help....!!!
|