当前位置:萝卜系统下载站 > 技术开发教程 > 详细页面

如何运用asp创建dsn?

如何运用asp创建dsn?

更新时间:2022-07-22 文章作者:未知 信息来源:网络 阅读次数:

<HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <TITLE>ODBC SQL Server @softwing.com</TITLE>
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<%

Set xObj = Server.CreateObject("Softwing.OdbcRegTool")
strDriver = "SQL Server"
strDSN = "DSN=New SQL Server Data Source" & vbNullChar & "Description=New SQL Server Data Source" & vbNullChar
strDSN = strDSN & "Server=(local)" & vbNullChar
strDSN = strDSN & "DATABASE=pubs" & vbNullChar & vbNullChar

retval = xObj.CreateDSN(strDriver, strDSN)
If retval = True then
    Response.Write "DSN Creation successful."
else
    Response.Write "DSN Creation failed."
%>
</BODY>
</HTML>

温馨提示:喜欢本站的话,请收藏一下本站!

本类教程下载

系统下载排行

网站地图xml | 网站地图html