Re: ADO Excel D2007 SQL UPDATE problem



"Sven Pran" <no.direct@xxxxxxxxxxx> wrote in
news:480ba0db$1@xxxxxxxxxxxxxxxxxxxxxx:

I tried disconnecting and reconnecting. It made no difference - I have
the same EOleException.
Sven

"Sven Pran" <no.direct@xxxxxxxxxxx> wrote in message
news:480b99a1$1@xxxxxxxxxxxxxxxxxxxxxxxxx
I am successfully connecting to an Excel workbook and perform some
actions related to selected records.

Then I want to update one field in those records that have been
processed.

To do this I ended up closing the ADODataset, changing the SELECT
statement to an UPDATE statement and then open the ADODataset again.

This results in the following EOleException: 'Current provider does
not support returning multiple recordsets from a single execution' .

Here is the UPDATE statement I am trying:
UPDATE Fakturering SET Fakturert =2008-04-20 WHERE
Fakturering.Fakturert IS NULL AND Fakturering.KNr = 1623

I am not too happy about disconnecting completely from the workbook
while doing this job, but is that the problem? Do I have to
disconnect and reconnect in addition to close and open my ADODataset
or is there something else I am doing wrong?

I cannot remember having had such problems when working with Access
databases through ADO, but as i am fairly new to ADO with Excel I
shall be most grateful for any advice.

regards Sven


Delphi help: "ADODataSet is not capable of issuing Data Manipulation
Language (DML) SQL statements that do not return result sets (like DELETE,
INSERT, and UPDATE). For this use a component like TADOCommand or
TADOQuery."
.