Hi all,
Any help much appreciated - Andy
I am trying to connect to a SQL Server DB using c#, ADO.Net
mySqlConnection = new
SqlConnection(@"user=ddd;password=jfn;server=s rv5;Trusted_Connection=no;database=dan");
as you can see there are "special" ASCII chars in the user and password
fields. (ASCII 127 and ASCII 157). The following error results when
trying to connect, where index 5 is the '' char in the user name.
"Format of the initialization string does not conform to specification
starting at index 5."
StackTrace
at System.Data.Common.DBConnectionString.GetKeyValueP air(Char[]
connectionString, Int32 currentPosition, String& key, Char[] valuebuf,
Int32& vallength, Boolean& isempty)\r\n
at System.Data.Common.DBConnectionString.ParseInterna l(Char[]
connectionString, UdlSupport checkForUdl, NameValuePair& keychain)\r\n
at System.Data.Common.DBConnectionString..ctor(String
connectionString, UdlSupport checkForUdl)\r\n
at System.Data.SqlClient.SqlConnectionString..ctor(St ring
connectionString)\r\n
at System.Data.SqlClient.SqlConnectionString.ParseStr ing(String
connectionString)\r\n
at System.Data.SqlClient.SqlConnection.set_Connection String(String
value)\r\n
at System.Data.SqlClient.SqlConnection..ctor(String
connectionString)\r\n
at HowTo.Samples.ADONET.sqldtreader.Run()