473,471 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

multitasking movefile and running queries?

Hello access friends,

(Originally posted on access.formsprogramming which I think was the
wrong place)

I'm precalculating a bunch of data for my clients as per a profile I
have for each of them. Each data set that I generate, I put into an
separate Access file which I eventually move to a server location that
the particular client and I share access to.
Currently there are 10 clients, but this is expected to go up
considerable, and each of the precalculated data sets requires 25-30
minutes to generate (200+ Mb files). I have a form which does a batch
process to generate all of the files locally and then I go through the
files and manually post them up to the servers spaces.
What I'd like to do is include the manual moving of the files to the
server locations in the batch process however I have found that it is
quicker to do it manually because the code has to wait until it has
sent each file before continuing with the next batch item.
Anyone know how to just start transferring and move on to the next
record to start precalculating the next file before the file transfer
is complete?
The file transfer can take 30+ minutes depending on the location (some
are in Asia) and so its entirely possible that multiple files could be
transferring at the same time (when I do this manually this obviously
happens because all the file are ready to go).
I have been playing around with the following code:
Sub transfer(str_file As String, str_dest_location As String)
Dim fs As Variant
Set fs = CreateObject("Scripting.FileSystemObject")
fs.MoveFile str_file, str_dest_location
Set fs = Nothing
End Sub
Sub call_test()
Dim a As String
Dim b As String
a = "\\xxx-fs01\ClientLocation\TESTFile.xls"
b = "C:\Temp\TEST\TESTFile.xls"
Call transfer(b, a)
End Sub
My thinking is that I could either:
- cause another form, instance of access or an excel application to
load for each transfer which independently initiates the transfer
although I'm not convinced that pause in the code would go away.
- use a different method which I'm unaware of
Any ideas?

Oct 14 '06 #1
6 2102
On 14 Oct 2006 03:58:42 -0700, "Mat N" <Ma******@gmail.comwrote:

Indeed a second instance of Access would do it.
So would a simple batch file spawned by the Shell command.

-Tom.

>Hello access friends,

(Originally posted on access.formsprogramming which I think was the
wrong place)

I'm precalculating a bunch of data for my clients as per a profile I
have for each of them. Each data set that I generate, I put into an
separate Access file which I eventually move to a server location that
the particular client and I share access to.
Currently there are 10 clients, but this is expected to go up
considerable, and each of the precalculated data sets requires 25-30
minutes to generate (200+ Mb files). I have a form which does a batch
process to generate all of the files locally and then I go through the
files and manually post them up to the servers spaces.
What I'd like to do is include the manual moving of the files to the
server locations in the batch process however I have found that it is
quicker to do it manually because the code has to wait until it has
sent each file before continuing with the next batch item.
Anyone know how to just start transferring and move on to the next
record to start precalculating the next file before the file transfer
is complete?
The file transfer can take 30+ minutes depending on the location (some
are in Asia) and so its entirely possible that multiple files could be
transferring at the same time (when I do this manually this obviously
happens because all the file are ready to go).
I have been playing around with the following code:
Sub transfer(str_file As String, str_dest_location As String)
Dim fs As Variant
Set fs = CreateObject("Scripting.FileSystemObject")
fs.MoveFile str_file, str_dest_location
Set fs = Nothing
End Sub
Sub call_test()
Dim a As String
Dim b As String
a = "\\xxx-fs01\ClientLocation\TESTFile.xls"
b = "C:\Temp\TEST\TESTFile.xls"
Call transfer(b, a)
End Sub
My thinking is that I could either:
- cause another form, instance of access or an excel application to
load for each transfer which independently initiates the transfer
although I'm not convinced that pause in the code would go away.
- use a different method which I'm unaware of
Any ideas?
Oct 14 '06 #2
Ooo...that's good. Bat file is a lot simpler. I'll give it a go and let
you know thanks.

Mat N

Tom van Stiphout wrote:
On 14 Oct 2006 03:58:42 -0700, "Mat N" <Ma******@gmail.comwrote:

