Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Bug in EDBCommandBuilder constructor
Sat, Feb 14 2009 4:50 AMPermanent Link

"Hedley Muscroft"
Hi Tim,

If I do the following :-

     EDBDataAdapter adap = new EDBDataAdapter("select * from occupation",
con);
     EDBCommandBuilder cb = new EDBCommandBuilder(adap);
     cb.GetUpdateCommand();

.... an InvalidOperationException is thrown which says "SelectCommand
property needs to be initialized."

If I do the following then it's ok :-

     EDBDataAdapter adap = new EDBDataAdapter("select * from occupation",
con);
     EDBCommandBuilder cb = new EDBCommandBuilder();
     cb.DataAdapter = adap;
     cb.GetUpdateCommand();

It looks like the EDBCommandBuilder constructor which accepts a DataAdapter
is not initializing the DataAdapter correctly.

Regards,

Hedley
Sat, Feb 14 2009 9:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Hedley,

<< ... an InvalidOperationException is thrown which says "SelectCommand
property needs to be initialized." >>

I'll check it out.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image