Click here to Skip to main content
15,789,698 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 :

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

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 :

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

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900