View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default How to copy entire row fm an xls file to another xls file?

Jamie,

I'm an ADO fan, dont get me wrong.
I'm a decent coder too, and I know that I've got to close connections
and objects.


I was referring to this BUG:

http://support.microsoft.com/default...b;en-us;319998
&Product=xlw

When you retrieve a Microsoft ActiveX Data Objects (ADO) Recordset from
an Excel worksheet that is open in Excel, a memory leak occurs in the
Excel process. Repeated queries may eventually cause Excel to run out of
memory and raise an error, or cause Excel to stop responding.
RESOLUTION
The memory used by the ADO queries cannot be reclaimed by closing and
releasing the ADO objects. The only way to release the memory is to quit
Excel.

ask any EXCEL programmer


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


(Jamie Collins) wrote:

"K.K." wrote:


I have an app in VB6 that will open an excel file, validate then
process the data, if the validation is failed for a record, I want

to
copy (append) that record (entire row) from the original data
worksheet to an exisiting xls file ?

I think I prbably can use ADO connection to get the record but Do

you
think using an ADO connection would Not be better?
Or there is another way to do it?


keepITcool wrote ...

if it's just excel data you're transferring i'd never
use ado but stick to 'pure' excel.

(probably faster
easier coding
less overhead
and less chance of memory leaking and strange lockups)


If the OP can do 'validation' in the WHERE clause of a SELECT query,
then using ADO will be:

- faster
- easier coding

If you are getting memory leaks and strange lockups when using ADO
with Excel, then you are doing it wrong :-)

And I don't know what is meant by 'less overhead' but automating Excel
from another app just to retrieve data is a lot of overhead compared
with using ADO (ask any ASP programmer).

Jamie.

--