Connection property has not been initialized error

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
scott.pedersen
Posts: 21
Joined: Tue 06 Jun 2006 03:14
Location: Auckland, New Zealand

Connection property has not been initialized error

Post by scott.pedersen » Thu 08 Jun 2006 09:39

Hi,

I am getting the error 'Connection property has not been initialized' when I create and try an execute an OracleCommand object.

I have created the OracleConnection and tested it and it connects to Oracle. What am I missing that is causing this error to occur?

Cheers,

Scott.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 08 Jun 2006 11:01

Set

Code: Select all

oracleCommand1.Connection=oracleConnection1

scott.pedersen
Posts: 21
Joined: Tue 06 Jun 2006 03:14
Location: Auckland, New Zealand

Post by scott.pedersen » Thu 08 Jun 2006 19:44

Hi Alexey,

Shouldn't there be an automatic relationship between the connection and the command object?

Why does this need to be set manually?

Cheers,

Scott.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 09 Jun 2006 06:14

There should be no automatic relationship between the connection and the command object, because any form may have more than one OracleConnection component.

Post Reply