asp获取新增ID

conn.Execute("insert into Tb_Order(CT_Name,CT_Ideny,CT_Tel,JD_Name,P_Number,P_Time,Hit) VALUES('"&vCT_Name&"','"&vCT_Ideny&"','"&vCT_Tel&"','"&vJD_Name&"','"&vP_Number&"','#"&vP_Time&"#','0')")
Set Rss = conn.Execute("SELECT @@IDENTITY as id FROM Tb_Order")
newID = Rss("id")
conn.Execute("update Tb_Order set Look_Id='"&newID&"' where Order_Id='"&newID&"'")
conn.close

你可能感兴趣的:(数据库,职场,asp,休闲)