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?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Blocked AccountRank #403 · 6.2K reputationPosted Jul 5, 2011, 8:58 PM EDT
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
Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Jul 5, 2011, 9:01 PM EDT
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....