数据库连接经典ASP SQL Server 2008 Windows身份验证 [英] Database Connectivity classic asp sql server 2008 windows authentication

查看:94
本文介绍了数据库连接经典ASP SQL Server 2008 Windows身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何建立到数据库的连接,我已经尝试了很多次,但是却无法正常工作.我的代码如下所示,在经典的asp中请提供帮助

How to make connectivity to database i have tried so many times but it is not working my code is as below in classic asp please help

<%
   dim str

Set conn = Server.CreateObject("ADODB.Connection")
str ="Data Source Name='samp';Server=windows\SQLEXPRESS;Database=product;User Id='';Password='';"
             conn.open str
%>

推荐答案

对我来说,您的连接字符串看起来不正确.没有用户名和密码?
查看 [ ^ ],了解如何构造连接字符串.

UDL文件 [
To me your connection string looks incorrect. No user id, password?
Look at [^] to see how to construct a connecting string.

UDL File[^] is another option to build one and test connection.


尝试使用UDL检查连接字符串.这是MSDN文章中的操作方法.创建和配置UDL [ ^ ]
Try to check the connection string using UDL. Here is MSDN article how to do so.Creating and Configuring UDL[^]


这篇关于数据库连接经典ASP SQL Server 2008 Windows身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