Indeed a second instance of Access would do it.
So would a simple batch file spawned by the Shell command.

-Tom.

Hello access friends,

(Originally posted on access.formsprogramming which I think was the
wrong place)

I'm precalculating a bunch of data for my clients as per a profile I
have for each of them. Each data set that I generate, I put into an
separate Access file which I eventually move to a server location that
the particular client and I share access to.
Currently there are 10 clients, but this is expected to go up
considerable, and each of the precalculated data sets requires 25-30
minutes to generate (200+ Mb files). I have a form which does a batch
process to generate all of the files locally and then I go through the
files and manually post them up to the servers spaces.
What I'd like to do is include the manual moving of the files to the
server locations in the batch process however I have found that it is
quicker to do it manually because the code has to wait until it has
sent each file before continuing with the next batch item.
Anyone know how to just start transferring and move on to the next
record to start precalculating the next file before the file transfer
is complete?
The file transfer can take 30+ minutes depending on the location (some
are in Asia) and so its entirely possible that multiple files could be
transferring at the same time (when I do this manually this obviously
happens because all the file are ready to go).
I have been playing around with the following code:
Sub transfer(str_file As String, str_dest_location As String)
Dim fs As Variant
Set fs = CreateObject("Scripting.FileSystemObject")
fs.MoveFile str_file, str_dest_location
Set fs = Nothing
End Sub
Sub call_test()
Dim a As String
Dim b As String
a = "\\xxx-fs01\ClientLocation\TESTFile.xls"
b = "C:\Temp\TEST\TESTFile.xls"
Call transfer(b, a)
End Sub
My thinking is that I could either:
- cause another form, instance of access or an excel application to
load for each transfer which independently initiates the transfer
although I'm not convinced that pause in the code would go away.
- use a different method which I'm unaware of
Any ideas?
Oct 14 '06 #3
Ooo...that's good. Bat file is a lot simpler. I'll give it a go and let
you know thanks.

Mat N

Tom van Stiphout wrote:
On 14 Oct 2006 03:58:42 -0700, "Mat N" <Ma******@gmail.comwrote:

Indeed a second instance of Access would do it.
So would a simple batch file spawned by the Shell command.

-Tom.

Hello access friends,

(Originally posted on access.formsprogramming which I think was the
wrong place)

I'm precalculating a bunch of data for my clients as per a profile I
have for each of them. Each data set that I generate, I put into an
separate Access file which I eventually move to a server location that
the particular client and I share access to.
Currently there are 10 clients, but this is expected to go up
considerable, and each of the precalculated data sets requires 25-30
minutes to generate (200+ Mb files). I have a form which does a batch
process to generate all of the files locally and then I go through the
files and manually post them up to the servers spaces.
What I'd like to do is include the manual moving of the files to the
server locations in the batch process however I have found that it is
quicker to do it manually because the code has to wait until it has
sent each file before continuing with the next batch item.
Anyone know how to just start transferring and move on to the next
record to start precalculating the next file before the file transfer
is complete?
The file transfer can take 30+ minutes depending on the location (some
are in Asia) and so its entirely possible that multiple files could be
transferring at the same time (when I do this manually this obviously
happens because all the file are ready to go).
I have been playing around with the following code:
Sub transfer(str_file As String, str_dest_location As String)
Dim fs As Variant
Set fs = CreateObject("Scripting.FileSystemObject")
fs.MoveFile str_file, str_dest_location
Set fs = Nothing
End Sub
Sub call_test()
Dim a As String
Dim b As String
a = "\\xxx-fs01\ClientLocation\TESTFile.xls"
b = "C:\Temp\TEST\TESTFile.xls"
Call transfer(b, a)
End Sub
My thinking is that I could either:
- cause another form, instance of access or an excel application to
load for each transfer which independently initiates the transfer
although I'm not convinced that pause in the code would go away.
- use a different method which I'm unaware of
Any ideas?
Oct 14 '06 #4
I'm a bit rusty on the BAT file syntax so I started there and
unfortunately I don't think it is possible to refer to a server
location without a drive letter assigned to it and I don't think you
can assign a drive letter on the fly in the BAT file either (although
this is perhaps possible in VBA?).

