views:

41

answers:

2

Hi,

How do I find what string is to be put in my ASP.NET application config file in the 'driver' attribute for the dataAccess node? So here is the node to be clear:

<add name="somenamehere" driver="I want to know what goes in here???" connectionStringName="somenamehere"/>

Its a MS SQL Server 2008. I am sorry if this has been answered elsewhere. I am trying locating the driver in my SQL server installation directory but still havent found any. Any help would be appreciated.

I have that already in my application web config. I was tring to add a new ms sql server 2008 database entry inside the dataAccess node of my config file and not the connections string node. I have already enetered the conn string at the right plce in the config file. I hope that I am clear.

This is a special config file and not just a regular asp.net web.config file. This config file works with a content management system. It has a node for connectionString where I have put in a proper string. I want to be able to make my database act as a source for this CMS. So I am trying to provide a driver in the 'dataAccess' nodes section of the config file.

+9  A: 

Try:

http://connectionstrings.com

Typically something like:

<add name="MyDb" 
    connectionString="Server=.\SQLEXPRESS; Database=mydb; Integrated Security=True;"
    providerName="System.Data.SqlClient" />
RedFilter
What @RedFilter said! +1
Andrew Barber
@RedFilter: I have that already in my application web config. I was tring to add a new ms sql server 2008 database entry inside the dataAccess node of my config file and not the connections string node. I have already enetered the conn string at the right plce in the config file. I hope that I am clear. Thanks
VP
What driver you use depends on what the content management system is expecting. Does it use ODBC, OLEDB, ...?
RedFilter
Oh. So you mean that I have different options here and I just need to find out what my cms is expecting in that attribute?
VP
@VP: yes. Do you have any example connection strings from that piece of the app, or the source code? If not, just try some of the suggestions from the website above until it works, e.g.: `{SQL Native Client}` :)
RedFilter
heres an example: `<add name="DefaultConnection" driver="Telerik.DataAccess.Providers.ExtendedSqlServer2005Provider, Telerik.DataAccess" connectionStringName="Sitefinity"/`> I am guessing if this itself would work?
VP
+2  A: 

You probably don't need that attribute for your connection string. Just leave it out, unless you've gotten specific guidance that you need it.

Just use the name and connectionString and providerName parameters. Providername is probably:

providerName="System.Data.SqlClient"
Andrew Barber