[Mono-list] System.InvalidOperationException: State != Open When trying to access MS SQL Sever Database?

Daniel Morgan monodanmorg at yahoo.com
Mon Aug 1 16:10:45 EDT 2005


System.Data.OleDb requires libgda to work.  libgda only works on Linux with GNOME 2.0.  Also, OleDb is not actively maintained.
 
I suggest using the System.Data.SqlClient or System.Data.Odbc to connect to Microsoft SQL Server.  However for System.Data.Odbc, this will require ODBC and an ODBC driver for SQL Server.  On Windows, this should come with MDAC.  On Linux, use unixODBC and freetds or use iODBC and freetds.
 
http://www.mono-project.com/Database_Access

Alan Zebchuk <azebchuk at rogers.com> wrote:
Hi,

I'm trying to get one of our .NET applications running on mono and 
currently receive the following error:

System.InvalidOperationException: State != Open
in <0x00260> System.Data.OleDb.OleDbCommand:ExecuteReader 
(CommandBehavior behavior)
in (wrapper remoting-invoke-with-check) 
System.Data.OleDb.OleDbCommand:ExecuteReader 
(System.Data.CommandBehavior)
in <0x00028> 
System.Data.OleDb.OleDbCommand:System.Data.IDbCommand.ExecuteReader 
(CommandBehavior behavior)
in <0x00140> System.Data.Common.DbDataAdapter:Fill 
(System.Data.DataSet dataSet, Int32 startRecord, Int32 maxRecords, 
System.String srcTable, IDbCommand command, CommandBehavior behavior)
in <0x00064> System.Data.Common.DbDataAdapter:Fill 
(System.Data.DataSet dataSet)

The Database that's being accessed is a MS SqL server running on 
another machine.
The Connection string currently looks like: 
provider=SQLOLEDB;Server=192.168.1.15;database=my_database;uid=my_user;p 
wd=my_password

Any advice is greatly appreciated,

Thanks,

Alan

_______________________________________________
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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20050801/ac1cd6a0/attachment.html


More information about the Mono-list mailing list