Unfortunately as each of the server locations is a truly different
server the simplest solution would require a different drive letter to
each one however with potentially 20+ locations this would be difficult
as I might run out of letters. I would also have to rely on the IT
administrators preserving these mappings whenever they send an update
which is fairly risky.

Assigning drive letters on the fly could also be problematic because it
maybe possible for the next file transfer to initiate before the last
has completed.

Let me know if I'm misguided. I'm going to give the seperate instance
of access or excel idea a go.

Thanks

Mat N wrote:
Ooo...that's good. Bat file is a lot simpler. I'll give it a go and let
you know thanks.

Mat N

Tom van Stiphout wrote:
On 14 Oct 2006 03:58:42 -0700, "Mat N" <Ma******@gmail.comwrote:

Indeed a second instance of Access would do it.
So would a simple batch file spawned by the Shell command.

-Tom.

>Hello access friends,
>
>(Originally posted on access.formsprogramming which I think was the
>wrong place)
>
>I'm precalculating a bunch of data for my clients as per a profile I
>have for each of them. Each data set that I generate, I put into an
>separate Access file which I eventually move to a server location that
>the particular client and I share access to.
>
>
>Currently there are 10 clients, but this is expected to go up
>considerable, and each of the precalculated data sets requires 25-30
>minutes to generate (200+ Mb files). I have a form which does a batch
>process to generate all of the files locally and then I go through the
>files and manually post them up to the servers spaces.
>
>
>What I'd like to do is include the manual moving of the files to the
>server locations in the batch process however I have found that it is
>quicker to do it manually because the code has to wait until it has
>sent each file before continuing with the next batch item.
>
>
>Anyone know how to just start transferring and move on to the next
>record to start precalculating the next file before the file transfer
>is complete?
>
>
>The file transfer can take 30+ minutes depending on the location (some
>are in Asia) and so its entirely possible that multiple files could be
>transferring at the same time (when I do this manually this obviously
>happens because all the file are ready to go).
>
>
>I have been playing around with the following code:
>
>
>Sub transfer(str_file As String, str_dest_location As String)
>Dim fs As Variant
>
>
>Set fs = CreateObject("Scripting.FileSystemObject")
>fs.MoveFile str_file, str_dest_location
>Set fs = Nothing
>
>
>End Sub
>
>
>Sub call_test()
>Dim a As String
>Dim b As String
>
>
>a = "\\xxx-fs01\ClientLocation\TESTFile.xls"
>b = "C:\Temp\TEST\TESTFile.xls"
>
>
>Call transfer(b, a)
>
>
>End Sub
>
>
>My thinking is that I could either:
>- cause another form, instance of access or an excel application to
>load for each transfer which independently initiates the transfer
>although I'm not convinced that pause in the code would go away.
>- use a different method which I'm unaware of
>
>
>Any ideas?
Oct 19 '06 #5
Per
Mat,

You can assign drive letters on the fly in BAT commands using the net
use command. But you argue that this is not ideal.

For copying files, you can use the xcopy command, which allows use of
UNC paths for source or destination.

Hope this helps.

/Per

Mat N wrote:
I'm a bit rusty on the BAT file syntax so I started there and
unfortunately I don't think it is possible to refer to a server
location without a drive letter assigned to it and I don't think you
can assign a drive letter on the fly in the BAT file either (although
this is perhaps possible in VBA?).

Unfortunately as each of the server locations is a truly different
server the simplest solution would require a different drive letter to
each one however with potentially 20+ locations this would be difficult
as I might run out of letters. I would also have to rely on the IT
administrators preserving these mappings whenever they send an update
which is fairly risky.

