
How to get a Unique File Name for Automated Export
Thanks Terry for your response.....
While I whole-heartedly agree with your approach for a temp file, I think
I'd prefer to stick with my approach of incremental file names as it
simplifies my life SO much with OLE. (No offense: You've way more experience
with this than I do....)
There _are_ time constraints... Let me clarify (over this bandwidth <g>... )
One of the projects I'm dealing with has to do with maintaining customer's
account history. I update it regularly with input from a PB db. Then using
some variables (mainly statistical constants alpha, beta, gamma), I allow
the users to export n records from the database so that Excel can do mutiple
regression analysis on these data sets overnight to create forecasts. (Yes I
know, SAS would be easier.... and I am doing SAS programming too, but for
the ease of use for clients....) Therefore, it becomes critical for me to
reduce OLE time. While your approach will work flawlessly from Access side,
it'll be a thorn in the side from XL to retrieve exported FileNames (w/o an
array) and import/open and then run regression. On the avg., with my current
method, my users can do about 100 forecasts with about avg. 10-20
regressions/run _and_ about 400 charts/run in about 4-5 hours. I'm happy
with that since it's occurring at night.....
Appreciate your response though as this is how I learn............
Dev
--
Dev Ashish
Quote:
>Hi Dev
>No sorry, I may have misled slightly in what the code does. The method I
>offered wasn't a straight API alternative to what you were doing, the code
>generates a filename automatically, you cant predict what it is going to
>give back except for the first three characters.
>I use it for things like automated compacting of a database, where I want
to
>be sure that the temporary file that I create during the compact has got a
>unique filename rather than hardcoding it.
>To do what you are talking about below I would follow pretty much the same
>logic as in your last paragraph, in order to use the API method you would
>have to do something similar to your passing an array.