下面的代碼是如何工作的?我從來沒有見過這樣做的更新。我總是這樣說:更新SQL Server表
http://www.w3schools.com/sql/sql_update.asp
sqlText = "SELECT * FROM pricing WHERE pid=1"
rsx.Open sqlText, cnx, 1, 2
if Not rsx.EOF then
rsx("new_us") = Request.Form("new_us")
rsx("new_us_desc") = Rtrim(Request.Form("new_us_desc"))
rsx("new_ca") = Request.Form("new_ca")
rsx("new_ca_desc") = Rtrim(Request.Form("new_ca_desc"))
rsx("new_int") = Request.Form("new_int")
rsx("new_int_desc") = Rtrim(Request.Form("new_int_desc"))
rsx("conv_us") = Request.Form("conv_us")
rsx("conv_us_desc") = Rtrim(Request.Form("conv_us_desc"))
rsx("conv_ca") = Request.Form("conv_ca")
rsx("conv_ca_desc") = Rtrim(Request.Form("conv_ca_desc"))
rsx("conv_int") = Request.Form("conv_int")
rsx("conv_int_desc") = Rtrim(Request.Form("conv_int_desc"))
rsx("ren_us") = Request.Form("ren_us")
rsx("ren_us_desc") = Rtrim(Request.Form("ren_us_desc"))
rsx("ren_ca") = Request.Form("ren_ca")
rsx("ren_ca_desc") = Rtrim(Request.Form("ren_ca_desc"))
rsx("ren_int") = Request.Form("ren_int")
rsx("ren_int_desc") = Rtrim(Request.Form("ren_int_desc"))
rsx.Update
end if
rsx.Close
cnx.Close
Set rsx = Nothing
Set cnx = Nothing
感謝
佈雷特
對不起,標題應該是MS SQL表。 ..謝謝 – 2011-02-24 18:32:57
這是什麼類型的文件?這不僅僅是SQL,它嵌入在其他類型的代碼中。 – Dubmun 2011-02-24 18:34:49
看起來像VB 5/6或經典的ASP(VBScript)給我。 – Dean 2011-02-24 18:38:11