Use a relative path to link to back-end?

C

Carl Rapson

I have a database that is split into a front-end (.mde) and a back-end
(.mdb), with the BE residing on a server and the FE installed on each user's
computer. I use several temporary tables in my application, and I currently
have these temporary tables defined in the FE to avoid any multi-user
problems. But, as the application runs, the FE slowly increases in size as
the temporary tables are continuously populated and de-populated. What I
would like to do is move the temporary tables to a separate .mdb file, which
would reside in the same location as the FE file. That way, each user would
still have his/her own copy of the temporary tables, and the use of the
temporary tables wouldn't cause bloat in the FE.

I'm not sure how to do this, as it would require changing the path to the
temporary tables for each user. It looks like linked tables can only use an
absolute path, not a relative path. I could attach to the temporary tables
at application start-up, but I understand that just the act of linking to
tables can also cause bloat over a period of time. So, my question is, is
there any way of maintaining a link to tables through a relative path?
Alternatively, is there any way of linking to tables at run-time without
causing the FE to slowly increase in size?

Thanks for any information,

Carl Rapson
 
A

Allen Browne

You cannot use a relative path in the Connect property of a TableDef.

Relinking should not cause bloat if you only change the Connect property
(and RefeshLink) if the current path is not valid. People don't generally
move the file to a different folder very often.

For an example of code that relinks based on the path of the current db,
see:
http://members.iinet.net.au/~allenbrowne/ser-13.html
 
C

Carl Rapson

Thanks for the information about Connect. I'll look at the code you
suggested.

Carl
 

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