Retrieving Primary Keys MetaData from database

Hello all,
I am trying to retrieve a list of primary keys, give a catalogname, schemaname and tablename. But the ResultSet that's being returned doesn't have the "PK_NAME" column itself.
ResultSet rset = dbm.getPrimaryKeys(null,null,tablename);
while(rset.next())
ResultSetMetaData rsmetadata = rs.getMetaData();
int ncols = rsmetadata.getColumnCount();
for(int i=1;i<=rsmetadata.getColumnCount();i++)
//Here's where I print the columnnames in the ResultSet
     System.out.println(rsmetadata.getColumnName(i));
Can someone tell me how to retrieve the list of primary keys if not this way?
Thanks

Ahh don't worry about this. I figured out the problem :)
Thanks guys.

Similar Messages

  • Setting primary key fields from sequence. Please advise

    What is the most logical place to automatically set primary key fields from
    sequence?
    jdoPrestore seems to be a little late - my instance will not have id till
    it's committed. I can not do it in constructor because it gets called every
    time Kodo needs to construct an instance. What other options do I have for
    automatic pk assignment except do it in my code (hate it)?
    I wish I could use store managed OIDs but I need access to OID underlying
    data
    Please also see my previous message "Application Identity Extention"

    I came up with following pattern:
    public class OrgUnit implements InstanceCallbacks {
    private long orgUnitId = -1;
    private transient long tempOrgUnitId = -1;
    public long getOrgUnitId() {
    if (orgUnitId < 0) {
    if (tempOrgUnitId < 0) {
    tempOrgUnitId = JDOFactory.getNextSequenceId(getClass());
    return tempOrgUnitId;
    } else {
    return orgUnitId;
    public void jdoPreStore() {
    if (!JDOHelper.isDeleted(this)) {
    if (orgUnitId < 0) {
    setOrgUnitId(getOrgUnitId());
    I use -1 as an indicator that ID has not been assigned yet. If you use Long
    instead of long it will be cleaner since we can test for null
    "Alex Roytman" <[email protected]> wrote in message
    news:9q27co$r35$[email protected]..
    What is the most logical place to automatically set primary key fieldsfrom
    sequence?
    jdoPrestore seems to be a little late - my instance will not have id till
    it's committed. I can not do it in constructor because it gets calledevery
    time Kodo needs to construct an instance. What other options do I have for
    automatic pk assignment except do it in my code (hate it)?
    I wish I could use store managed OIDs but I need access to OID underlying
    data
    Please also see my previous message "Application Identity Extention"

  • EjbCreate() method return primary key genereted by database

    Hello Everyone,
    I have entity CMP EJB that maps MySQL database table, which is set to asign Primary key (integer) to new entries automatically by using AUTO_INCREMENT. The problem is ejbCreate(..) method, which returns primary key. My question is: how to make it return primary key generated by database?
    Thanks

    Hi,
    I'm also facing the same problem also. The problem is: how do I code the ejbCreate method?
    If I don't initialize the primary key field, I get a complaint that the primary key field needs to be initialized in ejbCreate.
    But if I try to initialize it to an arbitrary value, the database won't allow me to do the insert, because the primary key is auto-generated.

  • Arabic Characters data is retrieved ??? from database

    Hello
    on entering Arabic Characters data is retrieved ??? from database 10G 2
    any suggestions pls
    my pc lang is Arabic default
    my nls_lang is ARABIC_SAUDI ARABIA.AR8MSWIN1256
    both for : KEY_DevSuiteHome1
    and the : KEY_OraDb10g_home1
    Regards,
    Abdetu

    If this is a recent installation and the non-Arabic data in the database isn't critical, the simplest solution would be to delete the existing database on your colleague's machine and to create a new one. Assuming you're using the DBCA to create the database, make sure when going through the installation this time that the database character set supports Arabic data (i.e. a database character set of Windows-1256 or UTF-8).
    And if these databases are intended to be separate development databases for the same project, I would suggest spending some time working on developing a process to ensure that each developer's local instance is configured identically and that these configurations match the production configuration. It would be unfortunate, for example, if you were developing on a Windows-1256 database and the production database turned out to have a different character set. The simplest (though not necessarily most elegant) solution would probably to create a template using the DBCA and to use that template on each developer's machine rather than having people individually click through the installer.
    Justin

  • Error retrieving REN server URL from database

    Getting the following error in MCFLOG1 and USQSRV1 log files. Checked all published REN solution guide, nothing really worked. REN server seems to be working though. Coming from loadbalancerURL.peoplesoft.com it pings and REN features work. Ren is set up using machine names though. If logging in directly to machinename.peoplesoft.com REN ping fails with Forbidden error, but that could be a caching issue. I am worried about the log files below and the app. server performance deterioration which may or may not be related.
    We have machine1 with web/app (REN is configured there) and machine two with web/app on it. Also, there is an F5 load balancer in front of them. Any thoughts?
    PSMCFLOG1.5324 (0) [07/09/12 00:18:16](1) (PSMCFLOG1): Error retrieving REN server URL from database
    PSMCFLOG1.5324 (0) [07/09/12 00:19:16](1) (PSMCFLOG1): Error retrieving REN server URL from database
    PSMCFLOG1.5324 (0) [07/09/12 00:20:16](1) (PSMCFLOG1): Error retrieving REN server URL from database
    PSMCFLOG1.5324 (0) [07/09/12 00:21:16](1) (PSMCFLOG1): Error retrieving REN server URL from database
    PSMCFLOG1.5324 (0) [07/09/12 00:22:16](1) (PSMCFLOG1): Error retrieving REN server URL from database

    I restarted the services and the error stopped.
    Thanks
    Ramya

  • Adding 2 primary keys in mdf database in VS Community 2013 from Server Explorer

    Hello,
    I have to update a Windows Forms application using VS Community 2013. I have to add a little database with customers and installations, so 1 customer can manage many installations and 1 installation can be managed by many customers. It is the first
    time that use VS 2013 so I don't know if I have done all steps well:
    Right click in the project item -> Add -> New item -> Data -> Service-base Database. I don't know what "service-based" means, but is the only way I can see to add a database. This step added
    mydb.mdf file to the project.
    Server Explorer -> Data Connections -> mydb.mdf -> Right click on Tables -> Add New Table. I have added
    Customer and Installation tables with no problem. These are T-SQL scripts:
    CREATE TABLE [dbo].[Customer]
    [UserName] NVARCHAR(50) NOT NULL PRIMARY KEY,
    [Password] NVARCHAR(50) NOT NULL,
    [FullName] NVARCHAR(50) NOT NULL,
    [Company] NVARCHAR(50) NULL,
    [Contact] NVARCHAR(100) NULL
    CREATE TABLE [dbo].[Installation]
    [Imei] NVARCHAR(15) NOT NULL PRIMARY KEY,
    [Ip] NVARCHAR(15) NOT NULL,
    [Name] NVARCHAR(50) NOT NULL
    Now, I have to create CustomerInstallation table with 2 primary keys. The script:
    CREATE TABLE [dbo].[CustomerInstallation]
    [UserName] NVARCHAR(50) NOT NULL ,
    [Imei] NVARCHAR(15) NOT NULL,
    PRIMARY KEY ([UserName]),
    PRIMARY KEY ([Imei]),
    CONSTRAINT [FK_CustomerInstallation_Customer] FOREIGN KEY ([UserName]) REFERENCES [Customer]([UserName]),
    CONSTRAINT [FK_CustomerInstallation_Installation] FOREIGN KEY ([Imei]) REFERENCES [Installation]([Imei])
    When I click the Update button, I get the following error message:
    Update cannot proceed due to validation errors.
    Please correct the following errors and try again.
    SQL71533 :: A table or table-valued function ([dbo].[CustomerInstallation]) contains more than one primary key.
    SQL71531 :: The table or view ([dbo].[CustomerInstallation]) has more than one clustered index.
    So my question is: How can I add 2 primary keys to the table? Is it posible with this "service-based" database?
    Thank you for all,
    Jon.
    PD: I didn't know in what forum write this question, please, move this thread to the appropriate forum. Sorry for the inconvenience.

    You can only have one primary key per table but the primary key can be over multiple columns so:
    CREATE TABLE [dbo].[CustomerInstallation]
        [UserName] NVARCHAR(50) NOT NULL , 
        [Imei] NVARCHAR(15) NOT NULL, 
        PRIMARY KEY ([UserName], [Imei]),    
        CONSTRAINT [FK_CustomerInstallation_Customer] FOREIGN KEY ([UserName]) REFERENCES [Customer]([UserName]),
        CONSTRAINT [FK_CustomerInstallation_Installation] FOREIGN KEY ([Imei]) REFERENCES [Installation]([Imei])
    will let you have both columns as part of the primary key

  • Problem with foreign and primary keys migration from SQL Server to Oracle

    Hi folks, i'm using SQL Developer to migrate from a SQL Server database to Oracle and i'm stuck with a couple issues:
    The worst of them so far is the fact that i can't migrate any of the PKs and FKs. After successfully capturing the SQL Server DB model and converting it to Oracle, when the tool generates the scripts, all ALTER TABLE queries that add the PKs and FKs have their target columns duplicated.
    for example: when i'm trying to migrate a simple table that contains an Id (PK) and Name columns, the tool generates the following scripts:
    PROMPT Creating Table TestTable...
    CREATE TABLE TestTable (
    Id NUMBER(10,0) NOT NULL,
    Name VARCHAR2 NOT NULL
    PROMPT Creating Primary Key Constraint PK_TestTable on table TestTable ...
    ALTER TABLE TestTable
    ADD CONSTRAINT PK_TestTable PRIMARY KEY
    Id,
    Id
    ENABLE
    As for the FKs, the tool duplicates the columns as well:
    ALTER TABLE SomeTable
    ADD CONSTRAINT FK_SomeTable_SomeTable2 FOREIGN KEY
    SomeTable2Id,
    SomeTable2Id
    REFERENCES SomeTable2
    Id,
    Id
    ENABLE
    Does anyone have a clue on how to solve these issues? I'd be greatly thankful for any answers!

    Hi Fernando,
    I was unable to replicate this issue. My primary / foreign keys where defined using unique columns.
    PROMPT Creating Primary Key Constraint PK_Suppliers on table Suppliers ...
    ALTER TABLE Suppliers
    ADD CONSTRAINT PK_Suppliers PRIMARY KEY
    SupplierID
    ENABLE
    I tried a few things like
    capturing twice and renaming both models the same
    renaming the converted models
    but with no luck.
    I think this issue is occuring either at the capture or convert phase.
    1) Are you performing the capture online or offline?
    2) Can you provide a the entire DDL for one of these tables and its indexes to see if I can replicate?
    3) Did the capture or convert fail or have to be redone at any stage ?
    I all else fails I would attempt a capture and convert again using a brand new repository (create a new schema in Oracle and associate the migration repository with it).
    Regards,
    Dermot
    SQL Developer Team
    Edited by: Dermot ONeill on Oct 22, 2009 12:18 PM

  • Primary Key - Generated by database TRIGGER

    Hi,
    I have a form with a block that is attached to a table. So far, nothing fancy :-)
    The Primary is generated with an ORACLE SEQUENCE. That is done at the TABLE level with a DATABASE trigger.
    So in the form, the primary field is not populated.
    Works fine. But if the user wants to UPDATE the forms content, right after they did an INITIAL commit, THEY CAN'T !!!!!!!!!!!
    How can I code this in the form?
    Is there a way to syncronize (populate) the primary key in the form with it's table content?
    If so, how do I query the table if I don't have the primary key value ?
    Thanks for ANY advise,
    Marc.

    Another solution is to use both a database trigger and a PRE-INSERT trigger in Forms.
    The database trigger should be something like
    CREATE TRIGGER INS_TABLENAME BEFORE INSERT ON TABLENAME
    FOR EACH ROW WHEN (new.ID IS NULL)
    BEGIN
    SELECT TABLENAME_SEQ.nextval INTO :new.ID FROM DUAL;
    END;
    and the PRE-INSERT trigger should be something like:
    SELECT TABLENAME_SEQ.nextval INTO :blockname.ID FROM DUAL;
    This way one solves the problem of DML RETURNING VALUE not working in Forms with Oracle version > 8 (does it work on version 8 as it is said to be? - i have not tested it anyway) and the use of other applications (SQL*Plus, JAVA, etc) without writing any code.

  • Query to return list of all missing primary key ids from table T1

    I found this query online that returns a start and stop for a range of all missing primary key id values from table T1. However i want to rewrite this query to return a whole list of all the missing primary key ids and not a start and stop range. any help plz?
    select strt, stp
    from (select m.id + 1 as strt,
    (select min(id) - 1 from T1 x where x.id > m.id) as stp
    from T1 m left outer join T1 r on m.id = r.id - 1 where r.id is null)x where stp is not null

    with t as
              select  1 as id from dual union all
              select  2 as id from dual union all
              select  3 as id from dual union all
              select  5 as id from dual union all
              select  8 as id from dual union all
              select 10 as id from dual union all
              select 11 as id from dual union all
              select 20 as id from dual
    select  id_start + level missing_id
      from  (
             select  id id_start,
                     nullif(lead(id) over(order by id) - 1, id) id_end
               from  t
      start with id_end is not null
      connect by prior id_start = id_start
             and prior dbms_random.random is not null
             and level <= id_end - id_start
    MISSING_ID
             4
             6
             7
             9
            12
            13
            14
            15
            16
            17
            18
    MISSING_ID
            19
    12 rows selected.Or:
    with t as
              select  1 as id from dual union all
              select  2 as id from dual union all
              select  3 as id from dual union all
              select  5 as id from dual union all
              select  8 as id from dual union all
              select 10 as id from dual union all
              select 11 as id from dual union all
              select 20 as id from dual
    select  id_start + level - 1 missing_id
       from  (
              select  min(id) id_start,
                      max(id) id_end
                from  t
       connect by level <= id_end - id_start
    minus
    select  id
       from  t
    MISSING_ID
             4
             6
             7
             9
            12
            13
            14
            15
            16
            17
            18
    MISSING_ID
            19
    12 rows selected.SY.

  • Determining the primary key in a database table

    Hi people..
    I am building an interface which displays the database information...according to the specified datasource name..
    Up till now i managed to display the different tables and the respective attributes...
    Is there a way of how i can determine (through java code) if an attribute is the primary key or not of the corresponding table??
    Thanks for your time..
    Regards
    S

    Hi thanks for your reply however when i run the above code i get the following exception..
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Driver does not support this function
    the statement causing such exception is ..
    ResultSet rs = dbMetaData.getPrimaryKeys(null, null, tableName);
    Do you have any suggestions...??? Sincerely i dont know what i can do..If it can helps the database i m connecting to is an access 2000 database and i am connecting to the database like this:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection connection = DriverManager.getConnection("jdbc:odbc:"+dataSourceName,username,password);
    Thanks a lot again

  • [SOLVED] Show only primary key columns in database diagrams

    Hi,
    I'd like to create a database diagram with some tables hiding all the columns that aren't primary key or foreign key.
    Currently the only way that I've found is right click on the column's name (in the table body visualized into the diagram) --> Hide selected shape
    I've found the option that permits to visualize the constraint name and (optionally) the relative fields on the same row but what I'd like is something like:
    <Table name>
    <column_name> PK
    <column_name> PK
    <column_name> FK1
    <column_name> FK2
    Do you know a way to do this?
    Many thanks
    Best regards
    Message was edited by:
    Tranen

    Hi Tranen,
    you can view the constraints and respective columns by setting the
    Table Shape Properties in the Property Inspector.
    Select (all) the tables on the Diagram you want
    In the Property Inspector,under Constraints -Set the 'Show Constraint Columns' to 'True',
    Set 'Show Constraints' to 'True' .
    Constraints (PK,UK,FK,Check)
    Also Set the 'Show Columns' option to 'False' .This will be under display options in the Property inspector.
    This should modify the Table shape in the diagram as follows:
    <Table name>
    <PK> PKName:Column1,Column2
    <UK>UKName:Column3
    <FK>FKname:Column1
    are you looking for the same?
    Thanks.

  • How to populate field on page with Primary Key value from previous page

    I am trying to create a patient tracking system for a group of doctors. There is an add patient form based on the Patient table (which has Patient_Id as its primary key) which branches to a pre-operative assessment form. I would like to populate the pre-op assessment Patient_Id field with the Patient_Id generated by the Add Patient page during processing, which comes from the Patient_seq sequence. How can I do this? I have tried using a computation on the Pre-Op Assessment form, but no matter what I put in, the field remains blank.

    Hi,
    If I understand you correctly, once patient record is created you branching to next page (pre-operative assessment form). First create a static hidden item in patient form *:PX_PATIENT_ID_COPY*.
    Create an On submit after computation and validation process in patient form to get the inserted patient_id from patient table. Here is the code -
    SELECT patient_id into :PX_PATIENT_ID_COPY from patient_table where rownum=1
    order by patient_id descI would not use the sequence to get the current value because if the inserted record been deleted from your patient table, sequence current value would not be valid to find that record in patient table.
    Basically when the record been inserted, the process get the value and put into the hidden item.
    Pass the value from the hidden item to the next page by setting them in page branch. Under the Action section in the page branch, Set this items field type - *:PX_PATIENT_ID* (next page item for patient_id). Type *&PX_PATIENT_ID_COPY.* in the with these values field. Make sure you include dot(.) after *&PX_PATIENT_ID_COPY*.
    Give it a try now. Hope it would helps.
    Regards,
    Tajuddin
    Blog: http://aspblog.whitepagesbd.com
    web: http://tajuddin.whitepagesbd.com

  • Need to get primary key value from entity

    Hi,
    I have 2 pages. In the first page on click of GO button, Im inserting data into table using EO and Immediately navigating to second page.
    Primary Key value is generated in EOImpl java file.
    In second screen, in the header region, I need to show the row inserted in table.
    to query the VO, i need to have primary key generated in EOImpl.
    Please let me know how can i get this value in either in PFR of first page or in PR of second page. Thanks.

    Hi
    have you included the eo that tyou are refering to in the header oif the second page..
    if both pages are using the same AM, the data will appear.
    at worse can you can get the ID from the eo using amethod in your AM.

  • Retrieval of image (Blob) from database - doesn't always work in JSP - Why?

    In my JSP pages, when an image needs to be retrieved, I direct <img src> to a servlet that handles image processing.
    As an example, if I have 30 products that need to be shown on 1 webpage, there will be 30, dynamically generated, <img src="go.imageServlet?id=a1"> tags/statements. The servlet, when called, will make a connection to the database, run a query for the image requested (fetched as type Blob), image displays in <img src> area of JSP page, and finally the ResultSet, Statement, and Connection object(s) are closed.
    I tested this out, and unfortunately, to my surprise, and disappointment, a few images did not display on the page. Though the images are in the database table. I'm a little lost as to why this problem is occurring.
    Can someone please shed some light on this for me?

    evnafets wrote:
    If you request just one image, does that image come back broken, or is it different images that are 'broken' each time?On a page of almost 30 image requests (thumbnail size), it varies, but typically, 1-3 images are 'broken' each time. And they are not always the same images. Very strange.
    There may potentially be thread concurrency errors depending upon how you have written your servlet - ie one request for an image interfering with another because they use the same variable.
    To make it threadsafe, in your servlet make sure that you only use variables local to the doGet/doPost method, and not any class attributes.In my JSP page that makes the requests for these images, a String array generates the <img src> tags on the page, as a very basic example :
    <%  for(int i=0; i<products.length; i++) {
    %>
          <img src="go.imageP?imageNumber=<%=products[[0]%>">
    <% }//for %>
    Sorry for not posting code snippets from my servlet in my first post of this topic....
    Here is my servlet snippet -     public class ImageProcessingServlet extends HttpServlet {
              public Connection conn = null;
              public ResultSet rs = null;
              public Statement stmt = null;
              public PreparedStatement pstmt = null;          
              public PrintWriter out = null;     
              public String siteNameReference = "";
              int maxFullSizeImageWidth = 600;          
              int maxSizeImageWidth = 300;
              int maxSizeThumbWidth = 140;
              int maxImageFields = 4;
              String errorMessage = "";               
              public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
                   doPost(req,res);
              public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
              try {                       
         HttpSession session = req.getSession();
         siteNameReference = req.getParameter("snr");
         String process = req.getParameter("process");
         if(process == null) process = "";
                   Context ctx = new InitialContext();
              if(ctx == null )
    throw new Exception("Boom - No Context");
              DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/imageDB");
         conn = ds.getConnection();
         stmt = conn.createStatement();      
              rs = stmt.executeQuery("Select "+imageNumber+" from images");
              rs.next();
              Blob blobImage = rs.getBlob(1);               
              getImage(blobImage,"thumb",res);
              if(rs != null) { rs.close(); }
              rs = null;
         if(stmt != null) { stmt.close(); }
         stmt = null;
         if(pstmt != null) { pstmt.close(); }
         pstmt = null;
         conn.close();
         conn = null;          
              }//try
         catch (Exception e) { }
         finally {
                   if (rs != null) {
                   try { rs.close(); } catch (SQLException e) { ; }
                   rs = null;
                   if (stmt != null) {
                   try { stmt.close(); } catch (SQLException e) { ; }
                   stmt = null;
                   if (pstmt != null) {
                   try { pstmt.close(); } catch (SQLException e) { ; }
                   pstmt = null;
                   if (conn != null) {
                   try { conn.close(); } catch (SQLException e) { ; }
                   conn = null;
              }//finally
         }//post          
              public void getImage(Blob blobImage, String imageType, HttpServletResponse res) {
                   try {                                              
                        //imageType will = Super = 600
                        // = Large = 300
                        //               = Thumb = 150
                        res.reset();
                        res.setContentType("image/jpeg");
                        BufferedInputStream bis = new BufferedInputStream(blobImage.getBinaryStream());                    
                        BufferedOutputStream bos = new BufferedOutputStream(res.getOutputStream());                                                            
                        if(imageType.equals("super")) {
                        byte[] imageBytes = new byte[(int)blobImage.length()]; //picture size           
         int length;
         while((length = bis.read(imageBytes)) > 0) {
    bos.write(imageBytes, 0, length);
         bos.flush();     
                   res.flushBuffer();
                        } else
                        if(imageType.equals("large")) {
                             resize(bis,bos,maxSizeImageWidth);
                             bos.flush();
                             res.flushBuffer();
                        } else
                        if(imageType.equals("thumb")) {
                             resize(bis,bos,maxSizeThumbWidth);
                             bos.flush();
                             res.flushBuffer();                         
                        }//if
                        //close streams
                        bis.close();
                        bos.close();
                   }//try
                   catch(Exception e) {}
              }//end          
         public void resize(BufferedInputStream bis, BufferedOutputStream bos, int maxImageWidth) {
              try {                            
              BufferedImage bufimg = ImageIO.read(bis);                                         
              //size of image
              int img_width = bufimg.getWidth();
              int img_height = bufimg.getHeight();               
              double scale = (double)maxImageWidth/(double)img_width;                    
              Image sized = getScaledInstanceAWT(bufimg, scale, Image.SCALE_SMOOTH);
              //convert image to BufferedImage
              BufferedImage resized = toBufferedImage(sized, BufferedImage.TYPE_INT_RGB);                                                                                
                        ImageIO.write(resized,"jpeg",bos);                                                                           
         }//try
         catch(Exception e){}
    }//end
    Edited by: webnotick on Apr 13, 2010 12:24 PM
    --added a method to the code snippet --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Retrieve radio button data from database

    Hello,
    I have a website developed using html, jsp and connected to an oracle database. I have a registration form namely registation.jsp where i have a set of radio buttons. Then I have a duplicate of that form namely registration_edit.jsp which I have named an edit one as all data which i have put on my registration will appear on the edit one where a person can edit his data. The problem is that only the radio buttons and checkboxes i am not able to retrieve their values from the registation.jsp to the registration_edit.jsp. Can u please give the codes for the radio buttons and check boxes? below i am copying some of the codes of my registration_edit.jsp for you to get an idea of what i want.
    Thank you and if u could plz give an urgent response as i need to submit my project.
    For radio buttons:
    <td valign="middle"><input name="biztype" checked="checked" type="radio" id="biztype3" onclick="checko();" value="corporate" />
                    <span class="TXT"> </span> Corporate/Limited</td>
                <td valign="middle"><input name="biztype" checked="checked" type="radio" id="radio2" onclick="checko();" value="partnership" />
      Partnership</td>
                <td valign="middle"><input name="biztype" checked="checked" type="radio" id="biztype1" onclick="checko();" value="other"/>
      Other
        <input name="biztypeo" type="text" disabled="disabled" id="biztypeo" value="<%=biztypeo%>" size="30" maxlength="20"/></td>For check boxes:
    <td width="273" valign="middle" class="style4"><font face="Verdana, Arial, Helvetica, sans-serif">
                  <input name="work1" type="checkbox" id="work1" value="Air conditioning installations" />
                  <font size="2">Air conditioning installations</font></font></td>
                <td width="252" valign="middle" class="style4"><font face="Verdana, Arial, Helvetica, sans-serif">
                  <input name="work2" type="checkbox" id="work2" value="Asphalt paving" />
                  <font size="2">Asphalt paving</font></font></td>
                <td width="277" valign="middle" class="style4"><font face="Verdana, Arial, Helvetica, sans-serif">
                  <input name="work3" type="checkbox" id="work3" value="Cable installation" />
                  <font size="2">Cable installation</font></font></td>Edited by: user4555860 on Jul 8, 2009 11:20 PM

    Mohammed Taj wrote:
    Superb. I never seen this of of urgent query :)
    Thanks
    Regards,
    TajMee too Taj :)
    @OP - It general Database topic. Please post your question unde correct topic to get an answer. Find the related topic from below link:
    http://forums.oracle.com/forums/main.jspa?categoryID=84
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]
    Edited by: Kamran Agayev A. on Jul 9, 2009 11:21 AM

Maybe you are looking for

  • My emails do not appear in the mail program.

    MacBook Pro - Version 10.10.1 8gb memory 1 tb storage Mail Program Version 8.1 Messages suddenly stopped appearing. What do I do? I have restarted computer and force quit and restarted mail.

  • File t http

    In a file to http scenario, what can we use as a receiver system for testing? What are the parameters we can give? can we have an ftp to ftp scenario using http protocol in the receiver side?

  • Using @font-face in css skin

    Well it has been ask before... Using Custom Fonts in ADF Using Custom Font Load in ADF within a style sheet under skin Include Custom Font in ADF Skin file But the question has not been answered, yet. So is the at-rule @font-face supported, to be use

  • QUESTION: what is the BEST armband out there to avoid sweat build-up?

    I've just finished running with my Nano 4G and a Belkin armband, but the workout ended abruptly, most probably because of sweat between the transmitter and the iPod...having read several reviews and different opinions, I still don't know which one is

  • Error: cannot contact reliable source

    i have been trying to download the flashplayer and at 12% i keep getting this error: cannot contact reliable source i have tried disabling my firewall and antivurs but that didnt work im using 64bit operating system and internet explorer 9 any idea h