SQL server -I am new to C#.NET
can someone point me to basic tutorial on how to connect to and create a sql rver?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jiteendra SampathiraoPosted Jul 6, 2011, 1:01 AM
There is so many procedure...
Solution 1:
First store the conncetion string value in web.config file(if the application is web) or in app.config file if the application is windows...
check the connection and retrieve the values from code behind pages:
refer this: link
Solution2;
add the connectionstring value in configuration section(which also available in web.config and app.config)
To retrieve and open the connection:
SqlConnection sqlconn;
SqlCommand sqlcomm;
sqlconn = new SqlConnection(ConfigurationManager.AppSettings["Sql_server"]);
sqlconn.Open();
sqlcomm = new SqlCommand();
sqlcomm.Connection = sqlconn;
we can connect with sql server in this way also:
refer:
Refer the below thread for more articles regarding the same>
Database articles
I hope it help you....
Blocked AccountPosted Jul 6, 2011, 12:58 AM
In this site there are lot of articles and blog related to SQl Server. You can start your journey from here. If you got any problem then you can ask in this Forums.
Start Learning Sql Server