Re: oledbConnection to SQL Server
Collapse
This topic is closed.
X
X
-
Mark Rae [MVP]Tags: None -
=?Utf-8?B?Um9nZXIgV2l0aG5lbGw=?=
Re: oledbConnection to SQL Server
I can now connect to the database on my operational server, which uses SQL
Server authentication, with:
'dbconn=New OleDbConnection ("Provider=sqlo ledb; Data Source=ip address;
Initial Catalog=dbName; User Id=xxxx; Password=yyyy;" )
But I cannot connect to my in house SQL Server on localhost, which uses
Windows Authentication. The string:
dbconn=New OleDbConnection ("Provider=sqlo ledb; Data
Source=UBE-IAS\SQLEXPRESS; Initial Catalog=upperbr idge2; User Id=;
Password=;")
gives the error Invalid authorization specification.
What is the correct connection string for this?
Thanking you in anticipation.
Roger
"Mark Rae [MVP]" wrote:
"Roger Withnell" <RogerWithnell@ discussions.mic rosoft.comwrote in message
news:9579A956-349D-4D23-B253-4175C2D7AE1F@mi crosoft.com...
>>What is the connection string in asp.net?
OleDbConnection ("?")
For ASP.NET you should use a native .NET data provider whenever possible:
>
>
--
Mark Rae
ASP.NET MVP
>
> -
Mark Rae [MVP]
Re: oledbConnection to SQL Server
"Roger Withnell" <RogerWithnell@ discussions.mic rosoft.comwrote in message
news:BBDBC282-414C-4908-A529-3209CFCF0C57@mi crosoft.com...
[top-posting corrected]
Again, why are you even trying to use OleDb to connect to SQL Server through>>>What is the connection string in asp.net?
OleDbConnection ("?")
>For ASP.NET you should use a native .NET data provider whenever possible:
>http://www.connectionstrings.com/?carrier=sqlserver2005
>I can now connect to the database on my operational server, which uses SQL
Server authentication, with:
>
'dbconn=New OleDbConnection ("Provider=sqlo ledb; Data Source=ip address;
Initial Catalog=dbName; User Id=xxxx; Password=yyyy;" )
ASP.NET...?
I've already given you the link, but here it is again:What is the correct connection string for this?
Please scroll down *past* the OleDb section until you come to the section
entitled SqlConnection (.NET)
--
Mark Rae
ASP.NET MVP
Comment
Comment