set cn=Server.CreateObject("ADODB.Connection") cn.Open "PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=sa;DATABASE=renode" cn.Execute("update emps set userName='m22' where empId='105'") cn.Close
这是VBSCRIPT我想改成JScript,怎么改啊!!
我找到了: var cn=Server.CreateObject("ADODB.Connection") cn.Open ("PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=sa;DATABASE=renode") cn.Execute("update emps set userName='m22' where empId='105'") cn.Close
差别不是很大!
var cn=new ActiveXObject("ADODB.Connection"); cn.Open("PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=sa;DATABASE=renode"); cn.Execute("update emps set userName='m22' where empId='105'"); cn.Close();