传统的ASP的SQL Server数据库连接 [英] Classic ASP SQL Server Database Connection
本文介绍了传统的ASP的SQL Server数据库连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的目标创建Microsoft SQL Server的一个很基本的基于网络的数据库管理系统。然而,为了连接到SQL Server数据库,你似乎需要服务器上的ODBC连接。有没有解决这个任何可能的方式?
I am aiming to create a very basic web based DBMS for Microsoft SQL Server. However, in order to connect to a SQL Server database you seem to require a ODBC connection on the server. Is there any possible way to overcome this?
推荐答案
您还没有表明其SQLServer的版本,但你可以在ASP中使用OLEDB连接。
You haven't stated which version of SQLServer but you can use OLEDB connection in ASP.
<%
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = Northwind; User Id = sa; Password="
If conn.errors.count = 0 Then
Response.Write "Connected OK"
End If
%>
这篇关于传统的ASP的SQL Server数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文