R
Radu
Hi. This code worked fine with SQL2005, but has a problem with
SQL2000.... Which one ????
cnSQL = New
SqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnectionString"))
cnSQL.Open()
fails with the error
"Format of the initialization string does not conform to specification
starting at index 0."
if in web.config I have
<!-- SQL2000, with Username/Password....-->
<add
key="ConnectionString"
value="Data Source='SQLDEV001\SQLDEV001;Initial Catalog='SOP';User
ID=SOP_DEV;Password=AAA;"
/>
and
<add
name="OrderingProcess"
connectionString="server='SQLDEV001\SQLDEV001';database='SOP';User
ID=SOP_DEV;Password=AAA;"
providerName="System.Data.SqlClient"
/>
which is used in some page as:
<asp:SqlDataSource
ID="LocationSqlDataSource"
SelectCommand="SELECT
Measures.[Measure ID] as ID,
Measures.[Measure Description] as Measure,
Locations_BY_Measure.[Locations] as Location
FROM Locations_BY_Measure INNER JOIN Measures
ON Locations_BY_Measure.[Measure ID] = Measures.[Measure ID]"
EnableCaching="True"
ConnectionString="<%$ ConnectionStrings:OrderingProcess %>"
CacheDuration="60"
FilterExpression="ID = {0}"
RunAt="server">
while the exact same code works great with the 2005 settings:
<!-- SQL2005, with Username/Password....-->
<add
key="ConnectionString"
value="Data Source='myOtherComputer\SQLEXPRESS';Initial
Catalog='SOP';User ID=SOP_DEV;Password=AAA;"
/>
and
<add
name="OrderingProcess"
connectionString="server='SQLDEV001\SQLDEV001';database='SOP';User
ID=SOP_DEV;Password=AAA;"
providerName="System.Data.SqlClient" />
Of course, using Enterprise Manager I can connect using the SOP_DEV
and AAA info to both databases.
Could you help me, please ?
Thanks, Alex.
SQL2000.... Which one ????
cnSQL = New
SqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnectionString"))
cnSQL.Open()
fails with the error
"Format of the initialization string does not conform to specification
starting at index 0."
if in web.config I have
<!-- SQL2000, with Username/Password....-->
<add
key="ConnectionString"
value="Data Source='SQLDEV001\SQLDEV001;Initial Catalog='SOP';User
ID=SOP_DEV;Password=AAA;"
/>
and
<add
name="OrderingProcess"
connectionString="server='SQLDEV001\SQLDEV001';database='SOP';User
ID=SOP_DEV;Password=AAA;"
providerName="System.Data.SqlClient"
/>
which is used in some page as:
<asp:SqlDataSource
ID="LocationSqlDataSource"
SelectCommand="SELECT
Measures.[Measure ID] as ID,
Measures.[Measure Description] as Measure,
Locations_BY_Measure.[Locations] as Location
FROM Locations_BY_Measure INNER JOIN Measures
ON Locations_BY_Measure.[Measure ID] = Measures.[Measure ID]"
EnableCaching="True"
ConnectionString="<%$ ConnectionStrings:OrderingProcess %>"
CacheDuration="60"
FilterExpression="ID = {0}"
RunAt="server">
while the exact same code works great with the 2005 settings:
<!-- SQL2005, with Username/Password....-->
<add
key="ConnectionString"
value="Data Source='myOtherComputer\SQLEXPRESS';Initial
Catalog='SOP';User ID=SOP_DEV;Password=AAA;"
/>
and
<add
name="OrderingProcess"
connectionString="server='SQLDEV001\SQLDEV001';database='SOP';User
ID=SOP_DEV;Password=AAA;"
providerName="System.Data.SqlClient" />
Of course, using Enterprise Manager I can connect using the SOP_DEV
and AAA info to both databases.
Could you help me, please ?
Thanks, Alex.