Assigning drive letters on the fly could also be problematic because it
maybe possible for the next file transfer to initiate before the last
has completed.

Let me know if I'm misguided. I'm going to give the seperate instance
of access or excel idea a go.

Thanks

Mat N wrote:
Ooo...that's good. Bat file is a lot simpler. I'll give it a go and let
you know thanks.

Mat N

Tom van Stiphout wrote:
On 14 Oct 2006 03:58:42 -0700, "Mat N" <Ma******@gmail.comwrote:
>
Indeed a second instance of Access would do it.
So would a simple batch file spawned by the Shell command.
>
-Tom.
>
>
Hello access friends,

(Originally posted on access.formsprogramming which I think was the
wrong place)

I'm precalculating a bunch of data for my clients as per a profile I
have for each of them. Each data set that I generate, I put into an
separate Access file which I eventually move to a server location that
the particular client and I share access to.


Currently there are 10 clients, but this is expected to go up
considerable, and each of the precalculated data sets requires 25-30
minutes to generate (200+ Mb files). I have a form which does a batch
process to generate all of the files locally and then I go through the
files and manually post them up to the servers spaces.


What I'd like to do is include the manual moving of the files to the
server locations in the batch process however I have found that it is
quicker to do it manually because the code has to wait until it has
sent each file before continuing with the next batch item.


Anyone know how to just start transferring and move on to the next
record to start precalculating the next file before the file transfer
is complete?


The file transfer can take 30+ minutes depending on the location (some
are in Asia) and so its entirely possible that multiple files could be
transferring at the same time (when I do this manually this obviously
happens because all the file are ready to go).


I have been playing around with the following code:


Sub transfer(str_file As String, str_dest_location As String)
Dim fs As Variant


Set fs = CreateObject("Scripting.FileSystemObject")
fs.MoveFile str_file, str_dest_location
Set fs = Nothing


End Sub


Sub call_test()
Dim a As String
Dim b As String


a = "\\xxx-fs01\ClientLocation\TESTFile.xls"
b = "C:\Temp\TEST\TESTFile.xls"


Call transfer(b, a)


End Sub


My thinking is that I could either:
- cause another form, instance of access or an excel application to
load for each transfer which independently initiates the transfer
although I'm not convinced that pause in the code would go away.
- use a different method which I'm unaware of


Any ideas?
Oct 20 '06 #6
Per,

This has been a great help thanks.

"xcopy" does indeed work with UNC Paths however I haven't been able to
get it to work with Paths which include a space. I tried quotation
marks around the pathname but without success.

Fortunately "net use" does seem to work with Paths including space so
long as you do use quotation marks. Its not ideal because I expect to
be transferring multiple files at the same time to different location
which means that I will have to create code which manages the mapping
of the drives to avoid running out of drives to map and/or
disconnecting mapped drives which should be. Nonetheless I think a net
use / xcopy combination is the best answer.

In case anyone else comes across this post I'm planning to use the
follow additional items which I hope will help avoid mapping too many
drives or removing drives which are supposed to be mapped permenantly:
Drives collection
Driveexists method
DriveLetter property

This are all in the access help.

Multitasking here we come.

Mat N

Per wrote:
Mat,

You can assign drive letters on the fly in BAT commands using the net
use command. But you argue that this is not ideal.

For copying files, you can use the xcopy command, which allows use of
UNC paths for source or destination.

Hope this helps.

/Per

Mat N wrote:
I'm a bit rusty on the BAT file syntax so I started there and
unfortunately I don't think it is possible to refer to a server
location without a drive letter assigned to it and I don't think you
can assign a drive letter on the fly in the BAT file either (although
this is perhaps possible in VBA?).

Unfortunately as each of the server locations is a truly different
server the simplest solution would require a different drive letter to
each one however with potentially 20+ locations this would be difficult
as I might run out of letters. I would also have to rely on the IT
administrators preserving these mappings whenever they send an update
which is fairly risky.

