ASP和SQL Server 2005 Express [英] ASP and SQL Server 2005 Express
问题描述
我正在使用以下内容尝试连接数据库,但它没有
似乎正在工作。
Dim sConnString
sConnString =" Provider = SQLNCLI.1; Integrated Security = SSPI; Persist Security
Info = False; Initial Catalog = MediaDB; Data Source = MEDIAMACHINE \SQLEXPRESS"
Connection.Open sConnString
Dim Recordset
设置Recordset = Server.CreateObject(" ADODB.Recordset")
有人能告诉我正确的语法吗? Access DB的原始语法(有效)
如下:
sConnString =" PROVIDER = Microsoft.Jet.OLEDB.4.0;" &安培; 数据源= &
Server.MapPath(" /Music/DB/MediaDB.mdb")
TIA
-
Anil Gupte
www.keeninc.net
www.icinema.com
I am using the following to try to connect to the database, but it does not
seem to be working.
Dim sConnString
sConnString = "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=MediaDB;Data Source=MEDIAMACHINE\SQLEXPRESS"
Connection.Open sConnString
Dim Recordset
Set Recordset=Server.CreateObject("ADODB.Recordset")
Can someone tell me the correct syntax? The original syntax (which worked)
for an Access DB was as follows:
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
Server.MapPath("/Music/DB/MediaDB.mdb")
TIA
--
Anil Gupte
www.keeninc.net
www.icinema.com
推荐答案
示例连接字符串在这里
http:// connectionstrings.com/
" Anil Gupte" < a ******* @ icinema.com在留言新闻中写道:在************** @ TK2MSFTNGP04.phx.gbl ...
sample connection strings are here
http://connectionstrings.com/
"Anil Gupte" <an*******@icinema.comwrote in message news:On**************@TK2MSFTNGP04.phx.gbl...
>我正在使用以下内容尝试连接数据库,但它似乎无法正常工作。
Dim sConnString
sConnString =" Provider = SQLNCLI.1; Integrated Security = SSPI; Persist Security Info = False; Initial Catalog = MediaDB; Data
Source = MEDIAMACHINE \SQLEXPRESS"
Connection.Open sConnString
Dim Recordset
设置Recordset = Server.CreateObject(" ADODB.Recordset")
有人能告诉我正确的语法吗? Access DB的原始语法(有效)如下:
sConnString =" PROVIDER = Microsoft.Jet.OLEDB.4.0;" &安培; 数据源= &安培; Server.MapPath(" /Music/DB/MediaDB.mdb")
TIA
-
Anil Gupte
www.keeninc.net
www.icinema.com
>I am using the following to try to connect to the database, but it does not seem to be working.
Dim sConnString
sConnString = "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MediaDB;Data
Source=MEDIAMACHINE\SQLEXPRESS"
Connection.Open sConnString
Dim Recordset
Set Recordset=Server.CreateObject("ADODB.Recordset")
Can someone tell me the correct syntax? The original syntax (which worked) for an Access DB was as follows:
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("/Music/DB/MediaDB.mdb")
TIA
--
Anil Gupte
www.keeninc.net
www.icinema.com
>
Anil Gupte写道:
Anil Gupte wrote:
我使用以下方法尝试连接数据库,但它好像没有b $ b工作。
Dim sConnString
sConnString =" Provider = SQLNCLI.1; Integrated Security = SSPI; Persist
安全信息=假;初始目录= MediaDB;数据
来源= MEDIAMACHINE \SQLEXPRESS" Connection.Open sConnString
Dim Recordset
设置Recordset = Server.CreateObject(" ADODB.Recordset")
可以有人告诉我正确的语法? Access DB的原始语法(
工作)如下:
sConnString =" PROVIDER = Microsoft.Jet.OLEDB.4.0;" &安培; 数据源= &
Server.MapPath(" /Music/DB/MediaDB.mdb")
I am using the following to try to connect to the database, but it
does not seem to be working.
Dim sConnString
sConnString = "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=MediaDB;Data
Source=MEDIAMACHINE\SQLEXPRESS" Connection.Open sConnString
Dim Recordset
Set Recordset=Server.CreateObject("ADODB.Recordset")
Can someone tell me the correct syntax? The original syntax (which
worked) for an Access DB was as follows:
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
Server.MapPath("/Music/DB/MediaDB.mdb")
你真的需要告诉我们错误消息,但我会说我已经有了很多成功连接到带有ASP的集成安全性的SQL2005。我建议在你的服务器上创建一个sql登录名,并在你的连接字符串中使用其用户ID和
密码,而不是集成安全性= SSPI
>
-
Microsoft MVP - ASP / ASP.NET
请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我
不经常检查它。如果您必须离线回复,请删除
NO SPAM
You really need to show us the error message, but i will say that I have had
little success connecting to SQL2005 with integrated security from ASP. I
would suggest creating a sql login on your server and using its user id and
password in your connection string instead of Integrated Security=SSPI
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don''t check it very often. If you must reply off-line, then remove the
"NO SPAM"
0xE7D:该连接不能用于执行此操作。在这种情况下,
关闭或无效。
-
Anil Gupte
www.keeninc.net
www.icinema.com
" Bob Barrows [MVP]" < re ****** @ NOyahoo.SPAMcomwrote in message
新闻:OG **************** @ TK2MSFTNGP03.phx.gbl .. 。
0xE7D:The connection cannot be used to perform this operation. It is either
closed or invalid in this context.
--
Anil Gupte
www.keeninc.net
www.icinema.com
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcomwrote in message
news:OG****************@TK2MSFTNGP03.phx.gbl...
Anil Gupte写道:
Anil Gupte wrote:
>我正在使用以下内容尝试连接到数据库,但它似乎没有工作。
Dim sConnString
sConnString =" Provider = SQLNCLI.1; Integrated Security = SSPI; Persist
Security Info = False; Initial Catalog = MediaDB; Data
Source = MEDIAMACHINE \SQLEXPRESS" Connection.Open sConnString
Dim Recordset
设置Recordset = Server.CreateObject(ADODB.Recordset)
有人能告诉我正确的语法吗? Access DB的原始语法(
有效)如下:
sConnString =" PROVIDER = Microsoft.Jet.OLEDB.4.0;" &安培; 数据源= &
Server.MapPath(" /Music/DB/MediaDB.mdb")
>I am using the following to try to connect to the database, but it
does not seem to be working.
Dim sConnString
sConnString = "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=MediaDB;Data
Source=MEDIAMACHINE\SQLEXPRESS" Connection.Open sConnString
Dim Recordset
Set Recordset=Server.CreateObject("ADODB.Recordset")
Can someone tell me the correct syntax? The original syntax (which
worked) for an Access DB was as follows:
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
Server.MapPath("/Music/DB/MediaDB.mdb")
你真的需要向我们展示错误信息,但我会说我已经
几乎没有成功连接到具有来自
ASP的集成安全性的SQL2005。我建议在你的服务器上创建一个sql登录,并在你的连接字符串中使用它的
用户ID和密码而不是集成
安全= SSPI
>
-
Microsoft MVP - ASP / ASP.NET
请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我
不经常检查它。如果您必须离线回复,请删除
无垃圾邮件
You really need to show us the error message, but i will say that I have
had little success connecting to SQL2005 with integrated security from
ASP. I would suggest creating a sql login on your server and using its
user id and password in your connection string instead of Integrated
Security=SSPI
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don''t check it very often. If you must reply off-line, then remove the
"NO SPAM"
这篇关于ASP和SQL Server 2005 Express的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!