473,587 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Format of the initialization string does not conform to specification starting at index 5."

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;pass word=jfn;ser ver=srv5;Truste d_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.Com mon.DBConnectio nString.GetKeyV aluePair(Char[]
connectionStrin g, Int32 currentPosition , String& key, Char[] valuebuf,
Int32& vallength, Boolean& isempty)\r\n
at System.Data.Com mon.DBConnectio nString.ParseIn ternal(Char[]
connectionStrin g, UdlSupport checkForUdl, NameValuePair& keychain)\r\n
at System.Data.Com mon.DBConnectio nString..ctor(S tring
connectionStrin g, UdlSupport checkForUdl)\r\ n
at System.Data.Sql Client.SqlConne ctionString..ct or(String
connectionStrin g)\r\n
at System.Data.Sql Client.SqlConne ctionString.Par seString(String
connectionStrin g)\r\n
at System.Data.Sql Client.SqlConne ction.set_Conne ctionString(Str ing
value)\r\n
at System.Data.Sql Client.SqlConne ction..ctor(Str ing
connectionStrin g)\r\n
at HowTo.Samples.A DONET.sqldtread er.Run()

Nov 19 '05 #1
0 1537

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3089
by: Derek Fountain | last post by:
The DOM Level 3 specification says a few of its sections (like the Java bindings) are "informative". What exactly does that mean? I've assumed it means that the following is a suggestion and doesn't need to be implemented to the letter. Is that right?
0
1753
by: Uday Deo | last post by:
Hi everyone, I have a .NET app invoking from the ASP page. It has to load bunch of data during first visit. The app works fine on the Staging and Prod server. This is the first time the company got the separate machine as a Development server. I have installed .NET Visual studio and framework on the machine. I copied all the files and...
0
1201
by: Galahad | last post by:
I experience the following error when my web.config file attempts to read an encryped sql connection string: Format of the initialization string does not conform to specification. The hotfix for this issue is installed on my machine and the ASPNET SVC account has read access to the string value in the registry. Any advice on this issue...
0
2269
by: Nick | last post by:
I am getting the following error when connecting to a access database via ODBC if the path contains a ascii character 127. Character 127 is a valid character for a path however access can not handle this character. Here is the path I am sending on the connecetion string. Long File Name 001 - +] {#@rȠք....㩵}u ѣ 68...
29
4299
by: zoro | last post by:
Hi, I am new to C#, coming from Delphi. In Delphi, I am using a 3rd party string handling library that includes some very useful string functions, in particular I'm interested in BEFORE (return substring before a pattern), AFTER (return substring after a pattern), and BETWEEN (return substring between 2 patterns). My questions are: 1. Can...
0
5020
by: Gaurav | last post by:
Hi, I have a connection string "Data Source=db1.mynet;DATABASE=test;User ID=testuser;Password=test;" , when i use the connection string to get a dataset of all the tables of a database it works without any problem, but when i try and call a stored procedure i get an exception trace like :
1
32431
by: openleren | last post by:
Hi all, with a little help from my friends, I am trying to construct a connectionstring from a relative path in web.config. It contains <add key="conAccess" value="microsoft.jet.oledb.4.0;data source=data/database.mdb" /> In my webform I constructed a fucntion Public Function getConnectionString() As String
13
3290
by: Roy | last post by:
Hi all, I'm creating a project that should always use this date format when displays the dates or create dates. The back end database is a SQL Server and I like to know what is the logical way to configure server, sql server or program so it always deals with date as mm/dd/yyyy format. Thanks in advance. Roy
6
1220
by: Patient Guy | last post by:
The question in the subject seems plain to me. I wonder if EMCAscript/Javascript developers should even bother adding IE7 even to the clients in which to test script/code. The same goes for any web document, interactive/dynamic or otherwise, developer: does IE7 finally get CSS right, and to what level?
0
7852
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.