OleDbConnection: ASP vs ASP .Net

  • Thread starter Thread starter Steven K
  • Start date Start date
S

Steven K

Hello,

I am trying to convert my connection string from ASP to ASP .Net. This is
my understanding:

ASP
"Provider=SQLOLEDB;Server=MyServer;Database=MyDatabase;uid=MyUser;pwd=MyPswd
"

ASP.Net
"Provider=SQLOLEDB;Data Source=MyServer;Initial
Catalog=MyDatabase;Integrated Security=SSPI;"


Is this the mapping?

ASP ASP.Net
-------- ---------------
Server Data Source
Database Initial Catalog
uid ?
pwd ?

Also, what is Integrated Security=SSPI?
 
You should actually just be able to use the original string you have. Most
of the parameters have multiple valid names.

Also, if you plan to use the SqlClient provider, do not pass the provider
type, as that always uses the sql server provider.

Integrated Seuciryt = SSPI, means to use integrated security to connect to
the database as opposed to a username/password. That means it will try to
connect as the ASPNET user, if you are running this via asp.net. So if the
ASPNET account doesn't have rights to access the sql server, this will fail.
 
Your Connection String will be the same in ASP.Net as it was in ASP.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top