Home All Groups Group Topic Archive Search About

A VB - Datbase question

Author
15 Jan 2006 7:19 PM
**Developer**
I downloaded some code. In it this code
lReader = lCmd.ExecuteReader()

causes this exception message

Fail.ToString "System.InvalidOperationException: ExecuteReader requires an
open and available Connection. The connection's current state is Open,
Fetching.
   at System.Data.OleDb.OleDbCommand.ValidateConnectionAndTransaction(String
method, Int32& localState)
   at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
   at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.OleDb.OleDbCommand.ExecuteReader()
   at CnCommon.VisualTheme.LoadTheme(String pvName) in C:\Documents and
Settings\Cal\Desktop\junk\CnCommon\VisualTheme.vb:line 544" String

Does this mean anything to you.

I don't use database so there may be something wrong with it.

Got a suggestion as to what I should look for?


Thanks

Author
15 Jan 2006 8:08 PM
Ken Tucker [MVP]
Hi,

           I would check your connection string. 

Ken
------------------

Show quoteHide quote
"**Developer**" wrote:

> I downloaded some code. In it this code
> lReader = lCmd.ExecuteReader()
>
> causes this exception message
>
>  Fail.ToString "System.InvalidOperationException: ExecuteReader requires an
> open and available Connection. The connection's current state is Open,
> Fetching.
>    at System.Data.OleDb.OleDbCommand.ValidateConnectionAndTransaction(String
> method, Int32& localState)
>    at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
> behavior, String method)
>    at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
>    at System.Data.OleDb.OleDbCommand.ExecuteReader()
>    at CnCommon.VisualTheme.LoadTheme(String pvName) in C:\Documents and
> Settings\Cal\Desktop\junk\CnCommon\VisualTheme.vb:line 544" String
>
> Does this mean anything to you.
>
> I don't use database so there may be something wrong with it.
>
> Got a suggestion as to what I should look for?
>
>
> Thanks
>
>
>
Author
15 Jan 2006 11:52 PM
**Developer**
and you would find the problem.



Thanks



Show quoteHide quote
"Ken Tucker [MVP]" <KenTucker***@discussions.microsoft.com> wrote in message
news:FA206087-5273-4512-805F-9E8F78F21E59@microsoft.com...

> Hi,
>
>           I would check your connection string.
>
> Ken
> ------------------
>
> "**Developer**" wrote:
>
>> I downloaded some code. In it this code
>> lReader = lCmd.ExecuteReader()
>>
>> causes this exception message
>>
>>  Fail.ToString "System.InvalidOperationException: ExecuteReader requires
>> an
>> open and available Connection. The connection's current state is Open,
>> Fetching.
>>    at
>> System.Data.OleDb.OleDbCommand.ValidateConnectionAndTransaction(String
>> method, Int32& localState)
>>    at
>> System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
>> behavior, String method)
>>    at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior
>> behavior)
>>    at System.Data.OleDb.OleDbCommand.ExecuteReader()
>>    at CnCommon.VisualTheme.LoadTheme(String pvName) in C:\Documents and
>> Settings\Cal\Desktop\junk\CnCommon\VisualTheme.vb:line 544" String
>>
>> Does this mean anything to you.
>>
>> I don't use database so there may be something wrong with it.
>>
>> Got a suggestion as to what I should look for?
>>
>>
>> Thanks
>>
>>
>>