473,395 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Updating linked backend I haven't got access to

Hi All,
I created a database for a friend a few months ago which has been
working fine. However, he now wants a few changes implemented to accommodate
his growing needs. When I gave him the database, I split it in anticipation
of this so that I could give him a replacement fromtend without affecting
his existing data.

My problem is that one of the changes he has asked for requires one of the
tables altering. My plan was to run code the first time he opens the new
frontend which would add the required fields but I found that this cannot be
done as the tables are linked. Can anyone offer any idea on how I could
achieve this as getting to his location is somewhat of a problem!!!!!
TIA,
Mark
Apr 10 '06 #1
4 1408
Look up in the Macro area

deleteobject - Table

Transferdatabase - link

That can do it from within the normal running app - however that does
not of itself allow changes to the table structure etc. but will unlink
it and allow you to link a different table in its place.

It would seem you need to get the new definition into the tables DB
then get the old data transferred from the old table into the new
table, then delete the old link and the new table link and recreate the
table link with the new BE table. Very last step not necessary if the
new table was created with a different link name (unlikely since you
would have to have changed EVERY query within the system.)

At some point, after everything seems to be working for a while, you
may want to re-establish a link to the old table and empty it since you
cannot really delete it from the FE (I believe).

Apr 10 '06 #2
>From your front end create and open a new access application. Open the
backend db with this. Run any code you want. Provided you don't have
something going that prevents the backend db from being opened
exclusively something like this should work.

Sub aircode()
Dim a As Access.Application
Set a = New Access.Application
With a
.OpenCurrentDatabase "northwind.mdb"
.DBEngine(0)(0).Execute "ALTER TABLE Employees ADD Whatever
CHAR(255)"
.CloseCurrentDatabase
.Quit
End With
Set a = Nothing
End Sub

Apr 10 '06 #3
Br
Mark wrote:
Hi All,
I created a database for a friend a few months ago which has been
working fine. However, he now wants a few changes implemented to
accommodate his growing needs. When I gave him the database, I split
it in anticipation of this so that I could give him a replacement
fromtend without affecting his existing data.

My problem is that one of the changes he has asked for requires one
of the tables altering. My plan was to run code the first time he
opens the new frontend which would add the required fields but I
found that this cannot be done as the tables are linked. Can anyone
offer any idea on how I could achieve this as getting to his location
is somewhat of a problem!!!!!


Simple. Your code should reference the backend database. You can determine
the backend's name/location from the link propertis of oen of the linked
tables. You then reference that database and it's table collection.

eg.

Instead of..

Set MyDb = CurrentDB()

use..

strBackendDBName = GetDataLocation()
Set MyDb = OpenDatabase(strBackendDBName)
Function GetDataLocation() As String
On Error Resume Next
Dim myDB As Database, tdef As TableDef, ConnectString As String
Set myDB = CurrentDb
Set tdef = myDB.TableDefs("tblPeople")
ConnectString = tdef.Connect
GetDataLocation = right(ConnectString, Len(ConnectString) - 10)
End Function
--
regards,

Br@dley
Apr 10 '06 #4
Thankyou all for your suggestions. Easy when you know how ;o)

"Br@dley" <do***********@google.com> wrote in message
news:e1**********@news-02.connect.com.au...
Mark wrote:
Hi All,
I created a database for a friend a few months ago which has been
working fine. However, he now wants a few changes implemented to
accommodate his growing needs. When I gave him the database, I split
it in anticipation of this so that I could give him a replacement
fromtend without affecting his existing data.

My problem is that one of the changes he has asked for requires one
of the tables altering. My plan was to run code the first time he
opens the new frontend which would add the required fields but I
found that this cannot be done as the tables are linked. Can anyone
offer any idea on how I could achieve this as getting to his location
is somewhat of a problem!!!!!


Simple. Your code should reference the backend database. You can determine
the backend's name/location from the link propertis of oen of the linked
tables. You then reference that database and it's table collection.

eg.

Instead of..

Set MyDb = CurrentDB()

use..

strBackendDBName = GetDataLocation()
Set MyDb = OpenDatabase(strBackendDBName)
Function GetDataLocation() As String
On Error Resume Next
Dim myDB As Database, tdef As TableDef, ConnectString As String
Set myDB = CurrentDb
Set tdef = myDB.TableDefs("tblPeople")
ConnectString = tdef.Connect
GetDataLocation = right(ConnectString, Len(ConnectString) - 10)
End Function
--
regards,

Br@dley

Apr 11 '06 #5

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

Similar topics

4
by: Laura | last post by:
Here's the situation: I'm trying to use an update query to copy data from one row to another. Here is the situation: I have 5 companies that are linked to each other. I need to show all 5...
6
by: Lewis Veale | last post by:
I have an Access 2000 front-end pointing at a SQL Server backend, with around 80 linked tables and views. I frequently need to point the front-end at different versions of the back-end, and achieve...
2
by: Gary B via AccessMonster.com | last post by:
Hi all, Is there any way of checking if a file exists on a website? I have an autoupdate routine that runs from a clients server, but it would be useful if it could run over the internet. I'm...
1
by: abefuzzleduser2 | last post by:
we use Access 2000 with linked tables in SQL Server 2000. I have a form and a datasheet subform based on a table. This was not related to the parent table before and I was changing nvarchars to...
10
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on...
5
by: aaron.m.johnson | last post by:
I have an application which contains an Access database with linked tables that point to another database within the application. The problem I have is that when the user installs the application,...
4
by: rdemyan via AccessMonster.com | last post by:
My application is calculation intensive and the servers are agonizingly slow. Administrators of my application only update the backends once a month (twice a month max). So, my launching program...
1
by: rlntemp-gng | last post by:
I have two .mdbs, MyTestApp.mdb- front end for forms and MyTestData.mdb-backend for tables. While the front end is copied to the user's desktop via a batch file, the front end is linked to the...
18
by: afromanam | last post by:
Whew.. OK, running access 2003 in win xpsp2 and access 2007 in win vista. This is the question... We have a db, split in front end (FE.mdb) and backend (BE.mdb) FE has tons of linked...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...

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.