Assigning drive letters on the fly could also be problematic because it
maybe possible for the next file transfer to initiate before the last
has completed.

Let me know if I'm misguided. I'm going to give the seperate instance
of access or excel idea a go.

Thanks

Mat N wrote:
Ooo...that's good. Bat file is a lot simpler. I'll give it a go and let
you know thanks.
>
Mat N
>
Tom van Stiphout wrote:
On 14 Oct 2006 03:58:42 -0700, "Mat N" <Ma******@gmail.comwrote:

Indeed a second instance of Access would do it.
So would a simple batch file spawned by the Shell command.

-Tom.


>Hello access friends,
>
>(Originally posted on access.formsprogramming which I think was the
>wrong place)
>
>I'm precalculating a bunch of data for my clients as per a profile I
>have for each of them. Each data set that I generate, I put into an
>separate Access file which I eventually move to a server location that
>the particular client and I share access to.
>
>
>Currently there are 10 clients, but this is expected to go up
>considerable, and each of the precalculated data sets requires 25-30
>minutes to generate (200+ Mb files). I have a form which does a batch
>process to generate all of the files locally and then I go through the
>files and manually post them up to the servers spaces.
>
>
>What I'd like to do is include the manual moving of the files to the
>server locations in the batch process however I have found that it is
>quicker to do it manually because the code has to wait until it has
>sent each file before continuing with the next batch item.
>
>
>Anyone know how to just start transferring and move on to the next
>record to start precalculating the next file before the file transfer
>is complete?
>
>
>The file transfer can take 30+ minutes depending on the location (some
>are in Asia) and so its entirely possible that multiple files could be
>transferring at the same time (when I do this manually this obviously
>happens because all the file are ready to go).
>
>
>I have been playing around with the following code:
>
>
>Sub transfer(str_file As String, str_dest_location As String)
>Dim fs As Variant
>
>
>Set fs = CreateObject("Scripting.FileSystemObject")
>fs.MoveFile str_file, str_dest_location
>Set fs = Nothing
>
>
>End Sub
>
>
>Sub call_test()
>Dim a As String
>Dim b As String
>
>
>a = "\\xxx-fs01\ClientLocation\TESTFile.xls"
>b = "C:\Temp\TEST\TESTFile.xls"
>
>
>Call transfer(b, a)
>
>
>End Sub
>
>
>My thinking is that I could either:
>- cause another form, instance of access or an excel application to
>load for each transfer which independently initiates the transfer
>although I'm not convinced that pause in the code would go away.
>- use a different method which I'm unaware of
>
>
>Any ideas?
Oct 24 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil Frost | last post by:
A brief introduction for python-list: Unununium is an OS being developed in Python wherever possible. This message is phrased for the Unununium list, but as the questions are about hacking cPython,...
5
by: PeteCresswell | last post by:
Access tends to take over my machine when I run long queries. The queries in question are Append queries. Some of the jobs we're talking about run 45 minutes to an hour...so the loss in...
1
by: Shelley | last post by:
Hi Everyone, Does anyone know what object it is in the MoveFile Method object.MoveFile source, destination in access? Any help will be highly appreciated!
15
by: Wilfried Mestdagh | last post by:
Hi, After various question (here and on other places) it seems prremtive multitasking is the way to go with .NET. But wat about coorporative multitasking ? While this was so powerfull and easy...
0
by: RSH | last post by:
I have an ASP page that needs to move a file from one directory to another. The code is quite simple but I can't seem to get it to work. I keep getting a "Download Error: Procedure call or...
2
by: RSH | last post by:
I have an ASP page that needs to move a file from one directory to another. The code is quite simple but I can't seem to get it to work. I keep getting a "Download Error: Procedure call or...
4
by: b00gieman | last post by:
Hello! I'm using the MoveFile method for moving files between 2 servers , one running my asp script and the other running my database.My problem is that I'm getting the error: Microsoft VBScript...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.