C#技术百科
问问你的心你有没有信心 做事情要专一坚定,执着

<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  王德田  阅读(279)  评论(0编辑  收藏  举报