Full Version: Link to AS400 tables via ODBC with code ?
UtterAccess Discussion Forums > Microsoft® Access > Access Q and A
JoeOxfordCT
Hi All,

I'm sorry...I did a search here on UA and I found some threads on the topic but I can't get any of them to work for me. The DSN-less connections look interesting but again, I can't get them to work.

We use the Hit ODBC Driver here at our company.

http://support.attachmate.com/techdocs/1253.html

What's happened is that I have created a DB that's linked into a couple tables in the AS400. Works fine for me but when I give it to someone else to run the connections bomb. They fix the connections so it works and then when I run it next the connections bomb for me.

I am hoping to get some code that I can call from the AutoExec macro that will refresh all the linked AS400 tables.

I am open to suggestions but pardon me if I may need a little hand holding....

Joe
MikeZRed
One of the gurus here may have a better suggestion, but one option would be to split your DB into a front end/back end.

You and the "someone else" would both access the shared back end (your Access tables), but you would each use a local copy of the front end, which would contain the ODBC-linked tables to the AS400.

Your copy of the FE could be properly configured to connect from your system to the AS400, and the "someone else's" copy of the FE could be configured to connect from their system to the AS400.

I'm sure that it's possible to refresh the tables via a macro or VB code, but I've not had the opportunity to work with ODBC-linked tables, so I can't be of much help there.

MZR
JoeOxfordCT
QUOTE
You and the "someone else" would both access the shared back end (your Access tables), but you would each use a local copy of the front end, which would contain the ODBC-linked tables to the AS400.


Actually the links AS400 tables are in the FE. I never thought of putting them in the BE because I figured that there was not alot of overhead with having linked tables in the FE.......
MikeZRed
You wouldn't put ODBC-linked tables in the BE - when you accessed them through the FE, you'd end up with a link to a linked table.

Are you and the other person using separate copies of the FE ? What I meant was that in your copy of the FE (local to your computer), you link to the tables however your computer needs them to be linked. In the other person's copy of the FE (local to THEIR computer), you link to the tables however THIER computer needs them to be linked.

If I'm understanding your post correctly, you are trying to use identical FE's on two different computers that require different settings to properly connect to the AS400 tables. Using separate copies of the FE we allow you to customize those settings to the given computer.

G'luck!

MZR

P.S.
I believe you're correct that there's not a lot of overhead having linked tables in the FE. I believe there'd be greater overhead if the ODBC-linked tables were in the BE, because of the extra "link layer" in the "links to linked tables."
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.