Few small bugs found.

33 views
Skip to first unread message

flipm0de

unread,
Aug 9, 2012, 11:00:54 AM8/9/12
to csharp...@googlegroups.com
In Community.CsharpSqlite.SQLiteClient.SqliteParameterCollection.cs

private bool isPrefixed (string parameterName)
{
return parameterName.Length > 1 && (parameterName[0] == ':' || parameterName[0] == '$');
}

Should be:

private bool isPrefixed (string parameterName)
{
            return parameterName.Length > 1 && (parameterName [0] == ':' || parameterName [0] == '$' || parameterName [0] == '@');
}

And in Community.CsharpSqlite.SQLiteClient.SqliteConnection.cs

line 177:

string[] conn_pieces = connstring.Split (',');

should be:

string [] conn_pieces = connstring.Split (';');

Stewart

unread,
Aug 10, 2012, 5:12:22 AM8/10/12
to csharp...@googlegroups.com
Hi, 

On Thursday, 9 August 2012, flipm0de wrote:
In Community.CsharpSqlite.SQLiteClient.SqliteParameterCollection.cs
...
Should be:

private bool isPrefixed (string parameterName)
{
            return parameterName.Length > 1 && (parameterName [0] == ':' || parameterName [0] == '$' || parameterName [0] == '@');
}

I agree. 

On Thursday, 9 August 2012, flipm0de also wrote: 
And in Community.CsharpSqlite.SQLiteClient.SqliteConnection.cs

line 177:

string[] conn_pieces = connstring.Split (',');

should be:

string [] conn_pieces = connstring.Split (';');

Or,  string[] conn_pieces = connstring.Split (new char[]{';',','}, StringSplitOptions.RemoveEmptyEntries);

This alternative maintains the current working behaviour, and still meets expectations of developers coming from the C++ implementation. It also eliminates worries caused by connection strings with ",," or ";;".

Regards,
Stewart.
Reply all
Reply to author
Forward
0 new messages