Stupid Problem with Example
I'm confused by example 12.2 in the book - precisely in how to set a ConnectionString for a SQLConnection.
In my example, I have a connection string called "db1Dev" held in my web.config file.
I want to apply it (or, depending on the conditions, an alternative) at run time, to a SQLConnection object.
I can't find any ConfigurationManager anywhere which will allow me to go
.ConnectionStrings("db1Dev").ConnectionString
.ConnectionStrings, I'm told, cannot be converted to a String, and does not have a property .ConnectionString.
What am I doing wrong?
And a subsidiary question in the same area.
Do I have to use SQLConnection for a password-protected Access database, just as I have to with the DataSources?
Alan
|