Can I run an update Query on the MSysObjects Table?

J

John Ortt

Is there any way atall that I can run an update query on the MSysObjects
table?

I want to change the path for a linked table from "X:\Folder1" to
"Y:\Folder1" and vice versa.

Any help will be greatly appreciated.

Thanks,

John
 
M

Mike Labosh

Is there any way atall that I can run an update query on the MSysObjects

Sure you could. But then you would deserve all the evil that befalls you.
:)
I want to change the path for a linked table from "X:\Folder1" to
"Y:\Folder1" and vice versa.

Don't do it this way. It's not this simple, because Access stores other
"mojo" about linked tables than just this. Each Table (Linked or otherwise)
has a DAO TableDef object. TableDef has a Refreshlink method that does it
the right way.
 
N

Nick Coe \(UK\)

John said:
Is there any way atall that I can run an update query on
the
MSysObjects table?

I want to change the path for a linked table from
"X:\Folder1" to
"Y:\Folder1" and vice versa.

Any help will be greatly appreciated.

Thanks,

John

NO!!!!!!!!!!

Don't try to alter the meta data tables. Please don't.

Why not use a version of the linked table manager from MVPS
code:
http://www.mvps.org/access/tables/tbl0009.htm

It is a mondo bad idea to try and modify or add to the
System tables.

I'm sure there is a way to do what you want but in my moment
of panic at the idea of altering meta data I just can't
think of it.

--
Nick Coe (UK)
AccHelp v1.01 Access Application Help File Builder
http://www.alphacos.co.uk/
Download Free Copy
----
 
J

John Ortt

Thanks for the replies guys....

I'll have a look at the code you suggested as it looks like that will also
do what I want.

I'll keep you all posted.....
 
J

John Ortt


Guys,

I was trying to run a test with the above code but there was an error. Is
the code compatible with Access 97?

The specific line of code it falls over with is:

"Function fIsRemoteTable(dbRemote As DATABASE, strTbl As String) As Boolean"

And the error message is:

"Expected User defined Type, Not Project"

Sorry to keep pestering you guys.......
 
J

John Ortt

Arvin Meyer said:
Try seting a reference to DAO360.dll (Microsoft DAO 3.6 Object Library),
then disambiguating your objects like:

Function fIsRemoteTable(dbRemote As DAO.DATABASE, strTbl As String) As
Boolean

How doI do that Arvin? I am new to VB so I'm afraid nothing is obvious to
me......

Thanks,

John
 
J

John Vinson

How doI do that Arvin? I am new to VB so I'm afraid nothing is obvious to
me......

PMFJI...

Open the VBA editor. On the menu select Tools... References. If
"Microsoft DAO 3.6 Object Library" isn't checked, scroll down the
alphabetical list to find it and check it.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
T

Tom Wickerath

I suggest setting a reference to the "Microsoft DAO 3.51 Object Library" (DAO350.dll) instead.
This is the correct version to use for Access 97, which John has previously stated that he is
using.

John: In the Visual Basic Editor, click on Tools > References... If you do not already have a
reference set to this library, then scroll down the list until you find it, and place a check
mark next to it.

Tom
________________________________


Try seting a reference to DAO360.dll (Microsoft DAO 3.6 Object Library),
then disambiguating your objects like:

Function fIsRemoteTable(dbRemote As DAO.DATABASE, strTbl As String) As
Boolean
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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