473,659 Members | 2,526 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\b issaudata.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 1982
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\b issaudata.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.op endatabase([path])

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

Private Sub ConnectTable(So urceDb, tbl)
DoCmd.TransferD atabase 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.op endatabase([path])

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

Private Sub ConnectTable(So urceDb, tbl)
DoCmd.TransferD atabase 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
11037
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 SFSB and, from there, to the database. On the front end, all cells appear as text fields. However, for certain cells, when the user clicks on the cell, the text field turns into a drop-down field (i.e. Select object), defaulting to the value...
9
10909
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 2000)? Eg: Dim dc As New SqlCommand("SELECT TOP 0 * FROM SomeTable", SomeSqlConnection)
7
4007
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 runtime, the report still showed the results from the default query (from within the Crystal Report). Then I tried the XSD solution where you define a dataset (that mataches the database and the Crystal Report) and have the Crystal Report use this....
7
5258
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 Command Object Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString")) Dim myCommand As New SqlDataAdapter("OrdersList", myConnection)
32
3667
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 RecordSource like this? Am I asking for trouble doing this with a memo field? Thanks in advance. Private Sub cmdNextNote_Click() Dim lngNid As Long If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord
1
2677
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 out the application (i.e. making copies of the database) to other locations (Reviews-NY, Review-Dallas etc). If was mentioned today in passing by the original developer that there is a way to change the title that appears on the switchboard without...
3
1398
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 into a huge problem. My front end points to my server: w2Kserver1 with databse called Fuel, And I need it to point to the clients server: cleintServer1/ThisComputer with database called fuel. The client machine doesnt have Access installed,...
3
2082
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 the linked table manager under tools and that didn't change anything. Same thing with Get External Data-linked table thing under File. Neither one worked. So I went into tools again and checked startup and there is nothing there to change that I...
5
2587
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, Access database created with Access 2003. It is accessed from several different computers in my department (I don't know which computers or how often). About 8 people are entering data with an unbound form (which also records computer ID, date and...
0
8341
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
8851
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...
0
8751
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8539
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
8630
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
7360
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...
1
6181
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4176
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...
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.