Script to query code within mdb

  • Thread starter Thread starter Todd Sowter
  • Start date Start date
T

Todd Sowter

Hi,

I am undertaking a large data migration project which will end up giving
users new drive mappings and possibly new directory paths. Some of the data
that will be moved includes access databases that may include code with text
strings of drive letters or unc paths. For example a button action that
copies files from local drive c:\data to a network drive K:\Backup.

I am hoping there is some way to use vbscript (or alternative) to open the
mdb file code as an object, read the text and then search through the text
for certain strings (ie "k:\" or \\server etc).

Can this be done? Can you tell me where I can find info on this?

Todd
 
Todd Sowter said:
Hi,

I am undertaking a large data migration project which will end up giving
users new drive mappings and possibly new directory paths. Some of the data
that will be moved includes access databases that may include code with text
strings of drive letters or unc paths. For example a button action that
copies files from local drive c:\data to a network drive K:\Backup.

I am hoping there is some way to use vbscript (or alternative) to open the
mdb file code as an object, read the text and then search through the text
for certain strings (ie "k:\" or \\server etc).

Can this be done? Can you tell me where I can find info on this?

Er, Google? Searching on: search ms access database for text string
gives 102,000 hits, some of which are clearly relevent.

But I suggest not writing code to do this. There are many contexts where
strings can occur but *not* be shown by a simple search of the VBA code; for
example, when it occurs in the Tag property of a control. So I would be
tempted to purchase a commercial utility for this, rather than re-inventing
the wheel.

And you *are* going to move those strings to the registry, aren't you? :-)

HTH,
TC
 
Back
Top