> select log; //Throws Exception: L33 Only > Supports Open,Closing States, not Open, Fetching
Upgrade npgsql.dll provider to release 2 Incompatible Open|Fetching state is removed starting at npgsql beta 4 I think DbLinq npgsql should also be upgraded to release 2 which was released some weeks ago. Release 2 may need some changes in DatabaseConnection.cs since Open state may be not valid to use if real state is Fetching. I use patched DatabaseConnection.cs as shown below. This patch works only with npgsql probably. We discussed this in http://pgfoundry.org/forum/message.php?msg_id=1003662 and also in ngpsql-devel list. Andrus. public DatabaseConnection(IDbConnection connection) { _connection = connection; ////// AM. ADDED For npgsql2 beta 4 Npgsql.NpgsqlConnection conn = connection as Npgsql.NpgsqlConnection; if ( (conn.FullState & ConnectionState.Fetching)!=0) { _connection.Close(); _mustClose = true; _connection.Open(); return; } ///////////////////////////// switch (_connection.State) { // AM. npgsqls beta 4 sets this state if connection is in fetching state. so close it. case System.Data.ConnectionState.Open: _mustClose = false; break; // this is for npgsql2 beta 3: //case System.Data.ConnectionState.Open | System.Data.ConnectionState.Fetching: // // Occurs in npgsql when datareader is active in this connection. // _connection.Close(); // _mustClose = true; // break; case System.Data.ConnectionState.Closed: _mustClose = true; break; default: throw new ApplicationException("L33: Can only handle Open or Closed connection states, not " + _connection.State); } if (_mustClose) _connection.Open(); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/dblinq?hl=en -~----------~----~----~----~------~----~------~--~---
