Help - How do I manually configure SQLServer primary key?

The help under title "Limitations Using SQLServer" states that when running in "design time" tables with primary keys aren't picked up. I can see that it is specified under the table's structure indices but it is not offered when I try to construct a Business Component "View." The help states that "You must put a primary key in manually to compile the project." It also says that "since BC4J design time requires a key you will need to assign one attribute a key as well." So here's the paradox. I can't figure out how to tell JDeveloper what field is the primary key. Consequently, I can't construct "views" and consequently I can't define "Application Modules" and thus can't change my "Configurations" settings for it.
For the development team, I recommend that you make specifying the application key more intuitive. Perhaps a right click on the structure field of interest could yield a drop-down list with appropriate options. For configuring database connections, perhaps right clicking the entity in the System Navigator could yield an appropriate "Configuration" option that would allow the user to map everything about the connection from there.

Dean,
thanks for your comments: we are actively working on making
the tool easier to use for "foreign" databases.
The documentation shoulkd be clearer here: you need to define your
primary keys against the ENTITY, not the view. If you run against
Oracle, this happens automagically, but against SQL*Server, you should
run the wizard but don't pick any tables.
Then, right-click on the application module and invoke the
"New Entity Wizard". After you have picked the table, you should
see the UI to assign properties to the attributes.
Assign a PK to one, and leave the "automatically create default view"
checkbox selected, and you should have an ok time.
Incidentally, if you are prepared to work a little bit with the
SQL*Server schema, this is the workaround for the bug:
Create a login with the same name as the owner name, for example,
"dbo". Then our tool will recognise constraints.
regrads, Karl

