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

Alan Zebchuk azebchuk at rogers.com
Mon Aug 1 15:47:45 EDT 2005


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



More information about the Mono-list mailing list