如何使用ASP经典:(连接到本地数据库 [英] How to connect to local database using ASP classic :(

查看:192
本文介绍了如何使用ASP经典:(连接到本地数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过使用字符串(的LocalDB)SQLSMS连接到我的本地数据库\\ V11.0

I have connected to my local database through SQLSMS using the string (LocalDb)\v11.0

它开辟了一个连接,我可以添加一个数据库中。

It opened up a connection and I could add a database.

在我的ASP经典code(不要问:( C#.NET FTW ..该死的客户!)我有以下code:

In my ASP classic code (don't ask :( C#.NET FTW!.. damn clients) I have the following code:

objConn.ConnectionString = "Provider=SQLOLEDB;Persist Security Info=True;Data Source=(LocalDb)\v11.0;Initial Catalog=databasename"

它返回此错误:无效的授权规范

It is returning this error: Invalid authorization specification

我不知道要放什么东西在用户ID和密码参数?

I have no idea what to put in for the User Id and Password parameters?

推荐答案

您需要使用SQL Server验证此:

You'll need to use SQL server authentication for this:

objConn.ConnectionString = "User ID=<sql server user id>;Password=<password for sql server user>;Initial Catalog=<database>;Data Source=<database server\instance name>;Provider=SQLOLEDB"

其实貌似有一个previous问题<一href=\"http://stackoverflow.com/questions/10972481/sql-server-2012-classic-asp-connection-string\">'SQL Server 2012的传统的ASP连接字符串'可能在详细讨论这一点。

Actually looks like there is a previous question 'SQL Server 2012 classic asp connection string' that might cover this in more detail.

这篇关于如何使用ASP经典:(连接到本地数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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