473,506 Members | 17,176 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing back end database

344 Recognized Expert Contributor
I have done this so many times, but now forgotten how I did it.

I need to programaticaly change the backend database, i.e. add tables, relationships, fields etc. (This is because the live system, that needs changing, is in West Africa, I am in London)

I remember all about ALTER TABLE and CREATE TABLE etc, but I can't seem to attach to the back end database from my code database

dim db as database
set db="Z:\bissau\bissaudata.mdb"

gives me a Type Mismatch on compile.

I've search this forum, gone through my old code and even looked in some manuals but can't find the solution.

TIA
May 30 '07 #1
2 1969
Klapperstorch
1 New Member
I have done this so many times, but now forgotten how I did it.

I need to programaticaly change the backend database, i.e. add tables, relationships, fields etc. (This is because the live system, that needs changing, is in West Africa, I am in London)

I remember all about ALTER TABLE and CREATE TABLE etc, but I can't seem to attach to the back end database from my code database

dim db as database
set db="Z:\bissau\bissaudata.mdb"

gives me a Type Mismatch on compile.

I've search this forum, gone through my old code and even looked in some manuals but can't find the solution.

TIA

Hi,

open a workspace first and

Set db=workspace.opendatabase([path])

extract path info from the connected table, remove the tabledef from your database and reconnect it:

Private Sub ConnectTable(SourceDb, tbl)
DoCmd.TransferDatabase acLink, "Microsoft Access", SourceDb, acTable, tbl, tbl, False
End Sub
May 31 '07 #2
Lysander
344 Recognized Expert Contributor
Hi,

open a workspace first and

Set db=workspace.opendatabase([path])

extract path info from the connected table, remove the tabledef from your database and reconnect it:

Private Sub ConnectTable(SourceDb, tbl)
DoCmd.TransferDatabase acLink, "Microsoft Access", SourceDb, acTable, tbl, tbl, False
End Sub
ah, opendatabase, knew it would be something simple, thanks
May 31 '07 #3

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

Similar topics

2
11013
by: ehm | last post by:
I am working on creating an editable grid (for use in adding, deleting, and editing rows back to an Oracle database). I have a JSP that posts back to a servlet, which in turns posts to a WebLogic...
9
10899
by: Jon Brunson | last post by:
Is it possible to use a DataAdapter to fill a DataTable, change the DataColumns of that DataTable (and maybe even it's name) and then commit those changes to the database (in my case SQL Server...
7
3970
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at...
7
5248
by: Dan Sikorsky | last post by:
How do you iterate thru a dataset to change money fields to a different value? Here's what I have. My dataset is filled directly from a stored procedure. ' Create Instance of Connection and...
32
3635
by: deko | last post by:
I have a popup form with a textbox that is bound to a memo field. I've been warned about memo fields so I'm wondering if I should use this code. Is there any risk with changing the form's...
1
2664
by: mplus_2000 | last post by:
I have recently inherited a database. The switchboard (and other forms) displays the name of the database on it (top, center). Currently the name that appears is Reviews. There are plans to roll...
3
1391
by: tezza98 | last post by:
Help please, Ive been developing an acceess database front end attached to a SQL 2005 Back end, for a client, and i have to put the new front end and back end on thier PC, Simple yes, but im runnning...
3
2079
by: Richard Hollenbeck | last post by:
Hello, I just moved my main database and the backend database to a better location and changed the name. But now I can't seem to get Access to recognize the new location and name. I tried using...
5
2574
by: marton | last post by:
Hi there, I'm new to posting on the forum, and I've been working with MS Access for a couple of years, but and other than that know nothing about programming. I have a fairly simple, networked,...
0
7218
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
7103
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...
1
7021
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
7478
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
5614
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,...
1
5035
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...
0
4701
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...
0
3188
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...
0
3177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.