473,804 Members | 3,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re-linking database through code

Hi

I have a front/back end scenario for my access app. I need to allow user to
connect the front end to one of two back ends at start time. Presumably this
needs linking to the relevant back end using vba code. How is this achieved?

Thanks

Regards
Nov 12 '05 #1
6 1858
Check http://www.mvps.org/access/tables/tbl0009.htm at "The Access Web" for
one approach.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"news.dsl.pipex .com" <jo**@nospam.in fovis.co.uk> wrote in message
news:40******** *************** @news.dial.pipe x.com...
Hi

I have a front/back end scenario for my access app. I need to allow user to connect the front end to one of two back ends at start time. Presumably this needs linking to the relevant back end using vba code. How is this achieved?
Thanks

Regards

Nov 12 '05 #2
news.dsl.pipex. com wrote:
Hi

I have a front/back end scenario for my access app. I need to allow
user to connect the front end to one of two back ends at start time.
Presumably this needs linking to the relevant back end using vba
code. How is this achieved?

Thanks

Regards


Many people use code that does the following:

For each table...
-attempt to open the table in code
-when the first table fails to open relink all tables (look in current
folder or a stored folder name, else prompt user for location)

I've found attempting to open each table to see if it opens can be a
little slow over a network. Instead I do the following to test the
links:

For each tabledef...
-get the file/folder name in from the link property
-test that the file/folder exists
-if the data file exists test that the tabledef exists in that database
-when the first test fails relink all tables (look in current folder or
a stored folder name, else prompt user for location)

You can be smarter and just relink the tables that failed but I haven't
found it worth the effort:)

Also, instead of relinking the tables you can also look at just deleting
the tabledefs and creating new ones...

ps. If you need a sample of code to relink let me know... I've got a
simplified version I wrote to attach to different data files (so my
Access app acts like Word in that you have to open a "doc" which in this
case is a seperate data file)
--
regards,

Bradley

Nov 12 '05 #3
"Bradley" <br*****@REMOVE THIScomcen.com. au> wrote:
I've found attempting to open each table to see if it opens can be a
little slow over a network. Instead I do the following to test the
links:

For each tabledef...
-get the file/folder name in from the link property
-test that the file/folder exists
-if the data file exists test that the tabledef exists in that database
-when the first test fails relink all tables (look in current folder or
a stored folder name, else prompt user for location)


FWIW once you've relinked the first table open a recordset against that table. Then
relink the rest of the tables and close the recordset. Relinking will go much
faster.

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
Nov 12 '05 #4
Tony Toews wrote:
"Bradley" <br*****@REMOVE THIScomcen.com. au> wrote:
I've found attempting to open each table to see if it opens can be a
little slow over a network. Instead I do the following to test the
links:

For each tabledef...
-get the file/folder name in from the link property
-test that the file/folder exists
-if the data file exists test that the tabledef exists in that
database
-when the first test fails relink all tables (look in current folder
or a stored folder name, else prompt user for location)


FWIW once you've relinked the first table open a recordset against
that table. Then relink the rest of the tables and close the
recordset. Relinking will go much faster.

Tony


Thanks I'll try that.

The biggest concern was having the link check running slowly as it
happens every startup :)

I assume you leave the recordset open while you relink the other
tables...
--
regards,

Bradley
Nov 12 '05 #5
"Bradley" <br*****@REMOVE THIScomcen.com. au> wrote:
The biggest concern was having the link check running slowly as it
happens every startup :)
Agreed
I assume you leave the recordset open while you relink the other
tables...


Yes. That was clear in my mind but when I reread my posting I see that it could use
some clarification. <smile>

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
Nov 12 '05 #6
Tony Toews wrote:
"Bradley" <br*****@REMOVE THIScomcen.com. au> wrote:
The biggest concern was having the link check running slowly as it
happens every startup :)


Agreed
I assume you leave the recordset open while you relink the other
tables...


Yes. That was clear in my mind but when I reread my posting I see
that it could use some clarification. <smile>

Tony


Works great thanks... in one test it was a quarter the time! That's a
good difference.
--
regards,

Bradley
Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4325
by: Nel | last post by:
I have a question related to the "security" issues posed by Globals ON. It is good programming technique IMO to initialise variables, even if it's just $foo = 0; $bar = ""; Surely it would be better to promote better programming than rely on PHP to compensate for lazy programming?
4
6431
by: Craig Bailey | last post by:
Anyone recommend a good script editor for Mac OS X? Just finished a 4-day PHP class in front of a Windows machine, and liked the editor we used. Don't recall the name, but it gave line numbers as well as some color coding, etc. Having trouble finding the same in an editor that'll run on OS X. -- Floydian Slip(tm) - "Broadcasting from the dark side of the moon"
11
4016
by: James | last post by:
My form and results are on one page. If I use : if ($Company) { $query = "Select Company, Contact From tblworking Where ID = $Company Order By Company ASC"; }
4
18544
by: Alan Walkington | last post by:
Folks: How can I get an /exec'ed/ process to run in the background on an XP box? I have a monitor-like process which I am starting as 'exec("something.exe");' and, of course the exec function blocks until something.exe terminates. Just what I /don't/ want. (Wouldn't an & be nice here! Sigh) I need something.exe to disconnect and run in the background while I
1
3641
by: joost | last post by:
Hello, I'm kind of new to mySQL but more used to Sybase/PHP What is illegal about this query or can i not use combined query's in mySQL? DELETE FROM manufacturers WHERE manufacturers_id NOT IN ( SELECT manufacturers_id FROM products )
3
3494
by: presspley | last post by:
I have bought the book on advanced dreamweaver and PHP recently. I have installed MySQL and PHP server but am getting an error on the $GET statement show below. It says there is a problem with the variable $GET but $GET is not a variable, I thought it came from the page that calls the PHP file? if(($_GET)==""){ this gets an error
2
106621
by: sky2070 | last post by:
i have two file with jobapp.html calling jobapp_action.php <HTML> <!-- jobapp.html --> <BODY> <H1>Phop's Bicycles Job Application</H1> <P>Are you looking for an exciting career in the world of cyclery? Look no further! </P> <FORM NAME='frmJobApp' METHOD=post ACTION="jobapp_action.php"> Please enter your name:
1
13663
by: Brian | last post by:
I have an array like this: $events = array( array( '2003-07-01', 'Event Title 1', '1' //ID Number (not unique) ), array( '2003-07-02',
1
3831
by: Clarice Almeida Hughes | last post by:
tenho um index onde tenho o link pro arq css, como sao visualizados pelo include todas as paginas aderem ao css linkado no index. so q eu preciso de alguns links com outras cores no css, o q devo fazer?
2
5314
by: JW | last post by:
I wanted have this as part of a flood control script: <? echo ("Flood control in place - please wait " . $floodinterval . " seconds between postings."); sleep(5); // go back two pages echo "<script>window.history.go(-2);</script>"; exit; ?>
0
9582
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10580
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.