473,408 Members | 2,832 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,408 software developers and data experts.

Update the table structure in a Front-end/back-end situation

Hello,

I've got a Split database, where there a lot of back-end databases. There is one Backend-database for each customer. And there is also only one back-end linked at a time.

Now I want to update all of these back-end databases for the release of a new front-end version.


when I try this:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferDatabase acLink, "Microsoft Access", Text1.Value, acTable, "Analyses", "Analyses"
  2. CurrentDb().Execute "ALTER TABLE analyses ADD Column Caption1 MEMO;"
I got an error "cannot execute data definition statements on linked data sources".

Is there an easy solution for this?

I guess copying the whole table from BE to FE, alter it and copy it again to BE is possible, but that doesn't look very efficient.

thanks,

Stijn
Mar 19 '10 #1
4 2953
patjones
931 Expert 512MB
Hi Stijnele -

Where are you trying to run this code? In the front end or back end? And in what module?

In a situation like this, if there are any modifications that you need to make to table design, you can simply open the back end file and work with the tables in table design view. Since it seems like you're just trying to add a column, I don't think this should be too hard.

The other thing I would note is that if you have a separate back end for each customer, you might want to look at how your data is structured. It would generally be considered pretty inefficient to have a separate file for each customer...especially if you have a lot of customers!

Pat
Mar 20 '10 #2
Hi Pat

Actually I don't know how many back-end databases exist. I guess about 30.
The customers are seperated because they are used on our laptops and it's a must that they can be copied easily in case someone takes over a customer from a collegue.
I'm also working on a front-end for the customers so they can generate the reports on their own.

There is a table in the Back-end database that records the version. The Front-end reads the version and when it sees it's an old version it should add a few columns to the database.

Adding columns manually is not really an option because of the quantity of back-end databases and I'm planning to use this method more in the future for further developing the application.

Stijn
Mar 20 '10 #3
patjones
931 Expert 512MB
Stijn -

So, the laptops are taken off-site by employees when they go to work with a customer?

Do all 30 of the back ends contain the same type of data (in other words the same tables with the same columns, etc.)? If so, I would say that the easiest way to solve this problem is to combine them into one back end with properly normalized data.

If it's designed correctly it shouldn't be a problem when a customer's account transfers hands internally...because you'll have a customer ID or some other way to uniquely identify a particular customer and all their transactions, as well as an employee ID for the person in your organization who handles that customer. When the account changes hands, you'll simply do an update to the employee ID to reflect the change.

Let me know what you think. I'm just trying to understand your situation a little better...

Pat
Mar 20 '10 #4
NeoPa
32,556 Expert Mod 16PB
To my surprise, I found there was no option within the syntax of ALTER TABLE to specify an alternative database. This seems to imply only the database that contains the code (FE) can be changed by such code. An unfortunate limitation it seems.
Mar 20 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: jayson_13 | last post by:
Hi, I need to implement a counter and i face problem of locking so hope that u guys can help me. I try to do test like this : 1st connection SELECT * FROM nextkey WHERE tblname = 'PLCN'...
1
by: Caroline | last post by:
I need to update a table by copying a column from another table (having the same structure, but on another database), from the record having the same primary key. 1 - What is the correct...
8
by: Jan van Veldhuizen | last post by:
The UPDATE table FROM syntax is not supported by Oracle. I am looking for a syntax that is understood by both Oracle and SqlServer. Example: Table1: id name city ...
6
by: mo | last post by:
I need to bring the ssn's into UniqueSups (supervisors) from tblNonNormalized. My inherited DB is not normalized and I find it extremely irritating due to the workarounds needed. I created...
14
by: serge | last post by:
I have a scenario where two tables are in a One-to-Many relationship and I need to move the data from the Many table to the One table so that it becomes a One-to-One relationship. I need to...
3
by: Earl Teigrob | last post by:
I am considering writing a Class that Selects, Adds, Updates and Deletes Nodes in an XML File but do not what to reinvent the wheel. (See XML file below) That data format would emulate records...
5
by: Maxi | last post by:
I have 162 tables in my database. Names of the Tables are 1, 2, ...... so on till 162. Every table has only one field (field name = Expr2) of type NUMBER (DOUBLE) with 352716 records in each table....
8
by: Maxi | last post by:
There is a lotto system which picks 21 numbers every day out of 80 numbers. I have a table (name:Lotto) with 22 fields (name:Date,P1,P2....P21) Here is the structure and sample data: ...
4
by: =?Utf-8?B?QmFidU1hbg==?= | last post by:
Hi, I have a GridView and a SqlDataSource controls on a page. The SqlDataSource object uses stored procedures to do the CRUD operations. The DataSource has three columns one of which -...
6
JKing
by: JKing | last post by:
I'm using an update query to update a single field in a table. Table1 is part of my normalized table structure. Table2 is used solely as an import table for raw data which I sort and summarize...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
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
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.