OleDbConnection: ASP vs ASP .Net

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?
 
M

Marina

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.
 
K

Kevin Spencer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top