[Mono-list] System.InvalidCastException in Npgsql

Daniel Morgan monodanmorg at yahoo.com
Sun Oct 22 13:51:36 EDT 2006


Npgsql and Mono are okay.

There is a bug in sqlsharpgtk.

In subversion, this has been fixed.

You can read about anonymous subversion access here.
http://www.mono-project.com/AnonSVN

This how you would use subversion to get sqlsharpgtk
from the subversion trunk.

svn co
svn://svn.myrealbox.com/source/trunk/sqlsharpgtk

Mono.Data.SqlSharp.GtkSharp is not part of Mono thus
there is no documentation about it on Monodoc.  What
documentation are you interested in?  
The ProviderFactory which sqlsharpgtk uses, or the
database browser, various data providers like Npgsql,
Mono.Data.SybaseClient, Mono.Data.SqliteClient,
System.Data.OracleClient?

Have you looked into the MonoQuery add-in for
MonoDevelop?

I will try to release a new version of sqlsharpgtk
which has the bug fixed.

--- Andrus <kobruleht2 at hot.ee> wrote:

> To reproduce, try to connect PostgreSQL database
> using  1.1.18 SQL# GTK 
> 
> How to fix this ?
> 
> Where to find documentation of Mono.Data namespace ?
> I haven't found any information about this in
> monodoc browser.
> 
> (1.1.17 works OK)
> 
> 
> Andrus.
> 
> Result is:
> 
> Attempt to open connection...
> Open was successfull.
> Error: Unable to connect.  Reason:
> System.InvalidCastException: Cannot cast
> from source type to destination type.
> 
>   at Npgsql.NpgsqlDataReader.GetInt32 (Int32 i)
> [0x00000]
> 
>   at
>
Mono.Data.SqlSharp.DatabaseBrowser.PostgreSqlMetaData.GetTableColumns
> (System.String owner, System.String tableName)
> [0x00000]
> 
>   at
>
Mono.Data.SqlSharp.DatabaseBrowser.Schema.GetTableColumns
> (System.String owner, System.String tableName)
> [0x00000]
> 
>   at
>
Mono.Data.SqlSharp.GtkSharp.SqlSharpGtk.PopulateTableColumns
> (TreeIter
> parentIter,
> Mono.Data.SqlSharp.DatabaseBrowser.MetaTable table,
> Mono.Data.SqlSharp.DatabaseBrowser.Schema browser)
> [0x00000]
> 
>   at
>
Mono.Data.SqlSharp.GtkSharp.SqlSharpGtk.PopulateTables
> (TreeIter
> parentIter, Mono.Data.Provider provider,
> IDbConnection con) [0x00000]
> 
>   at
>
Mono.Data.SqlSharp.GtkSharp.SqlSharpGtk.OpenDataSource
> (Mono.Data.Provider theProvider, System.String
> theConnectionString,
> System.String connectionName) [0x00000]
> 
>   at
>
Mono.Data.SqlSharp.GtkSharp.LoginDialog.Connect_Action
> (System.Object
> o, System.EventArgs args) [0x00000]
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Mono-list mailing list