Primary keys on incorrect fields

Hi. I am migrating a backend Access 97 database to Oracle 8.1.6.
I have migrated the structure, but not data. I have noticed now that if I attach the new oracle tables to Access, even to a blank database, Access reports wrong columns as being the primary key. Yet, when I look at the entries for the primary keys in all_cons_columns they appear to be correct. Does anyone know how this would happen?
Thanks,
Ann Cantelow

I have tried both the ODBC driver from the oracle client software, and the latest MDAC ODBC driver that Microsoft provides. The problem remains the same for each.
These incorrect primary keys are on tables that have unique indexes- the attached table shows the first unique index as being the primary key. Remove all unique indexes, and the primary key is found correctly.
Thanks,
Ann Cantelow

Similar Messages

  • Out of Order Primary Keys and Blob fields

    Hi,
    I am using Oracle Migration Workbench to transfer the data from SQLServer 2000 to ORacle 9i. I am running into the following issues and was wondering if you had any ideas what may be going on:
    1.) Primary keys are out of order
    2.) Blob fields are inserted into the incorrect row
    Ex. BLOB field stating 'Application active' should be associated with Act_key (primary key) = 5 and it ends up transfering over with act_key 28.
    Thank you for any information you may have on this.
    AK

    I am very interested in this thread because I have encountered a similar problem with BLOB columns, except that I am also seeing this with CLOB's.
    Essentially the all the data gets 'migrated', but the CLOB and BLOB columns are all mixed up!
    Any solutions?

  • Autofill primary key with another field

    I have 2 fields:
    DISTRIB_CODE ex. ABC
    DISTRIBUTOR ex. ABC COMPANY
    I want the DISTRIB_CODE to be the primary key, but I cannot do that because DISTRIB_CODE occasionally changes. So, I think I thought of a way to work around it:
    DISTRIB_ID (PK constraint)
    DISTRIB_CODE (Unique Key constraint) ex. ABC
    DISTRIBUTOR ex. ABC COMPANY
    I want DISTRIB_ID to auto-fill when I enter a code into DISTRIB_CODE.
    Example: When I enter "ABC" into DISTRIB_CODE I want DISTRIB_ID to auto-fill with "abc".
    Can this be done? Are there any negatives of doing this? I am a BEGINNER, so please be detailed.
    Thank you.

    Hi James,
    I appreciate that using a sequence based primary key is not the same as an updatable one. However, if the PK is updatable and is intended for use elsewhere within the database as a foreign key, you would also need to have cascade-update switched on to ensure that all child tables are updated with any new value. The only thing that you would need when using a sequential PK is a unique constraint on the distrib_code field to ensure that duplicates are not possible.
    Additionally, if the PK remains updatable, using javascript to populate it based on the second field would only be part of the process as you would still need item or page validation to ensure that it is unique before attempting to write the data into the table.
    So, I think it would be easier all round if the PK was numeric and sequential, the distrib_code column had a unique constraint defined on the table and that there is item or page validation that checks for duplicates and returns user-friendly messages to the user.
    Regards
    Andy

  • Error when i set primary key to a field in table

    I created a table. with one primary key field
    on saving it following error happened 
    at Microsoft.SqlServer.Management.DataTools.Interop.IDTDocTool.Save(Object dsRef, String path, Boolean okToOverwrite)
    at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDataDesignerNode.Save(VSSAVEFLAGS dwSave, String strSilentSaveAsName, IVsUIShell pIVsUIShell, IntPtr punkDocDataIntPtr, String& strMkDocumentNew, Int32& pfCanceled)
    then i removed primary key. Table was saved successfully.
    I need to make primary key field.. how can i solve it?

    CREATE TABLE tblname (c INT NOT NULL PRIMARY KEY) 
    Have you ran the above statement successfully?  Do you create a table in VS?  
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Readonly primary key field

    Forms 6i
    Database 10g
    When I access a simple data record in an oracle form that consists of a CODE and DESCRIPTION where the CODE is part of the primary key, the CODE field is typically read-only and this is evident by the shade of the item. The item has a grey background color to immediately let me know the field is read-only.
    We recently made some changes to our forms and for some reason now, the item is no longer grey, it appears as white giving the appearance that it could be modified, however the field is still readonly.
    Does any know how/where the background color should be set to the read-only color? I need to fix this and have not had much success in tracking this down.
    Thanks!!!

    Hi,
    you can set the visual attribute.
    Mohamed Dadi

  • ODI - Primary Key issue

    Hi ,
    I have a primary key constraint in the target datastore. Thats mapped to field in the source which is not primary key. How can I check that , when I map from source to target primary key constraint is not violated ( I checked DISTINCT and UNIQUE as filter condition , but its not accepting the format. Give me the exact format)

    Hi ,
    My requirement is like I have a primary key in one of the fields of target column. That field is mapping to a field in source which is not a primary key . Source field can have duplicate values. I have to filter out that values when it enters to the target field. I used "DISTICT" keyword in the target datastore. But that will check only for "DISTINCT" records. I cannot applu "DISTICT" for individual field.
    For EX:
    SOURCE : TARGET
    DEPT CLASS SUBCLASS DEPT(primary key) CLASS
    1 1 1
    1 2 2
    1 3 3
    2 2 1
    2 1 2
    2 3 3
    If I use "DISTINCT" then it will choose ( 1 1,1 2,1 3,2 2,2 1,2 3) . But that will violate the primary key constraint.
    Edited by: rameshchandra85 on Nov 29, 2008 9:11 PM

  • Re:Primary Key in the UDO Table

    Hi All,
    In the UDO  table by default code is set as the primary key. How to set primary key for another field also?.
    Thanks in Advance.
    Regards,
    Madhavi

    Hi Madhavi,
    If you're getting the 'Other users are currently connected to the database' and the aren't any user connected to the company one of the following is happening:
    1. There's a Add-on that uses the DI API connected to the company;
    2. You have the SQL Management Studio opened and connected to the company DB;
    3. You any other application, like Crystal Reports, connected to the company DB.
    Close all other applications that may be the cause of the problem, and create the Key again.
    Regards,
    Vítor Vieira

  • FindByPrimaryKeys with multiple primary keys

    Hi, I have a table which has a primary key over 2 fields.
    I have learned that in this case, I must leave out the <primkey-field> tag from my ejb-jar.xml. In my Entity Bean's Home interface, do I still need to declare a findByPrimaryKey finder method or do I leave it out?
    Thanks!

    Hi,
    When you have primary key in 2 fields, then you have to combine them into a class called primary key class.
    And yes in your ejb-jar.xml the value for <primkey-field> will be left empty and the value for tag <primkey-key-class> would be the name of your primary key class that you generated. Otherwise, the normal valu would be java.lang.String.

  • Let me know the standary primary key tables in standard table??

    let me know the standary primary key tables in standard table??

    Hi,
    You can go and check the primary keys of a table in SE11 by entering the table name and pressing display.
    You will get to see that there will be some fields with a tick mark in the primary key column.The fields which have such tick marks are the primary keys of that table.
    As far as I know there is nothing called primary key tables.All tables have some fields as primary keys based upon which a record is uniquely defined in that table.
    Hope it was useful.
    Thanks,
    Sandeep.

  • Reconciling composite primary key tables in 9.0.1.4 DB app connector

    Hi
    I am trying to get the reconciliation in the 9.0.1.4 db app connector to work on a view that has a composite primary key (one user_id field and one group_id field)
    There are no examples on how to do this and my "trial-and-error" efforts have not been fruitful this far. Anyone that has any experience of how to solve this problem?
    Best regards
    /Martin

    Hi Martin, our customer is also very sensitive to changes in his HR system, it is a custom oracle development. He provide us a read only view every day with all changes on their identities. We have developed a custom pl/sql proccess to fill a custom local table with the right information . Then we use this table locally with dbtable connector but with some custom addons.
    So i believe that using a second table and keep in synch it is the best approach.
    We have detect some problem with 9.0.1.4 DB app connector, it is using internally only one db connection for all its operations, in a huge load condition its can produce errors and race condition problems. We have a custom connector now and it is using connection pool from application server so we will have not this problem.
    I believe that oracle should release source for their connectors, i am very sure that partners and customers can improve it.

  • Can primary key be changed?

    Hi all,
    I found that if primary key is changed, the SQL statement generated is strange. For example, I have an object A, with primary key = 12345. In the UoW, I update the primary key to 1000. The SQL statement generated would be something like "UPDATE A SET PK = 1000 WHERE (PK = 1000)". Is it the expected behaviour of toplink?
    Thanks and regards,
    William.
    PS: Proxy in direction is for object A. Would it tbe cause of the strange behaviour?

    Primary keys cannot be changed.
    Primary keys are used to maintain the identity of objects. Changing the primary key would change the identity.
    If you need to change a primary key field, the best thing to do is delete the original object and insert a new object with a new primary key and other fields copied as appropriate.

  • After a Primary Key is chosen, how can I display just a corresponding row?

    Hi everyone,
    I have a LOV field in which the user is able to select a primary key. Now I would like to show the user some more information, after he has chosen an item, like a name to the coressponding item.
    Example: Table: Dataobject
    Primary key: DOBJ_NR
    Other fields: NAMSP
    After the user choses his dobj_nr, he should be able to see the namsp.
    Can anyone help me?

    I have a LOV field in which the user is able to select a primary keyMake it select list with Submit
    Create a after computations to populate other fileds based on primary key value.
    Computation type: SQL
    and computation source something like..
    SELECT NAMSP
    FROM Dataobject
    WHERE DOBJ_NR = :P1_DOBJ_NRIf you don't want to SUBMIT the page, see this link for AJAX implementation for the same.
    Regards,
    Hari
    Don't forget to reward helpful replies by marking them as helpful or correct ;-)
    Edited by: Hari_639 on Dec 1, 2009 6:02 PM

  • How to add a new data element for existing table filed(Primary key field)

    Hi Experts,
    How to add a new data element for existing table field(Primary key field)
    For this filed ther is no foreign key relation ships and even check table.
    while activating table it is giving message like below.
    can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
    Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)           
    Primary key change not permitted for value table /TC/VENDOR
    Check on table  /TC/VENDOR resulted in errors              
    Thanks
    Ravi

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

  • Comp. Primary key class-field mapping to DB columns problem.(EJB 2.0 CMP)

    Hi!
    I have deal with EJB 2.0 CMP bean.
    I have a composite PK so use the java class to store it. And there is a corresponding field in the Entity Bean with its primary key class type.
    The problem is: when deployment tool creates sql query for the findByPrimaryKey(PKClass ck)
    where ck is an object with 3 fielde : a_id, b_id, c_id.
    it says:
    <sql>SELECT "ck" FROM "MyTable" WHERE "ck" = ? </sql>
    And it means by the "ck" simple a column in DB but NOT the composite key which has to be splited into 3 different fields. So the container can't do the proper mapping.
    Does anyone know solutions?

    I was wrong about primary key class fields, take a look at Ejb2.0 Specification (10.8.2):
    The primary key class must be public, and must have a public constructor with no parameters.
    All fields in the primary key class must be declared as public.
    The names of the fields in the primary key class must be a subset of the names of the container-managed
    fields. (This allows the container to extract the primary key fields from an instance�s container-managed
    fields, and vice versa.)
    Right now I'm using BMP and I don't have this problems. Primary keys, calculated fields and types not supported by the DB can be easily achieved. But I understand your interest on CMP, is clearly evolving!

  • Problems deleting a primary key field in a table.

    Hello Guys,
    I deleted a primary key field in a custom table by clicking 'delete row' icon and then tried activating it through se14 - database utility. It is throwing an error saying 'Primary key change not permited for the value table zxxxx'. What is the problem???
    How can I delete a primary key in a table??
    Please help.
    Thanks,
    Naren

    I am pasting the detail explaination over that error.
    Primary key change not permitted for value table ZTV_RANGE_NUMBER
    Message no. AD 300
    Diagnosis
    This table is defined as a check table. For reasons of consistency, changes to the primary key of the table are not allowed.
    Procedure
    If it is essential that you change the primary key, you must delete the relevant foreign keys. Refer to the where-used list to find all tables containing a field that is checked against this table. Delete the foreign keys for these fields.
    If necessary, maintain the deleted foreign keys again.

