Multiple BE's & CurrentDB

D

dymondjack

Quick question...

If I have a front end that has linked tables from two or more back ends, can
I use CurrentDB in the frontend programming and have the link find the right
backend, or will I need to set a db variable to the backend that the table is
linked to?

Thanks in advance, it would take a little bit to test this so I'm hoping
someone knows off the top of their head.

--
Jack Leach
www.tristatemachine.com

- "Success is the ability to go from one failure to another with no loss of
enthusiasm." - Sir Winston Churchill
 
T

tina

well, perhaps it depends on the context in which you're using CurrentDb. i
can say that i use it to execute SQL statements, open recordsets in code,
and so on, and my frontend (in A97) is linked to multiple backends and
several text files. i don't do anything to tell Access what backend i might
be using data from.

hth
 
D

dymondjack

Thanks, thats what I was looking for, queries and rs's. First time working
off multiple back ends and wasn't sure.

I would image any table or relationship operations would require explicit
declarations but I don't expect to be doing that as of yet.

thanks again
--
Jack Leach
www.tristatemachine.com

- "Success is the ability to go from one failure to another with no loss of
enthusiasm." - Sir Winston Churchill
 
J

John W. Vinson

Quick question...

If I have a front end that has linked tables from two or more back ends, can
I use CurrentDB in the frontend programming and have the link find the right
backend, or will I need to set a db variable to the backend that the table is
linked to?

Thanks in advance, it would take a little bit to test this so I'm hoping
someone knows off the top of their head.

CurrentDb will refer to your frontend database. If you have linked tables,
they'll all be in CurrentDb's Tabledefs collection (as linked tables),
regardless of in which backend the table resides.

If you need to specifically do something (e.g. change a table's structure) in
one of the backend databases then you will indeed need to use the OpenDatabase
method on that database, rather than using CurrentDb.
 
T

Tony Toews [MVP]

dymondjack said:
I would image any table or relationship operations would require explicit
declarations but I don't expect to be doing that as of yet.

Correct. You can't do those in the FE against the linked tables so you
have to point to the BE explicitly.

When you do get there though consider Compare'Em
http://home.gci.net/~mike-noel/CompareEM-LITE/CompareEM.htm

While it has its quirks this utility does work for me.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
D

david

Linked tables can always connect to the correct BE.
You can have a many as you want in as many places
as you want.

The only problem is that the linked table manager is very
slow if you need to re-link to multiple Back Ends. Try
to group your tables so that you can re-link a group of
tables instead of having to do them one at a time.


Declarative Referential Integrity, enforced relations and
cascading updates and cascading deletes. Don't work
between tables in different BE files.

(david)
 
D

dymondjack

Thanks for the tips.

As an alternative to the linked table manager, you may want to check out
Dev's function for relinking tables if you haven't already seen it.

http://www.mvps.org/access/tables/tbl0009.htm

It's been a long time since I used the manager so I don't know if one's
better than the other, but I use Dev's code with my current single backend
and intended customizing it a little to run multiple backs if need be. I
don't think I have to though, it checks for local vs remote tables, and I
assume it probably relinks to the correct backend via the tabledef, but I
would have to check, I haven't looked at the code in a while.


The relationship restriction shouldn't be too bad, but I definately need to
give thought to my "base" primary keys before running with it.

Thanks again!

--
Jack Leach
www.tristatemachine.com

- "Success is the ability to go from one failure to another with no loss of
enthusiasm." - Sir Winston Churchill
 
A

aaron.kempf

Please ignore Tony Toew's posting as Tony's answer to just about
every question is linked tables and jets. No matter how appropriate
his
response.

Aaron Kempf
MCITP: DBA SQL 2005
 
D

dymondjack

I'm not sure I follow your logic here Aaron.

Tony answered a specific question I asked, and then provided a link for
something that I might find helpful in the future.

If it seems as though his answers 'to just about every question is linked
tables', well, my question happened to relate to linked tables.

Why would I not pay attention, 'no matter how appropriate his response'? If
his response in appropriate, I will pay attention. If not, I won't.

Maybe you can shed some more light on what I should be disregarding in his
post... I can't seem to see anything.

--
Jack Leach
www.tristatemachine.com

- "Success is the ability to go from one failure to another with no loss of
enthusiasm." - Sir Winston Churchill
 
D

dymondjack

I do remember seeing this before... reading some thread a month or so ago
that had all sorts of ridiculous comments. And now that you mentioned it it
clicked that a poster by the name of Aaron (and apparently some cronies) were
the ones stirring things up, particularly with Tony and David Fenton.

It was rather amusing really... if there was any two people I would try and
avoid picking fights with, it would probably be those two. And the comments
and 'arguments' from the other end could have been used as textbook examples
of how to be absolutely ludicrous.

So, thanks for pointing that out, I might not have made the connection
without it, but from here on out it shouldn't be too hard to remember to
ignore this one...

Nothing like making a nice name for yourself on the internets where everyone
can see and it never goes away!! :)

--
Jack Leach
www.tristatemachine.com

- "Success is the ability to go from one failure to another with no loss of
enthusiasm." - Sir Winston Churchill
 
T

Tony Toews [MVP]

dymondjack said:
It was rather amusing really... if there was any two people I would try and
avoid picking fights with, it would probably be those two.

Thanks for your kind words. Although there are lots of other very
competent folks including Gina.
And the comments
and 'arguments' from the other end could have been used as textbook examples
of how to be absolutely ludicrous.

Nothing like making a nice name for yourself on the internets where everyone
can see and it never goes away!! :)

Indeed.

1) Visit Aaron Kempf's Google Profile
http://groups.google.ca/groups/prof...AClWkNjdi7eVtyYt8oOaw949h3i3SmjGmAJbX05nZ-8fQ
and search for the bad words. You know the ones George Carlin liked
to rattle off. Actually just click on every second or third posting.
That will be sufficient.

2) Start here: http://dw.courts.wa.gov/index.cfm?fa=home.home

Click on Name Search, accept the agreement, and enter Aaron's name.

Look at item #24:
Kempf, Aaron Alexander
Defendant King Co Superior Ct
07-1-05748-6 07-05-2007

Now look at item #27 in this listing:
27 10-25-2007 STTDFG Statement Of Defendant,plea Guilty

3) The 2007 Microsoft Access newsgroup problem.
http://tonytoews.com/disruptions2007.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
D

dymondjack

there are lots of other very
competent folks including Gina.

I often feel bad because I tend to name certain people... for instance I'll
generally suggest Allen Browne's or Crystal's tips pages to beginners, mostly
because they are the two easiest for me to remember. Obviously there are
many many people here (MVP's and 'normal people' alike) who contribute, and
by no means do I purposely single out certain people.

So if you're reading this and I don't tend to mention your name in posts, no
offense.


In any case, I certainly have no desire to be part of any public argument
that might arise, so I'm going to step out of this thread now. Thanks all
for your help (those that helped, that is....)

--
Jack Leach
www.tristatemachine.com

- "Success is the ability to go from one failure to another with no loss of
enthusiasm." - Sir Winston Churchill
 
R

RD

Aaron is a troll. Most of the regulars here plonked him ages ago. I
used to read his ridiculous rants for entertainment but his single
note wore thin pretty quickly and I plonked him, too.

Do yourself a favor. Aaron has nothing constructive to say.

RD
 

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