Exception at PgSqlDataReader.GetGuid(Int32 i)

Exception at PgSqlDataReader.GetGuid(Int32 i)

Postby acerbitdrain » Sat 07 Feb 2009 10:15

Hi,

I have encountered an exception from calling PgSqlDataReader.GetGuid(Int32 i)

System.InvalidOperationException was unhandled
Message="Cannot convert object of type 'System.Guid' to object of type 'System.Guid'."
Source="Devart.Data.PostgreSql"
StackTrace:
at Devart.Common.n.a7(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Data.PostgreSql.PgSqlDataReader.GetGuid(Int32 i)

The query is directly against a table 'foo' (integer, guid, varchar, integer, date)

Here is a simple test case:

Code: Select all
PgSqlConnection c = new PgSqlConnection();
            c.ConnectionString = "connection string";
            c.Open();

            PgSqlCommand cmd = c.CreateCommand();
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "SELECT * FROM foo LIMIT 1";

            PgSqlDataReader reader = cmd.ExecuteReader();
            reader.Read();
            reader.GetGuid(1); // Exception
            reader.Close();


Thank you,
Milos
acerbitdrain
 
Posts: 10
Joined: Sat 07 Feb 2009 10:09

Postby Shalex » Mon 09 Feb 2009 13:54

Thank you for the bug report. The problem is fixed. Look forward to the next build of dotConnect for PostgreSQL that will be available during a week. I will post here when it is released.
Shalex
Devart Team
 
Posts: 7654
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL