[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Raj

6/14/2005 8:14:00 PM

Hi irfan,

I am also trying to use the transactional serviced(com+) component to update
the informix database tables using the odbc.

Whenver i tried to connect to informinx database by ordinary .net
code(without any transactional components) it's working fine.but the problem
arises when i used to connect to informinx by using transactional com+.
any idea on this.
thanks in advance.
raj




"Irfan Akram" wrote:

> I keep getting this irritating exception on and on. Please Help.
>
>
> There is already an open DataReader associated with this Connection which
> must be closed first.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information about
> the error and where it originated in the code.
>
> Exception Details: System.InvalidOperationException: There is already an
> open DataReader associated with this Connection which must be closed first.
>
> Source Error:
>
>
> Line 84: OdbcCommand myCommand = new
> OdbcCommand(mySelectQuery,myConnection);
> Line 85: myConnection.Open();
> Line 86: OdbcDataReader myReader = myCommand.ExecuteReader();
> Line 87: myReader.Close();
> Line 88:
>
> Here is that part of the source Code..
>
> private void CheckUser()
> {
>
> string connectionString = "DRIVER={MySQL ODBC 3.51 Driver};" +
> "SERVER=localhost;" +
> "DATABASE=markingsystem;" +
> "UID=akramm;" +
> "PASSWORD=rootuser;";
>
> string mySelectQuery = "SELECT * FROM account_details";
> OdbcConnection myConnection = new OdbcConnection(connectionString);
> OdbcCommand myCommand = new OdbcCommand(mySelectQuery,myConnection);
> myConnection.Open();
> OdbcDataReader myReader = myCommand.ExecuteReader();
> myReader.Close();
>
>
> }
>
> Note please that I only have 1 datareader, so the exception doesnt make
> sense to me..
>
>
> Your kind comments will be very much appreciated...
>
> Thanks,
>
> Irfan
>