|
技术资料 > ASP技术 > 客户端相关 : 如何使用asp创建dsn |
如何使用asp创建dsn March 25,2004 |
bigeagle 于 2000-11-9 10:47:22 加贴在 Joy ASP ↑:
<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> |
|
Copyright © 2001-2008 Shenzhen Hiblue Software Team All rights reserved