使用查询字符串ASP .NET使用设计视图更新detailview上的数据 [英] Update Data on detailview using querystring ASP .NET using design view

查看:77
本文介绍了使用查询字符串ASP .NET使用设计视图更新detailview上的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我有问题。

我想在设计视图中使用查询字符串更新detailView中的数据。



这是我选择数据的查询:



Hey everyone,I have a problem.
I want to update data in detailView using querystring in design view.

Here is my query to select data :

SelectCommand="SELECT IDAmbilPsikotes, NilaiAtribut
FROM detail_ambil_nilai_psikotes, tes_psikotes, calon_karyawan 
WHERE calon_karyawan.IDPendaftaranCKaryawan = @IDPendaftaranCKaryawan
AND calon_karyawan.IDPendaftaranCKaryawan = tes_psikotes.IDPendaftaranCKaryawan
AND tes_psikotes.IDTesPsikotes = detail_ambil_nilai_psikotes.IDTesPsikotes
ORDER BY IDAmbilPsikotes ASC"





这里是select参数查询字符串值:





And here is the select parameter for take querystring value :

<SelectParameters>
<asp:QueryStringParameter Name="IDPendaftaranCKaryawan" QueryStringField="IDPendaftaranCKaryawan" Type="String" />
</SelectParameters>





这是我要更新的查询:





Here is my query to update :

UpdateCommand="UPDATE detail_ambil_nilai_psikotes, tes_psikotes, calon_karyawan, atribut_ahp
SET detail_ambil_nilai_psikotes.NilaiAtribut = @NilaiAtribut
WHERE detail_ambil_nilai_psikotes.IDAmbilPsikotes = @IDAmbilPsikotes
AND tes_psikotes.IDTesPsikotes = @IDTesPsikotes
AND calon_karyawan.IDPendaftaranCKaryawan = @IDPendaftaranCKaryawan
AND atribut_ahp.IDAHP = @IDAHP
AND detail_ambil_nilai_psikotes.IDAHP = atribut_ahp.IDAHP
AND detail_ambil_nilai_psikotes.IDTesPsikotes = tes_psikotes.IDTesPsikotes
AND tes_psikotes.IDPendaftaranCKaryawan = calon_karyawan.IDPendaftaranCKaryawan"





我很困惑如何获得价值查询字符串o n updateparameter 。这是我的更新参数代码:





I confused how to get value querystring on updateparameter. Here is my updateparameter code :

<UpdateParameters>
<asp:Parameter Name="NilaiAtribut" Type="String" />
<asp:Parameter Name="IDAmbilPsikotes" Type="String" />
<asp:Parameter Name="IDTesPsikotes" Type="String" />
<asp:QueryStringParameter Name="IDPendaftaranCKaryawan" QueryStringField="IDPendaftaranCKaryawan" Type="String" />
<asp:Parameter Name="IDAHP" Type="String" />
</UpdateParameters>







我的问题是,如何从许多依赖表中获取查询字符串值?请有人帮助我,谢谢。




My question is, how to take querystring value from many dependence tables? Please someone help me, Thanks.

推荐答案

这篇关于使用查询字符串ASP .NET使用设计视图更新detailview上的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