Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
118619 Points
18779 Posts
Apr 22, 2012 01:03 AM|LINK
Hello:)
I notice that your generated value has an original_{0},So plz remove that by changing your codes like this following:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="HealthDiagnosticsTableAdapters.tblPCTTableAdapter" UpdateMethod="Update" DataObjectTypeName="System.Guid"> <UpdateParameters> <asp:Parameter Name="id" DbType="Guid" /> <asp:Parameter Name="pct" Type="String" /> <asp:Parameter Name="credits" Type="Int16" /> <asp:Parameter Name="pctUser" Type="String" /> <asp:Parameter Name="pctPass" Type="String" /> <asp:Parameter Name="pctCode" Type="String" /> <asp:Parameter DbType="Guid" Name="Original_id" /> </UpdateParameters>
…………………………
And then make sure that your UpdateParameter should include all the above parameters with the same correct type in the function。
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Help with creating a Datagridview that is bound to an ObjectDataSource
Apr 22, 2012 01:03 AM|LINK
Hello:)
I notice that your generated value has an original_{0},So plz remove that by changing your codes like this following:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="HealthDiagnosticsTableAdapters.tblPCTTableAdapter" UpdateMethod="Update" DataObjectTypeName="System.Guid"> <UpdateParameters> <asp:Parameter Name="id" DbType="Guid" /> <asp:Parameter Name="pct" Type="String" /> <asp:Parameter Name="credits" Type="Int16" /> <asp:Parameter Name="pctUser" Type="String" /> <asp:Parameter Name="pctPass" Type="String" /> <asp:Parameter Name="pctCode" Type="String" /> <asp:Parameter DbType="Guid" Name="Original_id" /> </UpdateParameters>…………………………And then make sure that your UpdateParameter should include all the above parameters with the same correct type in the function。