473,804 Members | 3,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Linking Access 2003 to Oracle VBA loosing Primary keys

1 New Member
I have a series of about 10 test databases with about 34 linked table each. I need to create an Access 2003 database front end for each of these.

I am currently trying to write a script that will allow me to link Access 2003 tables to Oracle tables. The problem is that the Oracle table that I am linking to does not have primary keys. This is a problem because when I write the VBA to link the tables, the linkes tables do not end up with primary keys.

I am trying to write the code to allow me to create the keys with VBA. This is not working. Also, if I try copy a database and use the linked table manager the keys get dropped as well.

Any ideas (with the exception of createing PKs in the Oracel databases?) I want to do this with VBA, I can get it to work fine through the standard UI.
Mar 27 '07 #1
1 1703
nico5038
3,080 Recognized Expert Specialist
Hmm, nasty problem. I've never tried to add primary keys to linked tables as the key(s) will be guarded by the original database engine.
Personally I use the File/Get external data/Link tables menu to select all tables from an Oracle database and just keep [Enter] pressed to pass the key definition popup.

You could however try to issue a DDL query with "CREATE INDEX" on such a table to get an additional index, but not sure what the effect will be...

Nic;o)
Mar 28 '07 #2

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

Similar topics

1
2026
by: chris p reynolds | last post by:
I've been designing SQL server databases for a while and have always assumed that primary keys and linking keys should be numbers rather than textual fields to improve performance. As an example, if i were to create a new table i would put in a surrogate primary key that autoincrements. I've recently been challenged on this and cannot seem to find any evidence that would support the view that this is best practice. Anybody have...
2
4757
by: Phil S | last post by:
I used the Migration Workbench for Oracle 9.2 Client to migrate the tables in an Access 2K back-end database to Oracle. (The Migration Workbench is intended to automate the process of migrating tables from Access to Oracle.) Following the migration, when I try to link the Oracle table to the Access front-end using Oracle ODBC Driver, I have to either select one or more fields in the Oracle table as key fields or not have any key fields. ...
2
1880
by: Johnny M | last post by:
I have been using Access since office 4.3. I have just upgraded to Office 2003 and am having issues with creating updatable queries. If I link one table to a selection query based on the same table, the resulting query is not updatable. OR If I link 2 tables together that don't have a primary key the result is not updatable. I know I was able to do this in previous versions since I usually don't use a primary key. Thanks
6
4764
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
8
4042
by: Alfonso Esteban Gonzalez Sencion | last post by:
I am trying to use Access as a front end for extracting information from an Oracle database. I started using linked tables but I am getting a very curious behaviour. When I consult the linked table in access, the total number of records is OK but some records appear several times and some records do not appear at all. It seems as if access or the ODBC drivers returns several times the same record and skips some of the records, curiosly...
7
3948
by: peter.morin | last post by:
Issue: I am inserting an Oracle record containing insert trigger via Access 2002 using the code below. The issue is that the sequence from the acSaveRecord is not reflected after the insert so the insert into the second table section: ' Copy LOB entries now. fails on unique index constraint (understandable because it has the orig rate_id). The strange thing is that it works fine for new records that have beend added and then...
4
2255
by: Marcin Zmyslowski | last post by:
Hello! I have a few tables in MS SQL Server 2000, where I have admin permissions for these tables. I have created a blank database in MS Access 2003, where I linked a table from MS SQL Server 2000. The problems is that I have only read permissions on these tables in MS Access 2003, while I have admin permissions in MS SQL Server 2000. Is it possible to have the sime permission in both MS Access 2003 and MS SQL Server 2000? Is it...
9
3010
by: AnandaSim | last post by:
Hi All, I've had Access 97, 2000 connections to the corporate Oracle database for a few years now - but seldom use it. When I did use it years ago, performance was not fast but the features were good enough. Now, the version of Access is 2003 with Office SP1 applied, Windows XP against Oracle 9.2. And attached tables are real slow - 5 mins to get to datasheet view and data is incorrect - the same row is repeated several times even in...
3
3188
by: TonyJH226 | last post by:
I’m using Access 2003 and am a novice to Access. I am creating a form to facilitate data entry to seven tables. The main table (A) has four sub-tables that are related to the main table by one-to-one relationships. A fifth sub-table (B) has a one-to-many relationship to Table A and serves as a bridge to another table (C) also with a one-to-many relationship to that table. So far, I have used the sub-form wizard to create the main form and...
0
9575
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
10564
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
10073
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
9134
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
7609
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
5513
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...
1
4288
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3806
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2981
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.