c# - SqlConnectionStringBuilder - String was not recognized as a valid Boolean -


i attempting pass in connection string sqlconnectionstringbuilder object, error: "string not recognized valid boolean", @ runtime.

here code:

using system; using system.collections.generic; using system.linq; using system.text; using system.data; using system.data.sqlclient;  namespace sqlclientproj {   class program   {     static void main(string[] args)     {       string cstr = @"data source=(local)\sqlexpress;integrated security=iips;initial catalog=autos";        sqlconnectionstringbuilder cbuilder = new sqlconnectionstringbuilder(cstr);        ... 

as far know, cstr string, why sqlconnectionstringbuilder complaining expecting boolean when doesn't have constructor accepts such type beyond understanding.

any ideas?

integrated security=iips  

needs

integrated security=true 

'iips' not boolean (true/false)

in nutshell, connection string made of property-value pairs,and "integrated security" property specified in string expected true or false.

look down @ "integrated security" section on page:

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -