maulikkcs / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

SqliteConnectionStringBuilder separates with ; but SqliteConnection expects , #153

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a connection string with SqliteConnectionStringBuilder setting 
DataSource, Encoding, and Version
2. assign the resulting builder.ConnectionString to a SqliteConnection

What is the expected output? What do you see instead?

"/path/to/name" should be used to open the file.  Instead it is trying to open 
"/path/to/name;Encoding=whatever;Version=3" resulting in an Error 14 unable to 
open the database.

What version of the product are you using? On what operating system?

Fresh pull from Mercurial today (20120418), OSX Lion.

Please provide any additional information below.

Original issue reported on code.google.com by da...@ritter.demon.co.uk on 18 Apr 2012 at 7:59

GoogleCodeExporter commented 8 years ago
A patch required to fix this would be in SqliteConnection.cs, replacing the 
portion of code starting at around line 177 with this:

        // Accept connection strings with both comma and semi-colon delimiters. See bug 153.
        string[] conn_pieces = connstring.Split(new char[]{',',';'}, StringSplitOptions.RemoveEmptyEntries);
        for ( int i = 0; i < conn_pieces.Length; i++ )
        {
          string piece = conn_pieces[i].Trim();
          int firstEqual = piece.IndexOf( '=' );

Original comment by stewart....@gmail.com on 19 Jul 2012 at 9:09

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 0b18f43d094b.

Original comment by stewart....@gmail.com on 17 Aug 2012 at 11:13

GoogleCodeExporter commented 8 years ago
Fixed in revision 0b18f43d094b

Original comment by stewart....@gmail.com on 17 Aug 2012 at 11:13