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