3个回答
展开全部
var conn;
function createconn(filename){
var tempresult = true;
connstr = baseconn+filename+";";
try{
conn = new ActiveXObject("ADODB.Connection");
conn.open(connstr);
//alert("打开数据库成功!");
}
catch(Exception)
{
tempresult=false;
}
return tempresult;
}
function genurls(conn){
var names,narray,i;
sql = "select userid from user";
var rs = new ActiveXObject("ADODB.RecordSet");
rs.open(sql,conn,1);
names="";
while (!rs.EOF){
if(names!=""){
names = names+" "+rs("userid").value;
}else{
names = rs("userid").value;
}
rs.moveNext();
}
function createconn(filename){
var tempresult = true;
connstr = baseconn+filename+";";
try{
conn = new ActiveXObject("ADODB.Connection");
conn.open(connstr);
//alert("打开数据库成功!");
}
catch(Exception)
{
tempresult=false;
}
return tempresult;
}
function genurls(conn){
var names,narray,i;
sql = "select userid from user";
var rs = new ActiveXObject("ADODB.RecordSet");
rs.open(sql,conn,1);
names="";
while (!rs.EOF){
if(names!=""){
names = names+" "+rs("userid").value;
}else{
names = rs("userid").value;
}
rs.moveNext();
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |