DetailsView编辑更新问题
我用DetailsView显示数据,添加了编辑,点开编辑之后有个更新和取消,现在我的前台代码已经写好,<asp:SqlDataSourceID="SqlDataSourc...
我用DetailsView显示数据,添加了编辑,点开编辑之后有个更新和取消,现在我的前台代码已经写好,<asp:SqlDataSource ID="SqlDataSource4" runat="server"
ConnectionString="<%$ ConnectionStrings:WSCGSConnectionString9 %>"
SelectCommand="SELECT * FROM [DriverContactMotor] WHERE ([DriveLicense] = @DriveLicense)"
UpdateCommand="UPDATE [DriverContactMotor] SET [Phone]=@Phone,[Address]=@Address WHERE [DriveLicense] =@original_DriverLicense AND [Phone]=@original_Phone AND [Address]=@original_Address">
<UpdateParameters>
<asp:Parameter Name = "Phone" Type = "Int64"/>
<asp:Parameter Name = "Address" Type = "String" />
<asp:Parameter Name = "original_DriverLicense" Type = "Int64" />
<asp:Parameter Name = "original_Phone" Type = "Int64" />
<asp:Parameter Name = "original_Address" Type = "String" />
</UpdateParameters>,但是运行之后更新不了,我想问下这个后台代码要怎么写? 展开
ConnectionString="<%$ ConnectionStrings:WSCGSConnectionString9 %>"
SelectCommand="SELECT * FROM [DriverContactMotor] WHERE ([DriveLicense] = @DriveLicense)"
UpdateCommand="UPDATE [DriverContactMotor] SET [Phone]=@Phone,[Address]=@Address WHERE [DriveLicense] =@original_DriverLicense AND [Phone]=@original_Phone AND [Address]=@original_Address">
<UpdateParameters>
<asp:Parameter Name = "Phone" Type = "Int64"/>
<asp:Parameter Name = "Address" Type = "String" />
<asp:Parameter Name = "original_DriverLicense" Type = "Int64" />
<asp:Parameter Name = "original_Phone" Type = "Int64" />
<asp:Parameter Name = "original_Address" Type = "String" />
</UpdateParameters>,但是运行之后更新不了,我想问下这个后台代码要怎么写? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询