<html>
<body>
<input type="button" language="jscript" onclick="donew();" value="new">
<input type="button" language="jscript" onclick="doedit();" value="edit">
<br>
<label for="cns">connection string:</label><br>
<textarea id="cns" cols="50" rows="5" wrap="soft">
</textarea>
</body>
</html>
<script language="jscript">
/*====================================
AUTHOR: Lux21
====================================*/
var obj_dl;
obj_dl = new ActiveXObject("datalinks");
function donew()
{
var obj_cn;
obj_cn = obj_dl.PromptNew();
if (obj_cn != null)
{
cns.innerText = obj_cn.ConnectionString;
}
}
function doedit()
{
var obj_cn;
obj_cn = new ActiveXObject("adodb.connection");
obj_cn.ConnectionString = cns.innerText;
if (obj_dl.PromptEdit(obj_cn))
{
cns.innerText = obj_cn.ConnectionString;
}
}
</script>
posted on 2009-08-26 09:30
sanmao 阅读(276)
评论(0) 编辑 收藏