Maybe you are looking for

  • RFC problem (CTS with Solution Manager)

    Hi everybody, I'm configuring a transport landscape with Solman. For demo purpose I created 3 clients in a Sandbox system (SBX), which should function like a 3-system-landscape. I created a transport domain in Solman (SM1) and added SBX into the doma

  • Unable to Install Flash on Mac OS X Mountain Lion

    I have attempted several times to install Flash Player (11.7.700.225) on Mac OS X Mountain Lion (10.8.4), and every time I attempt to install it hangs on 20% during installation. I have ensured that there is no flash player installed on the Mac curre

  • Spend Analysis for Commodity Code in ECC6

    Hi, I wonder if there is any way for spend analysis references to commodity code in SAP R3 as we are not using SAP SRM? If there is any option in ECC6 then; a) Which field/view maintained for Commodity code at Material Master? b) Which field maintain

  • Ver 7.0.1 wont support frames.

    I upgraded to ver. 7.0.1 and on certain sites its blank and when I right click view page source, it tells me that the browser doesn't support frames. Here's a copy and paste. <noframes><h2>Your browser does not support frames. We recommend upgrading

  • Contextual event - handler called before producer bean's setter

    I am trying a simple contextual events usecase: Page A.jsff has an input text field whose value is directly stored in a bean variable (bean is in pageFlowScope). Contextual event is defined on value change event for this input field. A.jsff has taskf