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"
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"
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.