Similar Messages

  • How to impliment a auto increamenting  primary key feature in ADF ??

    How to implement an auto incrementing primary key feature in ADF ( With out using database Triggers)
    Edited by: Dinil Mithra on Apr 24, 2009 2:28 AM
    Edited by: Dinil Mithra on Apr 24, 2009 2:59 AM

    Dinil,
    Create a sequence in the database.
    Read section 4.11.5 of the Fusion Developer's Guide - which has sample code to get the next sequence value from Java without a database trigger.
    John

  • How do I manually configure a Timecapsule after having restored it to original settings?

    I have been experiencing very slow wifi speeds over my wireless and having done some research on the topic, many suggest that completely eliminating previous settings by restoring the Timecapsule and manually reconfiguring it may help. I have tried to do this, but despite changing the setting to "manually configure" in the hardware settings in the airport utility, every time I restore Timecapsule and begin to configure it, it tells me that it is reading the settings from the base station.
    In addition, despite removing the check mark from the "remember previously joined networks" in airport utility, it still lists my previous SSID in the list of networks.
    Since the wireless speed hasn't improved at all (in fact, it has deteriorated some) I am afraid the old set ups are still there and slowing things down.  How can I completely remove all previous settings from my Timecapsule, my airport express and the airport utility software and start from scratch?
    Thanks.

    How can I completely remove all previous settings from my Timecapsule, my airport express and the airport utility software and start from scratch?
    There are two parts to this answer. The first relates to performing a Factory Default Reset separately on the Time Capsule and AirPort Express. This will erase the current network settings and return them to default values.  This will not affect any backups that you may have stored on the Time Capsule disk. ***
    Use the information in this Apple support document for that:
    Resetting an AirPort Base Station or Time Capsule FAQ
    Part two would be to delete the previous wireless settings on your iMac.  Here's how:
    Open System Preferences (gear icon on the dock)
    Open Network
    Open Wi-Fi or AirPort
    Click Advanced at the lower right of the window
    Click on the name of a wireless network that you no longer need to highlight it
    Click the - (minus) button at the bottom of the list to delete it
    Do the same for other networks that you no longer need
    Click OK, then click Apply
    Open Macintosh HD > Applications > Utilities > KeyChain Access
    Click on the name of a wireless network that you want to delete to highlight it
    Click the Delete key on your keyboard
    Do the same for other networks that you no longer need
    Close KeyChain Access
    *** If you need to erase the Time Capsule disk completely, post back for additional instructions. We need to know which version of AirPort Utility you are using to provide specific details.

  • How to create sequence based (SERIAL) primary key?

    Does anybody know any workaround to modify dictionary table outside Web Dynpro?
    I specify default column value in SQL Studio:
    ALTER TABLE PB_ORGANIZATION COLUMN ORG_ID ADD DEFAULT SERIAL(1)
    Everything is OK, but when I try to insert values in modified table from Web Dinpro EJB application I get the error:
    com.sap.engine.services.ejb.exceptions.
    BaseReliableNoSuchEntityException: The entity does not
    exist in the database. Its value in the cache has to be
    refreshed.
    It seems WebAS keeps some metadata, generated by Web Dynpro, and manual changes in a database table put it out of sync with this metadata.
    I need serial primary keys in my project. Is it possible to solve the above problem?

    I'll better send You entire application. It has Web Service frontend (PhoneBook) which can be used for testing. Method createOrganization() throws the exception.
    No, this error appears in EJB application only.
    BTW, I have even made attempt to replace <default-value>0</default-value> by <default-value>SERIAL(1)</default-value> but it didn't help.

  • How to get the inserted row primary key with out  using select statement

    how to return the primary key of inserted row ,with out using select statement
    Edited by: 849614 on Apr 4, 2011 6:13 AM

    yes thanks to all ,who helped me .its working fine
    getGeneratedKeys
    String hh = "INSERT INTO DIPOFFERTE (DIPOFFERTEID,AUDITUSERIDMODIFIED)VALUES(DIPOFFERTE_SEQ.nextval,?)";
              String generatedColumns[] = {"DIPOFFERTEID"};
              PreparedStatement preparedStatement = null;
              try {
                   //String gen[] = {"DIPOFFERTEID"};
                   PreparedStatement pstmt = conn.prepareStatement(hh, generatedColumns);
                   pstmt.setLong(1, 1);
                   pstmt.executeUpdate();
                   ResultSet rs = pstmt.getGeneratedKeys();
                   rs.next();
    //               The generated order id
                   long orderId = rs.getLong(1);

  • How to specify  tablespace for a primary key inde in create table statement

    How to specify the tablespace for a primary key index in a create table statement?
    Does the following statement is right?
    CREATE TABLE 'GPS'||TO_CHAR(SYSDATE+1,'YYYYMMDD')
                ("ID" NUMBER(10,0) NOT NULL ENABLE,
                "IP_ADDRESS" VARCHAR2(32 BYTE),
                "EQUIPMENT_ID" VARCHAR2(32 BYTE),
                "PACKET_DT" DATE,
                "PACKET" VARCHAR2(255 BYTE),
                "PACKET_FORMAT" VARCHAR2(32 BYTE),
                "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
                 CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") TABLESPACE "INDEX_DATA"
                 TABLESPACE "SBM_DATA";   Thank you
    Edited by: qkc on 09-Nov-2009 13:42

    As orafad indicated, you'll have to use the USING INDEX clause from the documentation, i.e.
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE TABLE GPS
      2              ("ID" NUMBER(10,0) NOT NULL ENABLE,
      3              "IP_ADDRESS" VARCHAR2(32 BYTE),
      4              "EQUIPMENT_ID" VARCHAR2(32 BYTE),
      5              "PACKET_DT" DATE,
      6              "PACKET" VARCHAR2(255 BYTE),
      7              "PACKET_FORMAT" VARCHAR2(32 BYTE),
      8              "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
      9               CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") USING INDEX TABLESP
    ACE "USERS"
    10               )
    11*              TABLESPACE "USERS"
    SQL> /
    Table created.Justin

  • How to create tabular form whithout primary key in table

    Hi All,
    I have requirement to create a tabular form but the problem is, the table which I am using in the application don't have any Primary key, I am using only one table can't change any thing in table.(i.e can't add any row in table,no change in data model)
    How can I create tabular form when primary key is not available.
    looking forward for all of your quick responce.
    Thanks in advance.
    Dikshit Kumar Nidhi

    You can create a view like
    select a.rowid id, a.*
    from table a
    and create a tabular form on this view. You can use
    the new column ID as Primary key.Did you try to actually do this? I did at
    http://htmldb.oracle.com/pls/otn/f?p=24317:159
    And when I change something and click Submit, I get an error
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01733: virtual column not allowed here, update "VIKASA"."NO_PK_VW" set "ID" = :b1, "I" = :b2, "J" = :b3 where "ID" = :p_pk_col
    Thanks

  • Primary Key With Four Column ,How to use that Column As Primary Key In Form

    Dear All,
    i have create composite Key as primary Key With Four Column .
    How can i use these column in Form With Report Page.
    How can i use these four Column as primary Key to Edit Record .
    How can i do this.
    Thanks
    Vedant

    wrap a view around your table with this bogus primary key. Use an instead of trigger to handle the inserts and updates. And then look at using surrogate keys to resolve these bad design issues...
    5 out of 4 people don't understand fractions.
    Thank you,
    Tony Miller
    Webster, TX

  • How to pass values for compound primary keys for updating the record in db.

    i have a entity bean in my ejb with two primary keys to it...eg. roleid,rolename...
    when iam retriving the record i use only one primary key ...so again to modify and update he same record which i retrived is a pbm..
    i cannot set the values for the compoundpk,,,
    but i can do the update for the bean with single primary key..
    i need to know how to pass the values/parameters for the coumpound primary key in my update method...
    thanx in advance...
    Arjun.G

    I istantiated a object for the pk class and assign the values for the primary key fields...
    Arjun.G

  • How my EntityBean knows about its primary key?

    Well, i found a dubious place in my EntityBean.
    I wrote an ItemBean with some simple getter and setter methods.
    It has 3 instance variables:
    - String id, (primary key)
    - String productId,
    - String name
    Here is the code of my application client:
    Context init = new InitialContext();
    Object ref = init.lookup("java:comp/env/ejb/ItemBean");
    ItemRemoteHome home = (ItemRemoteHome)PortableRemoteObject.narrow(
        ref,ItemRemoteHome.class);
    ItemRemote remote = home.create("x","y","z");
    String key = remote.getPrimaryKey();
    System.out.println(key);The code works well, but i dont know how my EntityBean knows its primary key when
    i call the remote.getPrimaryKey() method.
    i traced the method invoking and checked the server log.
    // when calling home.create()
    the bean's constructor is called to create a bean
    setEntityContext() is called. but now the primary key in the entity context is null
    ejbCreate() and ejbPostCreate() is called
    ( i inserted a row to the DB in the ejbCreate() method)
    ejbStore() is called
    // when calling remote.getPrimaryKey();
    ejbLoad() is called, so all the bean's instance variables are refreshed
    but non of the getter or setter methods are called
    I think that the primary key is taken from the entity context instead of the bean.
    but when did the entity context get the primary key?
    I never tell the bean that its primary key is its id.
    Stange, isnt it?

    I never tell the bean that its primary key is its id.You should be returning the primary key from the ejbCreate method. The container picks that up and pops it into the EJB context.

  • How do u automatically generate a primary key using JDBC?

    ok, basically i'm given a simple schema
    with 5 fields, one of these are made as a constraint made for primary keys.
    I am programming under Oracle, using JDBC, and everytime i insert a new record into the table using an INSERT statement it says it cant make the id null, well yeah, then how exactly do i make it generate a new ID?
    Thanks guys.

    In the table schema, the cid field is a INTEGER
    type.
    Ok i must of accidentally typed an extra digit, it's
    working now hmmm but i'm starting from this digit now
    : 1000000016
    If i go more higher and it truncates again, is there
    anyway to fix that?No. You can however write your code to verify it.
    Noting of course that the problem will next occur after 1 billion records have been added. So I would question at what rate you think that that table is going to grow.
    Of course you could create your own id but that would require modifying the table.

  • How to use AttributeHierarchyOptimizedState property with Primary Key of the Dimension?

    I'm reading the article about increasing SSAS performance. http://www.mssqltips.com/sqlservertip/2567/ssas--best-practices-and-performance-optimization--part-3-of-4/
    I would like to increase processing performance of Customer Dimension with CustomerID as the primary key. It is a good practice to set AttributeHierarchyOptimizedState to NotOptimized to CustomerID attribute. What are the implications to the query
    performance?
    Please advise.

    Hi,
       Since the CustomerID is the primary key (surrogate key) and the usual practice is to hide the surrogate keys in client tools. It is the best practice to set the AttributeHierarchyOptimizedState to NotOptimized to CustomerID attribute. As specified
    in the article SSAS will not create Bitmap indexes on top of that attribute and it saves a lot of processing time and decreases the cube size.
    Regards,
    Venkata Koppula

  • How to have an auto increment primary key in HDBDD

    Hello,
    Using a HDBDD file I am creating a table in which I need a primary key(recordId) which is auto generated by the DB.
    What would be the way to do this?
    My hdbdd file:
    namespace sap.mobile.data;
            @Schema : 'SAP_TEST'
    context Sample {
    @Catalog.tableType : #COLUMN
      entity Details {
      text : LargeString;
      level : String(10);
      timestamp : UTCTimestamp;
      recordId : ?

    Such syntax for calculated columns isn't supported yet by CDS/HDBDD. The work around people would use today is to use a Sequence in any logic that does an insert into this table.

  • How to make a column a primary key so duplicate records cannot be added

    I have a text column called JPPNum, and I want to make it so a user cannot add the same JPP Number if the record with that JPP number is already in there. So no duplicate on JPP NUm, how would I do that?
    Thank you.

    hi,
    refer to the below article you just have to specify the "yes" in "enforce unique values" 
    setting of column.
    http://www.c-sharpcorner.com/uploadfile/anavijai/unique-column-constraints-in-sharepoint-2010/
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

  • Mail 3 manual configuration?

    How do I manually configure a new account in Mail 3? I don't want to automatically figure out my settings. I want to tell it what my settings are.

    I want to create a new mail account without using the help that comes up automatically when you choose new account under file. How can I just get an account screen that looks like it does after you have created an account but that I can enter the information myself without the automatic program that asks the questions?
    Thank you very much.

Maybe you are looking for