è possibile trovare un modo più "elegante" per estrarre questi dati??
codice:<% Set rs_s = Server.CreateObject("ADODB.Recordset") strSQL="SELECT id1,id2,id3,id4,id5 FROM preventivi WHERE idprev="& request("idprev")&" " rs_s.open strsql, conn if rs_s.eof then rs_.close set rs_s = Nothing else If rs_s("id1")<>"" then Set rs_1 = Server.CreateObject("ADODB.Recordset") strSQL="SELECT id, tipo, descr_suppl,quota_sc FROM supplementi WHERE id="& rs_s("id1")&" " rs_1.open strsql, conn quota1=rs_1("quota_sc") tipo1=rs_1("tipo") descr1=rs_1("descr_suppl") id1=rs_1("id") rs_1.close set rs_1 = nothing end if If rs_s("id2")<>"" then Set rs_2 = Server.CreateObject("ADODB.Recordset") strSQL="SELECT id, tipo, descr_suppl,quota_sc FROM supplementi WHERE id="& rs_s("id2")&" " rs_2.open strsql, conn quota2=rs_2("quota_sc") tipo2=rs_2("tipo") descr2=rs_2("descr_suppl") id2=rs_2("id") rs_2.close set rs_2 = nothing end if If rs_s("id3")<>"" then Set rs_3 = Server.CreateObject("ADODB.Recordset") strSQL="SELECT id, tipo, descr_suppl,quota_sc FROM supplementi WHERE id="& rs_s("id3")&" " rs_3.open strsql, conn quota3=rs_3("quota_sc") tipo3=rs_3("tipo") descr3=rs_3("descr_suppl") id3=rs_3("id") rs_3.close set rs_3 = nothing end if If rs_s("id4")<>"" then Set rs_4 = Server.CreateObject("ADODB.Recordset") strSQL="SELECT id, tipo, descr_suppl,quota_sc FROM supplementi WHERE id="& rs_s("id4")&" " rs_4.open strsql, conn quota4=rs_4("quota_sc") tipo4=rs_4("tipo") descr4=rs_4("descr_suppl") id4=rs_4("id") rs_4.close set rs_4 = nothing end if If rs_s("id5")<>"" then Set rs_5 = Server.CreateObject("ADODB.Recordset") strSQL="SELECT id, tipo, descr_suppl,quota_sc FROM supplementi WHERE id="& rs_s("id5")&" " rs_5.open strsql, conn quota5=rs_5("quota_sc") tipo5=rs_5("tipo") descr5=rs_5("descr_suppl") id5=rs_5("id") rs_5.close set rs_5 = nothing end if %> mostro record...

Rispondi quotando
