Author Topic: Find File from Access instead of hard coding file path  (Read 2574 times)

0 Members and 1 Guest are viewing this topic.

M-dub

  • Guest
Find File from Access instead of hard coding file path
« on: November 09, 2004, 02:50:05 PM »
How difficult would it be for an Access application to perform a search on the file system for a file dependant on a couple of variables?  (This is kind of difficult to explain in few words...)
More imporantly, how long would it take to search for a file in a single directory?  My boss was saying something about a FindFast API or OCX.

(just to get the ball rolling...)

hendie

  • Guest
Find File from Access instead of hard coding file path
« Reply #1 on: November 09, 2004, 03:19:54 PM »
Mike, have a look at this site and in particular,  ~ this thread

there's a wealth of information there for VBA'ers


(damn, I just gave my secret away !)

M-dub

  • Guest
Find File from Access instead of hard coding file path
« Reply #2 on: November 09, 2004, 03:26:19 PM »
Awesome, Hendie!  Thanks!

Now, I have to try to convince the boss that this is the way to go!  (It would save me and a few others lots of work!)

MP

  • Seagull
  • Posts: 17400
Find File from Access instead of hard coding file path
« Reply #3 on: November 09, 2004, 03:41:10 PM »
Using the File System Object is convenient, but if you want performance I'm guessing going straight to the WinAPI, using FindFirstFile and FindNextFile would be far faster, especially if it were coded up in VC++ (compiled to dll useable in any AX supporting language).

Sample Visual BASIC implementation here.
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

M-dub

  • Guest
Find File from Access instead of hard coding file path
« Reply #4 on: November 09, 2004, 03:49:47 PM »
Argh!! :evil:

Quote from: The Boss
Mike,

We are not considering a find utility.  Renaming the files makes it simpler for all using and updating these files with spec sheets, config info, etc. in the future.  It also ensures we do not get duplicate files as the drawing names change...


I do NOT agree!!!

MP

  • Seagull
  • Posts: 17400
Find File from Access instead of hard coding file path
« Reply #5 on: November 09, 2004, 04:00:51 PM »
Even without knowing the context of that staement it sounds like short term convenience, long term pain.

PS -- In the interests of employment longevity, I'd edit your post M-Dub.
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

M-dub

  • Guest
Find File from Access instead of hard coding file path
« Reply #6 on: November 10, 2004, 08:10:06 AM »
Thanks for the tip, but I said the same thing to him.  He knows that I don't agree, but hey...Who am I and what does my opinion matter?  I'm only the guy who would be doing 85% of the work with this system and it really doesn't impact anyone else.  I dunno...I'll admit they have a bit of a point, but I don't see how it makes sense to fit the files to the program...it would be easier to fit the program to the files...IMHO, anyway.