Lysander 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
2 1969
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
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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...
|
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...
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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,...
|
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,...
|
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...
| |
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...
|
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...
|
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: 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: 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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |