Home > Uncategorized > OleDB access for SQL server 2005

OleDB access for SQL server 2005

After upgrading my server from ASP.NET 2.0 Beta 1 to ASP.NET 2.0 beta 2, I found, to my horror, it could no longer connect to my SQL server 2005 database – with an "Access is denied" error.

However, I found out that I can use an OLEDB connection string thus

Provider=SQLNCLI.1;
Integrated Security=SSPI;
Persist Security Info=False;
Initial Catalog=<your database>;
Data Source=.SQLEXPRESS;
Use Procedure for Prepare=1;
Auto Translate=True;
Packet Size=4096;
Use Encryption for Data=False;
Tag with column collation when possible=False;
MARS Connection=True;
DataTypeCompatibility=0

— Not the prettiest thing in the world, but it works!

http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/topic13589.aspx

 

 

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: