Code for Links from table

i have attached the code with table having a field of Empid.
how to give a link from Empid field to generate Empname,Depname
in a table format.
<html>
<head>
<title>Masterreport.jsp</title>
</head>
<body>
<%
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException excep)
System.out.println("exception caught"+excep.getMessage());
java.sql.Connection con=java.sql.DriverManager.getConnection("jdbc:odbc:Visualcaccess");
java.sql.Statement st=con.createStatement();
java.sql.ResultSet rs=null;
try
String string="select Empno from Employe" ;
rs=st.executeQuery(string);
}catch(Exception e)
out.write("Exception caught"+e.getMessage());
%>
<TABLE border="1" cellpadding="5">
     <TBODY>
          <TR>
               <TH colspan="1"><U>Updated List ofEmployees</U></TH>
          </TR>
          <TR>
               <TH>Emp Name</TH>
          </TR>
          <% while(rs.next()){ %>
          <TR>
               <TD><%=rs.getInt(1)%></TD></A>
          </TR>
     <%}
rs.close();
st.close();
con.close();
%>
</TBODY>
</TABLE>
</form>
</body>
</html>

Example from jsp document. Modify this to suit your needs. hope this helps.
<%
while (RS.next()){
id = RS.getInt("id");%>
<a href="cp5.jsp?id=<%=id%>">voting</a>
<%
%>
then
int id = Integer.parseInt(request.getParameter("id"));
String empname = "";
String depname = "";
SELECT * FROM TABLE WHERE id=id;
<%
if (RS.next()){
empname = RS.getString("empname");
depname = RS.getString("depname");
%>
<tr>
<td>
<%=empname%><%=depname%>
</td>
</tr>
<%
%>

Similar Messages

  • HT4480 I have redemption codes for FCP from my university - how many machines can I install on?

    I have redemption codes for FCP from my university - how many machines can I install on?

    Do you have these codes because this will be your app? Or is this a "loan" from the school to install on your machine? Do you use your own Apple ID to redeem the code and install the app?
    If it is your app, then you may install it on as many Macs as you own or have in your control.

  • How to create transaction code for a Z-table

    How to create transaction code for a Z-table?
    Se93 --> then which radio button to be selected? and what is the program nam e to  be given

    Hi Sam,
    <b>Procedure to create a TCODE for ZTABLE:</b>
    Create a table maintainance/View for the Z* Table.
    Once you create the view goto SE93>Select Parameter transaction and give the short desc.>
    Give the transaction as SM30(Skip the first screen-optional)>Check all check boxes under GUI support>In the default values(grid)section first row give the VIEWNAME as you created initially and the second row UPDATE as X.
    <u><i>Se93 --> then which radio button to be selected</i></u>
    Select the parameter transaction as a radio button.
    <u><i>what is the program nam e to be given</i></u>
    no need to give any program name. Instead you have to give the transaction code name as SM30.
    Pls mark the helpful answers.
    Thanks
    Eswar

  • RH Automatically Changing HTML Code for Links

    For some reason, RH is doing something to the links I create. In my stylesheet, I have the following code for links:
    a {
        color: #054abc;
        cursor: pointer;
    a:hover {
        color: #336699;
        text-decoration: none;
    a:active {
        color: #333333;
    When I create a link, the HTML code looks like this *at first*:
    <a href="Development_Plan.htm">Development Plan</a>
    But then, after I save the file and switch to HTML view, the code looks like this:
    <a href=" Development_Plan.htm" style="color: #0000ff; text-decoration: underline; ">Transcript</a>
    I am not doing anything other than saving the file, and that apparently causes RH to automatically add the style (color and text-decoration). Why is RH adding that? It's causing my links not to change color when you hover over them.
    How can I make RH stop doing that, so my links display as defined in the stylesheet?

    Hi,
    This is strange behaviour. How exactly do you create a hyperlink? I have seen this behaviour only with links that are empty or contain a single space.
    As a workaround, in your css, add the !important declaration to your hover styles:
    a:hover
    Although this isn't an elegant solution, it will overwrite the inline styling of the link and thus change colour on hover.
    Greet,
    Willam

  • Query for Linking Two Tables without Reference

    Hi Folks,
    Good Day!
    I have this dilemma on how to link two tables without a reference. In the Business Partner Master Data, there is a field for the Territory which is from the table OTER. This OTER focuses on its description. Once you have added the particular Territory for that Business Partner, it is being stored in the Territory field of the BP right? Our client wants to have an automated way of searching for the Business Partner's Profit Center in creating a Sales Order wherein it is the same as the Business Partner's Territory. The Profit Center is from the table OPRC.
    When I create a Sales Order, after I have entered the Business Partner/Customer Code, the Profit Center should have the value of the Profit Center Code wherein it is the Business Partner's Territory. My query will go like this:
    Enter the BP/Customer Code automatically the Profit Center code where Profit Name = BP's Territory.
    OTER and OCRD don't have connections. How can it be?
    I'm thinking of retrieving the Territory first before the Profit Center but can you suggest of any other way?
    Thank you much!
    Regards,
    Fringe

    Hi Fringe,
    Okay, I already understood your case here. I presume your configuration as follows:
    OTER (Territory)
    territryID - descript
    1 - Philippine
    2 - Indonesia
    3 - Germany
    OPRC (Cost Centre)
    PrcCode - PrcName
    25 - Philippine
    33 - Indonesia
    47 - Germany
    Was above illustration correct? Then, you could use this formatted search in Cost Centre / Dimension field in Sales Order rows
    SELECT PrcCode FROM OPRC WHERE PrcName=(
    SELECT TOP 1 descript FROM OTER T0
    INNER JOIN OCRD T1 ON T0.territryID=T1.Territory
    WHERE T1.CardCode=$[OCRD.CardCode.0])
    However, I suggest you use a little bit different approach here. Since you can't define Territory Code / Territory ID (you could only type the Territory name, Philippine etc.), why don't you standardize Territory name with Cost Centre code? Let say, you define Philippine as PHI, Indonesia as INA, Germany as DEU and so on. Therefore, user can read the Cost Centre or more precisely Distribution Rules in Sales Order form in more familiar way.
    OTER (Territory)
    territryID - descript
    1 - PHI
    2 - INA
    3 - DEU
    OPRC (Cost Centre)
    PrcCode - PrcName
    PHI - Philippine
    INA - Indonesia
    DEU - Germany
    When FMS worked in Sales Order document, your user will read PHI instead of 25, should be more familiar to them. With that being said, you could use simpler FMS
    SELECT descript FROM OTER T0
    INNER JOIN OCRD T1 ON T0.territryID=T1.Territory
    WHERE T1.CardCode=$[OCRD.CardCode.0]
    You only need to maintain consistency between Territory Name and Cost Centre code. Just my two cents. Hope this help.
    Best Regards,
    Hendry Wijaya

  • Code for va01 bdc table control

    hi
    i want to CODE FOR  bdc table control  VA01 (TCODE)
    ASAP

    Awadhesh,
    just refer:
    Problem in the BDC Table Control for the T.Code VA01
    BDC Uploading from flat file to VA01.
    BDC For Line Items In Sales Order
    dont forget reward.
    Amit.

  • Open sys_refcursor for select from table variable?

    Hi,
    I've got a challenge for you! :-)
    I've got a procedure that has a lot of logic to determine what data should be loaded into a table variable. Because of various application constraints, i can not create a global temporary table. Instead, i'd like to create a table variable and populate it with stuff as i go through the procedure.
    The end result of the procedure is that i must be able to pass the results back as a sys_refcursor. This is a requirement that is beyond my control as well.
    Is there a way to make this sort of procedure work?
    Create Or Replace Procedure Xtst
    Mu_Cur In Out Sys_Refcursor
    Is
    Type Xdmlrectype Is Record (Col1 Varchar2(66));
    Type Xdmltype Is Table Of Xdmlrectype;
    Rtn Xdmltype;
    Begin
    Select Internal_Id Bulk Collect Into Rtn From Zc_State;
    open mu_cur for select col1 from table(rtn);
    end;
    11/42 PLS-00642: local collection types not allowed in SQL statements
    11/36 PL/SQL: ORA-22905: cannot access rows from a non-nested table item
    11/19 PL/SQL: SQL Statement ignored
    Show Errors;

    Not anything i'd want to personally implement.
    But for educational purposes only of course....
    create table this_will_be_gross
       column1 number,
       column2 varchar2(30)
    insert into this_will_be_gross values (1, 'begin the ugliness');
    insert into this_will_be_gross values (2, 'end the ugliness');
    variable x refcursor;
    ME_XE?
    declare
       Rtn sys.ODCIVARCHAR2LIST;
    BEGIN
       SELECT
          column1 || '-' || column2 Bulk Collect
       INTO
          Rtn
       FROM
          this_will_be_gross;
       OPEN :x FOR
       SELECT 
          regexp_substr (column_value, '[^-]+', 1, 1) as column1,
          regexp_substr (column_value, '[^-]+', 1, 2) as column2      
       FROM TABLE(CAST(rtn AS sys.ODCIVARCHAR2LIST));
    end;
    17  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.09
    ME_XE?
    ME_XE?print :x
    COLUMN1                        COLUMN2
    1                              begin the ugliness
    2                              end the ugliness
    2 rows selected.
    Elapsed: 00:00:00.11In the above example i 'knew' that a hypen was a safe character to use to break up my data elements (as it would not be found anywhere in the data itself).
    I would strongly encourage you not to implement something like this. I realize it's tempting when you are working in strict environments where it can take a serious battle to get structures like temporary tables or SQL Types created, but that's really the proper approach to be taking.

  • Html form for select * from table a

    Hi all,
    I m looking for report on header/footer part from one apex pages
    which will display context from table a, like sql statement
    select * from table a, written in html.
    Is any examples in java script/html select from tables
    (and same insert into table A (...) select * from table b)
    thanks,
    Gordan

    Hello Gordan,
    Do you want to show the whole report or just some data of it?
    If it's for ex just the name and address you could create two items and have a process or computation to fill it with your select statement.
    If it's the whole report, just create the report and put it in for ex. Region 1. In your page template you can specify that Region 1 needs to come into the footer.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://apex-evangelists.com/
    -- http://apexblogs.info/

  • Code for mailing from behing a proxy using Authentication

    Dear friends,
    I have found several requests regarding the mailing from behing a firewall/proxy with Authentication.. So here is the entire code for the same..
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    import java.util.*;
    import javax.mail.*;
    import javax.mail.event.*;
    import javax.mail.internet.*;
    public class MailClient extends Frame{
    static String mailHost="proxyAddress";
    public MailClient() {
    public static void main(String[] args) {
    Properties properties=new Properties();
    properties.put("mail.smtp.host",mailHost);
    properties.put("mail.smtp.auth","true");
    Session session=Session.getDefaultInstance(properties,new MyAuthentication());
    try{
    Message msg=new MimeMessage(session);
    InternetAddress address[]={new InternetAddress("toAddress1.domain.com")};
    msg.setRecipients(Message.RecipientType.TO,address);
    msg.setSubject("Test Mail");
    msg.setFrom(new InternetAddress("[email protected]"));
    msg.setContent("Please reply.. This is a java mail using Authentication
    technique..","text/plain");
    Transport transport=session.getTransport("smtp");
    transport.connect();
    transport.sendMessage(msg,msg.getAllRecipients());
    }catch(Exception e){e.printStackTrace();}
    Hope this helps..
    regards Stallon
    class MyAuthentication extends Authenticator{
    public PasswordAuthentication getPasswordAuthentication(){
    return new PasswordAuthentication("userName","password");
    }

    Hi stallon,
    Thanks for ur reply.Actually my application is at server2. I have an account in server1 and sending mail from server2. server1 requires authentication to send it to server3. Though we provide it is not accepting.There no errors while execution but mail couldn't be send.
    Please help me as soon as possible.
    Thanks in advance,
    bdurvasula
    //debug code.
    DEBUG: getProvider() returning
    javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
    Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG: SMTPTransport trying to connect to host
    "host", port 25
    DEBUG SMTP RCVD: 220 host ESMTP
    server (Netscape Messaging Server - Version 3.6)
    ready
    Thu, 21 Jun 2001 14:23:15 +0800
    DEBUG: SMTPTransport connected to host
    "host", port: 25
    DEBUG SMTP SENT: EHLO rao
    DEBUG SMTP RCVD: 250-host
    250-HELP
    250-EXPN
    250-ETRN
    250-PIPELINING
    250-DSN
    250 AUTH=LOGIN
    DEBUG SMTP SENT: MAIL FROM:<[email protected]>
    DEBUG SMTP RCVD: 250 Sender
    <[email protected]>
    Ok
    DEBUG SMTP SENT: RCPT TO:<[email protected]>
    DEBUG SMTP RCVD: 250 Recipient
    <[email protected]> Ok
    Verified Addresses
    [email protected]
    DEBUG SMTP SENT: DATA
    DEBUG SMTP RCVD: 354 Ok Send data ending with
    <CRLF>.<CRLF>
    DEBUG SMTP SENT:
    DEBUG SMTP RCVD: 250 Message received:
    7745C8DA90B.AAA27D7
    DEBUG SMTP SENT: QUIT
    //now i am sending the mail that was sent by my server
    This Message was undeliverable due to the following
    reason:
    Your message was not delivered because the
    destination
    computer
    refused to accept it. The error message generated
    by
    the server
    is reproduced below.
    Non-local addressee. We do not relay!
    Please reply to Postmaster@mailserver .if you feel
    this message to be in error.Thanks once again
    bdurvasula

  • What is the code for updating a table of content?

    I'm looking online and not finding a command list or something helpful. I'm also on a government computer so a bunch of sites are blocked for security or something. I am making a script that does a few things and one needs to be updating the TOC but I cant find the command.
    I wish this software had something simular to a program called MAYA has. "echo all commands" in the script editor so anything you do shows all code being exicuted.

    Theoretically, if you are using Adobe's own ESTK to write your scripts, all commands can be found in the Help menu. Then again, searching in there is needlessly made difficult (i.e., you have to know exactly what you are searching for before you can find it). So (modest cough) ... Adobe InDesign CS6 (8.0) Object Model JS: Table of Contents
    The command you are looking for is not in the "Table of Content Suite" since that only describes the format of the contents. It is a Document method: Adobe InDesign CS6 (8.0) Object Model JS: Document -- look for createTOC (this stupid editor doesn't show it but the link already points to the correct place -- perhaps this editor was written by "We Also Brought You The ESTK").
    Searching through the thousands of pages is easier if you download the CHM version and use a good CHM viewer. Check out
    http://www.jongware.com/idjshelp.html

  • Parallel Query - using hints for multiple 'from' tables

    Currently I am running the following (simplified) query:
    INSERT /*+ APPEND */ INTO NEW_TAB (ID)
    SELECT DISTINCT T1.BIG_ID
    FROM   BIG_TAB1 T1, BIG_TAB2 T2
    WHERE  T1.BIG_ID = T2.ID2
    AND    T2.METHOD = 1
    AND    T1.CODE IN ( /*16 codes here*/ );When this migrates to the production platform the DBAs have asked me to code it for parallel processing.
    We implement 4 processors for parallel processing and so usually I would do the following hint between INSERT and INTO;
    /*+ PARALLEL (BIG_TAB1, 4) */As my query here accesses two tables how would I modify this statement to make it run in parallel? Would it be;
    INSERT /*+ PARALLEL (BIG_TAB1, 4) */ /*+ PARALLEL (BIG_TAB2, 4) */ INTO NEW_TAB (ID)
    SELECT DISTINCT T1.BIG_ID?
    Thanks for any help!
    fakelvis

    Ah, brilliant.
    Thank you!
    Also, on a related note, I'm using a query of similar size in a PL/SQL script. This big query is in a cursor and the data selected here is then inserted into another table depending on a few criteria.
    For this to run on parallel, would the parallel hint be placed in the cursor's SELECT query or on the verious INSERTs within the body of the code? I'm assuming it's in the actual SELECT query of the cursor, but just thought I would check as I'm new to hints!
    Thanks again!

  • How to link from table RA_CUST_TRX_LINE_GL_DIST_ALL to GL?

    Hi,
    How do we link (something like GL_SL_LINK_ID, SOURCE_TABLE) from
    RA_CUST_TRX_LINE_GL_DIST_ALL to GL tables?
    Thanks.

    hi,
    you will have posting control id
    the posting control id is the binding key for GL and AR related Tables.
    1. Ra_cust_trx_line_gl_dist_all
    2. ar_cash_receipt_history_all
    3. ar_receivable_applications_all
    4. ar_adjustments_all.
    Hope this will clarify your question.

  • ABAP code for BW PSA table

    Hi,
    I am using middleware (Datastage) to load data to SAP BW. My requirement is to capture SAP rejects and give the error file which is not possible through Datastage. So i have to use another R3 stage i.e ABAP extract to read the PSA table where the status for records are shown in Red and Green colour. My question is what is the code that is used which explains the status whether it is red or green so as i cant write a code saying give me the records where the status is red or green.
    Thanks
    VJ

    Hi,
    Have a look at
    REPORT demo_dynpro_status_icons.
    You may get some idea about status icons.
    Thanks,
    Sri.

  • Creating view for DataSource from table containing Structures.

    Hello All,
    I need to make a datasource for HR PY master data from a table PA9004(its special for a HR infotype) which needs some fields like PFOBEE(PF-Opening Balance-Ee).
    Field(PFOBEE) is part of a structure(PS0008) which is included in the table PA9004.I tried where-used list for this structure in programs,FuncModules,Tables but got no result of any transparent table.
    To form my Datasource I tried creating the Database view, which had inconsistencies. I tried using the table PA9004, which said "This operation failed, because the template structure quantity fields or currency fields, for example, field PFOBEE refer to a different table."
    Also Projection view cant be used for generic datasources.
    Even Create Infostructure(MC21) does not work for HR: PY-IO.
    All suggestions welcome.Mail me at [email protected]

    Hello All,
    I solved this problem by forming my generic datasource(TCode RSO2) on a Infoset which had the table pa9004. There were some warnings regarding the use of the development class, but finally I had the datasource ready.
    I checked the datasource is working using the RSA3 TCode and the DS is perfectly extracting the data. I replicated this DS in BW server and it appears exactly where I wanted.
    Some colleages had suggested writing a functional module to extract the data, which must be right but I have not tried this option yet.
    Experts may please review my solution and offer tips. I am willing to offer points to anyone offering a more elegant solution.

  • GET_P Method for Link in table - only in display mode

    Hello,
    i created an assignmentblock to display a ztable (Simple Object).
    One column in the table is homepage.
    For this attribute i added some coding to the GET_P_Method to have a link.
    The link works fine - but i have this link now not only in display mode but also in edit mode for the table.
    As a sideeffect this column is now longer editable.
    How should i change my GET_P coding so that the link is only there in display mode. In edit mode the field should be editable (no link).
    Thank you
    Best regards
    Manfred

    Hello Manfred,
    I do not know about your system... but the usual GET_P-methods do have an importing parameter IV_DISPLAY_MODE. This tells you if you are in display or edit mode.
    Check method CL_BT115QH__DETAILS_CN00->GET_P_ORDER_REASON.
    Or even more general: GETP_XYZ in your context node class.
    The part with the IF statement should be trivial.
    cheers Carsten

Maybe you are looking for