I am pretty much a newbie and I am not totally familiar with the proper setup of the
web.config file for the SBSK. My web host uses SQL 2000, so I found the post on this forum where someone shared the script to create the database on SQL 2000 instead of the built in SQL 2005 Express - and that seeemd to work fine. I am now
trying to mody the web.config file to connect to that database properly. Here is what I have so far:
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="MyConnectionString" connectionString="Data Source=[IP Address of remote sql server here],1433;
Network Library=DBMSSOCN;Initial Catalog=(db name here);User ID=xxxxxx;Password=xxxxxxxx;"/>
</connectionStrings>
I blanked out the IP Address of the remote SQL server (but I have verified that I can conect to it fine), as well as the user ID, password, and database name.
I am thinking I have something misconfigured - such as the NetworkLibrary value, or maybe it is something else. Any help from the forum is appreciated.
Hai friend i have read your mesage,
to use connectionstring in web.config..
<configuration>
<connectionStrings>
<add connectionString="Server=server name;Database=databasename;uid=user id;pwd=password;" name="ConStr"/>
</connectionStrings>
</configuration>
To call the connection string to our page
SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConStr"].ToString());
I think it may useful to you..
If still you have doubt reply me.
christly
0 Points
1 Post
question regarding proper setup pf the web.config file
Apr 18, 2008 01:17 AM|LINK
I am pretty much a newbie and I am not totally familiar with the proper setup of the web.config file for the SBSK. My web host uses SQL 2000, so I found the post on this forum where someone shared the script to create the database on SQL 2000 instead of the built in SQL 2005 Express - and that seeemd to work fine. I am now trying to mody the web.config file to connect to that database properly. Here is what I have so far:
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="MyConnectionString" connectionString="Data Source=[IP Address of remote sql server here],1433;
Network Library=DBMSSOCN;Initial Catalog=(db name here);User ID=xxxxxx;Password=xxxxxxxx;"/>
</connectionStrings>
I blanked out the IP Address of the remote SQL server (but I have verified that I can conect to it fine), as well as the user ID, password, and database name.
I am thinking I have something misconfigured - such as the NetworkLibrary value, or maybe it is something else. Any help from the forum is appreciated.
-John
sprakashcs
Member
256 Points
63 Posts
Re: question regarding proper setup pf the web.config file
Apr 18, 2008 05:13 AM|LINK
Hai friend i have read your mesage,
to use connectionstring in web.config..
<configuration>
<connectionStrings>
<add connectionString="Server=server name;Database=databasename;uid=user id;pwd=password;" name="ConStr"/>
</connectionStrings>
</configuration>
To call the connection string to our page
SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConStr"].ToString());
I think it may useful to you..
If still you have doubt reply me.
visit this link for further clarification
http://foraspdotnetdevelopers.blogspot.com/
jhar
Member
190 Points
47 Posts
Re: question regarding proper setup pf the web.config file
May 03, 2008 04:45 AM|LINK
Try..
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=[IP Address of remote sql server here],1433;
Network Library=DBMSSOCN;Initial Catalog=(db name here);User ID=xxxxxx;Password=xxxxxxxx;"/>
</connectionStrings>
Hopefully that should get you up and running