connection string for database
Hello, i am working on a asp.net website
I have vs 2010 and sql server 2008
I created a database via server explorer - selected sql client server and the default server name (my pc name was there to choose from the dropdown menu) and then windows authentication and a name of database (baza).
Now i have this under data connections: my database where i can create tables and so on.. i think its good till now
So my question is, how do i connect to this database now via c# ? The connection string ?
EDIT: Solved problem
If you created Connection Manager in your project then you can simply call the connection string from there.
String connection = this.dts.connections["<connection_manager_name>"];
And use this connection :
using (var conn = new SqlConnection(connection))
Regarding Connection String
It is very simple to establish a database connection using C# language. The video link that I provided below will show how to create a database connection with easy steps.
Take a look in to this article about few basic steps on database connection including connection string in asp.net
|All times are GMT +1. The time now is 03:34 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.