access to SQL server asp.net issue | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

access to SQL server asp.net issue

Hello, <br />We are re-writing our site in asp.net using sql server. Most of the site uses asp classic and it was to an access database. During the conversion we have everything working correct to SQL Server except for the asp.net connection string. There is an important part of the application using asp.net which works fine with our connection string to the access database. To recap our problem is the connection string from asp.net to sql server. <br /><br /><br />This code works fine for the asp.net to access in the web.cnfg file <br /> &lt;/microsoft.web&gt; <br /> &lt;connectionStrings&gt; <br /> &lt;add name="SalesConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:inetpubvhosts hemarketingvp.comsubdomainsvphttpdocsfpdbsalesMain.mdb" providerName="System.Data.OleDb"/&gt; <br /> &lt;add name="ODBCSalesConnectionString" connectionString="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=E:inetpubvhosts hemarketingvp.comsubdomainsvphttpdocsfpdbsalesMain.mdb"/&gt; <br /> &lt;add name="RawConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:inetpubvhosts hemarketingvp.comsubdomainsvphttpdocsfpdbsalesMain.mdb" providerName="System.Data.OleDb"/&gt; <br /> &lt;add name="ConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|inventoryStatus.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient"/&gt; <br /> &lt;/connectionStrings&gt; <br /> &lt;system.web&gt; <br /><br /><br />The code in the global.asa which works fine for classic asp to sql server also works fine and is as follows <br /><br /> ‘–Project Data Connection <br /> Application("sales_ConnectionString") = "Driver={SQL Native Client};Server=DMSERVER01;Database=SQLsalesMain;UID=nTrack<img src=’/community/emoticons/emotion-4.gif’ alt=’;P’ />WD=nTrack2k3" <br /> Application("sales_ConnectionTimeout") = 15 <br /> Application("sales_CommandTimeout") = 30 <br /> Application("sales_CursorLocation") = 3 <br /> Application("sales_RuntimeUserName") = "" <br /> Application("sales_RuntimePassword") = "" <br /><br /><br />Our programmer who set this up is out for a couple of weeks and I would appreciate any help in the correct connection string from asp.net to the sql server database in the web.cnfg file <br /><br />Thanks <br />
http://www.connectionstrings.com/?carrier=sqlserver2005 Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
]]>