Problem copying data with ADO

D

deepakmehta

Hi folks, :confused:

I have 2 workbooks A & B. workbook A is the master file and workbook B
is the user file. Both files are in use at any given time but on
different systems.

My problem is that when i try to extract data (using ADO) form file B
into the master file A, i can do so only when the file B is closed.

If file B is already open and in use by any user, running the macro
causes File B to open in read only mode instead of copying the data.

I just want the data on B, i don't want it to open.

Please help me with this.....

Deepak
 
D

deepakmehta

Hi

I have duplicated the issue with the test files provided on your site.

You should be on a network to get this issue. The issue only arise
when a user opens the text.xls file on another system on my network an
i try to run the ado tester.xls from my system.


Thanks,

Deepa
 
G

Guest

It sounds to me like you need to look at the connection's CursorLocation
property. Setting this to client-side gives you full access to the data
because it's "disconnected" from the server-side. You can update it whenever,
but you'll have unrestricted access to the current (as of last update) data
meanwhile.

Here's a link to some samples/examples that might help.

http://www.appspro.com/conference/DatabaseProgramming.zip

The package includes a Word document named "DatabaseProgramming.doc". Read
it through fully.

HTH
Regards,
Garry
 
D

deepakmehta

I tried the cursor location thing and much more ado stuff, but i a
still not able to stop the file B form opening.

what troubles me most is that i can get the data from B when it i
closed but if it is in use by another user on another computer then th
ado opens the file B in read only mode and then copies the data.......
i just dont want the file B to open (i just want the data) :mad
:confused: .........

Thanks anyway guys for your help.... lemme know if you find some cur
for this


Deepa
 
G

Guest

what troubles me most is that i can get the data from B when it is closed but if it is in use...>

Doesn't this suggest to you that everyone using ADO across your network
should get on the same page about "how" they use it? The most efficient way
to work with a database that is used by multiple people this way is to get
in, get out, and update only as needed. If all users follow this protocol, it
will work better for everyone.

HTH
Regards,
Garry
 
D

deepakmehta

Dear Garry,

The problem here is that i am only one using ADO in my excel file A to
recieve data form excel file B.

Note : If excel file B is open by any user (other than myself), when i
run the macro on A, file B opens up in readonly mode.... (to copy data
using ADO).

I do not want this file to open. I just want the Data.


Regards,
Deepak
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top