Issue 266 in dblinq2007: SubmitChanges with PostGres causes System.InvalidCastException on Mono 2.6.3

5 views
Skip to first unread message

dblin...@googlecode.com

unread,
Jul 26, 2010, 6:54:25 AM7/26/10
to dblin...@googlegroups.com
Status: New
Owner: ----

New issue 266 by Beiri22Ny: SubmitChanges with PostGres causes
System.InvalidCastException on Mono 2.6.3
http://code.google.com/p/dblinq2007/issues/detail?id=266

new Npgsql.NpgsqlConnection(); //Without this line, NpgsqlConnection is not
found in the next line...
DataContext db=new
DbLinq.Data.Linq.DataContext("DbLinqProvider=PostgreSql;DbLinqConnectionType=Npgsql.NpgsqlConnection,Npgsql;Server=localhost;Database=...;User
ID=...;Password=...;");
db.Log=Console.Out;
db.SubmitChanges();

=>
Unhandled Exception: System.InvalidCastException: Cannot cast from source
type to destination type.
at DbLinq.Data.Linq.DataContext.SubmitChanges (ConflictMode failureMode)
[0x00045] in
/home/rico/Desktop/dblinq/dblinq2007-read-only/src/DbLinq/Data/Linq/DataContext.cs:405
at DbLinq.Data.Linq.DataContext.SubmitChanges () [0x00000] in
/home/rico/Desktop/dblinq/dblinq2007-read-only/src/DbLinq/Data/Linq/DataContext.cs:368
at testlinq.MainClass.Main (System.String[] args) [0x00171] in
/home/rico/Projects/testlinq/testlinq/Main.cs:36


dblin...@googlecode.com

unread,
Jul 31, 2010, 7:03:53 AM7/31/10
to dblin...@googlegroups.com

Comment #1 on issue 266 by Beiri22Ny: SubmitChanges with PostGres causes
System.InvalidCastException on Mono 2.6.3
http://code.google.com/p/dblinq2007/issues/detail?id=266

to old version of npgsql, sorry

dblin...@googlecode.com

unread,
Aug 2, 2010, 4:25:54 PM8/2/10
to dblin...@googlegroups.com
Updates:
Status: WontFix

Comment #2 on issue 266 by jonmpryor: SubmitChanges with PostGres causes

System.InvalidCastException on Mono 2.6.3
http://code.google.com/p/dblinq2007/issues/detail?id=266

Closed as per Comment #1: Npgsql client was too old.

dblin...@googlecode.com

unread,
Jan 22, 2011, 4:52:32 PM1/22/11
to dblin...@googlegroups.com

Comment #3 on issue 266 by m...@gmx.de: SubmitChanges with PostGres causes
System.InvalidCastException on Mono 2.6.3
http://code.google.com/p/dblinq2007/issues/detail?id=266

Same issue HERE, but with Postgresql 9.0, npgsql 2.0.11

dblin...@googlecode.com

unread,
Dec 7, 2011, 11:16:54 AM12/7/11
to dblin...@googlegroups.com

Comment #4 on issue 266 by c...@free.fr: SubmitChanges with PostGres causes
System.InvalidCastException on Mono 2.6.3
http://code.google.com/p/dblinq2007/issues/detail?id=266

Same issue :(

Using Mac OS X 10.7.2, Mono 2.10.6, PostgreSQL 9.1 and Npgsql 4.0 (the
assembly provided by Mono, which is a customized version of 2.0.11.91).

dblin...@googlecode.com

unread,
Dec 8, 2011, 10:14:56 AM12/8/11
to dblin...@googlegroups.com

Comment #5 on issue 266 by c...@free.fr: SubmitChanges with PostGres causes
System.InvalidCastException on Mono 2.6.3
http://code.google.com/p/dblinq2007/issues/detail?id=266

Problem solved! The assembly provided by Mono is broken. If you use the
assembly downloaded from the Npgsql site, the InvalidCastException doesn't
occur.

Reply all
Reply to author
Forward
0 new messages