Need Help In Database Connection
I have defined
SqlConnection connection = new SqlConnection(connect method, connection )
And futher a class for connection and sub method
public string connect_method ()
{
return "Data Source = " ;
}
When I am providing IP address username and Password it is working but when I am trying to connect it locally its not working. Giving error unhandled exception error.
To connect to local I am writing a code
Date Source=(localdb)\v11.0
Can anyone help me to connect to local database using above code that is in place to data source = what I will put here.
|