APEX_PLSQL_JOB.SUBMIT_PROCESS with no results

Hi,
When I run APEX_PLSQL_JOB.SUBMIT_PROCESS I can see the process ran in the view APEX_PLSQL_JOBS from the sql workshop, but nothing has happened.
For instance: when I submit the following, no results show up in the table.
Any ideas as to how I can check what's going wrong?
DECLARE
t_job_id NUMBER;
t_sql VARCHAR2(4000);
BEGIN
t_sql := 'BEGIN INSERT INTO EXAMPLE ( COL1, COL2, COL3, COL4) '||
' VALUES (1, 763707, 20, 30 ); END; ';
t_job_id := APEX_PLSQL_JOB.SUBMIT_PROCESS (p_sql => t_sql);
apex_debug_message.log_message('Job started: '||t_job_id);
COMMIT;
END;
I am using APEX version 4.1.1.00.23 on Oracle 11g

Hi,
When I run APEX_PLSQL_JOB.SUBMIT_PROCESS I can see the process ran in the view APEX_PLSQL_JOBS from the sql workshop, but nothing has happened.For instance: when I submit the following, no results show up in the table.
Any ideas as to how I can check what's going wrong?
>
This may be because the job has an error. Check DBA_ERRORS View for errors.
Always post your code snippets in a pair of {code} tags as explained in the FAQ.
>
DECLARE
t_job_id NUMBER;
t_sql VARCHAR2(4000);
BEGIN
t_sql := 'BEGIN INSERT INTO EXAMPLE ( COL1, COL2, COL3, COL4) '||
' VALUES (1, 763707, 20, 30 ); END; ';
t_job_id := APEX_PLSQL_JOB.SUBMIT_PROCESS (p_sql => t_sql);
apex_debug_message.log_message('Job started: '||t_job_id);
COMMIT;
END;I am using APEX version 4.1.1.00.23 on Oracle 11g>
In the above code, are all the columns of type Number? VARCHAR2 columns will need to be in quotes, right?
Also check the Debug report of the page after running it in Debug mode. Maybe you will get some clues there too.
Cheers,

Similar Messages

  • Syntax for APEX_PLSQL_JOB.SUBMIT_PROCESS with an OUT parameter

    Hi All,
    I am using APEX_PLSQL_JOB.SUBMIT_PROCESS and calling a procedure that has both an IN and an OUT parameter.
    The IN parameter works fine; I am able to call my procedure from APEX and pass it the :APP_JOB item as the IN parameter. The OUT parameter I can't get working. I can call my procedure from a different block in SqlDeveloper and everything works, so I'm confident that my procedure code is correct. I just can't get the OUT parameter returned via APEX.
    This is the plsql code that I'm calling from an APEX dynamic action:
    DECLARE
      l_sql      VARCHAR2(4000);
      l_instance VARCHAR2(30);
       l_job number;
      l_rows_processed number;
    BEGIN
    l_instance := :P9_INSTANCE;
      l_sql      := 'BEGIN update_tl_tables_1(:APP_JOB, :F103_ROWS_PROCESSED); END;';
      l_job      := APEX_PLSQL_JOB.SUBMIT_PROCESS( p_sql => l_sql, p_status => 'Background process submitted');
    l_rows_processed := :F103_ROWS_PROCESSED;
    insert into gse_lng_jobs (instance, job_id, rows_processed) values (l_instance, l_job, l_rows_processed);
    COMMIT;
    END; My procedure is created as:
    create or replace
    procedure UPDATE_TL_TABLES_1 (l_app_job IN number, l_rows_processed OUT number)
    IS......Again, this works fine from SqlDeveloper. Can anyone suggest the proper plsql code? I've tried this using a page item, a system item etc. and no luck. I first tried just passing my procedure a local variable like l_rows_processed, but the procedure wouldn't even run, so I'm assuming the API needs an actual APEX item but I'm out of ideas here.
    thanks in advance,
    john

    That's not going to work because the job hasn't run yet when you perform the insert. So :F103_ROWS_PROCESSED wont contain anything useful.
    Why don't you try performing the insert as part of the job, e.g.
    l_sql := 'BEGIN update_tl_tables_1(:APP_JOB, :F103_ROWS_PROCESSED); insert into gse_lng_jobs (instance, job_id, rows_processed) values ('''||l_instance||''', '||l_job||', :F103_ROWS_PROCESSED); END;';
    ...something like that.

  • Generate PDF (BI Publisher) through APEX_PLSQL_JOB.SUBMIT_PROCESS

    Hi!
    Oracle 10.2.0.4 32, Apex 4.0.2, BIP 10.x Win.
    I have to generate cca. 1000 reports in PDF (some customer bills) through BI Publisher print server.
    PDF is defined through "Reports queries" and "Reports layouts" directly defined from Apex env. Report template is Word RTF file. Report query has one parameter:
    and R.BILL_ID = :G_BILL_IDRunning from App page process it is not acceptable to do that because operation should takes hours and user cannot have open freezed browser.
    So I found out "APEX_PLSQL_JOB.SUBMIT_PROCESS", which submit process in "job" as background process.
    On page I left just "SUBMIT_PROCESS" call:
    BEGIN
      APEX_PLSQL_JOB.SUBMIT_PROCESS ('begin bills_pkg.generate_biils; end');
    END;and put the whole logic in package. Small problem was to change Apex item (Application item), what I solved and change with:
    APEX_UTIL.set_session_state(p_name => 'G_BILL_ID', p_value => cur_array(i).B_ID);for every record in cursor (I know his is not optimal but I just wanted to get working demo).
    Call from package procedure is like (slightly modified from Apex page process which was working!):
    open cur;
      -- assign to have that value as parameter for !??
      APEX_UTIL.set_session_state(p_name => 'G_BILL_ID', p_value => cur_array(i).B_ID);
      print_one_report (cur_array(i).B_ID);
    close cur;where "print_one_report" is mine procedure which saves PDF in db (proc was the same as before when was working but with too long result).
    Unfortunately then all generated PDF reports (which I save in database) has 0 bytes length (I call the same procedure called as before when reports were generated but from Apex page process directly).
    Seems that "G_BILL_ID" is no longer having correct values ... like session problems.
    How to achieve and fix that (generate PDF from cursor) or is there any article how to manage BI Publisher printing with APEX_PLSQL_JOB.SUBMIT_PROCESS?
    Rg,
    Damir Vadas
    P.S.
    Should
    apex_custom_auth.define_user_session (p_user, p_session_id );
    apex_application.g_flow_id := p_app_id;might help?
    Edited by: user1050751 on May 13, 2011 12:57 PM

    Damir,
    Here is one way that you could get a background job to create your thousand reports (4 steps).
    1st define your report query and layout within APEX (and BI-Publisher builder - Word plugin).
    2nd write a custom process to call apex_util.get_print_document to generate your 1000 reports and place them in a blob column.
    http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_util.htm#CHDDECIA
    DECLARE
        l_document BLOB;
         l_security_group_id NUMBER;
        CURSOR your_cur IS
        SELECT...your thousand records
    BEGIN
        wwv_flow_api.set_security_group_id(p_security_group_id);
        l_security_group_id := wwv_flow_api.get_security_group_id;
        FOR your_rec IN your_cur LOOP
            BEGIN
                 set any item values that will be referenced in your report query here
                 l_document := APEX_UTIL.GET_PRINT_DOCUMENT (p_application_id     => v_your_app_id,
                                                             p_report_query_name  => v_your_defined_report_name,
                                                             p_report_layout_name => v_your_defined_layout_name,
                                                             p_report_layout_type => 'rtf',
                                                             p_document_format    => 'pdf',
                                                             --p_print_server             =>
                INSERT INTO your_table... id, l_document, file_name, mime_type...
                COMMIT;
            EXCEPTION
                WHEN others THEN
                      write an error to a job log...
            END;
        END LOOP;
    EXCEPTION
         WHEN others THEN
               write an error to a job log...
    END;3rd write logic that will submit your custom process using APEX_PLSQL_JOB.SUBMIT_PROCESS or you can use dmbs_scheduler package.
    4th write code to retrieve the report data from the blob column and display or distribute to users.
    I've never called the apex_util.get_print_document recursively like this before so I'm not sure how it will perform. There are 4 versions of the get_print_document API so use the one that best fits your needs with performance in mind.
    After writing the above logic I found this post that is very similar.
    Scheduling reports with dbms_scheduler
    An alternative method to what I've listed above is scheduling reports using the Bi-Publisher web service.
    http://bipconsulting.blogspot.com/2010/04/how-to-schedule-report-with-bi.html
    Regards,
    Todd
    Edited by: tfa on May 16, 2011 8:03 AM

  • Apex_plsql_job.submit_process job not showing up in apex_plsql_jobs table

    Hello ghurus,
    I am running APEX 3.1 on Oracle 10g 10.2.0.1 and am trying to run a potentially long running procedure in the background so the user doesn't have to sit and watch the hourglass.
    The button process has the following code:
    DECLARE
    return_code NUMBER;
    exec_stg VARCHAR2(4000);
    squote VARCHAR2(1) := chr(39);
    edit_cnt NUMBER;
    BEGIN
    SELECT COUNT(*)
    INTO edit_cnt
    FROM edit_history eh
    WHERE eh.rept_inst = :f104_curinst
    AND eh.rept_time_frame = :f104_curterm
    AND eh.submission = :f104_cursubm
    AND eh.edit_complete_dtm IS NULL;
    univdb.exception_logging.insert_log(0, 'NO SQL ERROR', 'apex_editsubm','count=' || to_char(edit_cnt));
    IF edit_cnt = 0
    THEN
    INSERT INTO univdb.edit_history
    (rept_inst,
    rept_time_frame,
    submission,
    audit_id)
    VALUES
    (:f104_curinst,
    :f104_curterm,
    :f104_cursubm,
    :app_user);
    COMMIT;
    univdb.exception_logging.insert_log(0, 'NO SQL ERROR', 'apex_editsubm',
    'insert row successful');
    exec_stg := 'univdb.edit_any_submission(' || squote || :f104_curinst ||
    squote || ', ' || squote || :f104_curterm || squote || ', ' ||
    squote || :f104_cursubm || squote || ', ' || squote ||
    :app_user || squote || ');';
    univdb.exception_logging.insert_log(0, 'NO SQL ERROR', 'apex_editsubm',exec_stg);
    return_code := apex_plsql_job.submit_process(exec_stg);
    univdb.exception_logging.insert_log(0, 'NO SQL ERROR', 'apex_editsubm','return_code=' || to_char(return_code));
    commit;
    END IF;
    END;
    The calls to exception_logging write a row to a table so I can see what's happening in the process and I get the following rows writte:
    count=0
    insert row successful
    univdb.edit_any_submission('UNIV', '200701', 'TEF', 'ELSA_LESLIE');
    return_code=103
    The last message implies to me that the job was successfully submitted but when I query the apex_plsql_jobs table, job 103 does not exist and the procedure never gets executed. The procedure does work when tested outside of APEX.
    I checked all of my grants according to the post in this thread and they are all there:
    Re: Missing apex_plsql_job in 3.1
    Does anyone have a suggestion?
    ...elsa

    Hi Elsa
    I am also having similar problems calling the APEX_PLSQL_JOB.SUBMIT_PROCESS as well where it doesn't insert into the APEX_PLSQL_JOBS table.
    I also noticed that you used SCHEDULER. One of the challenges we are having is when the user presses the submit button, the browser hangs and doesn't return the result set until the process is complete. This process can take 20 mins before the screen loads saying the process was finished. I have tried used DBMS_JOB as we aren't on 10g and can not use SCHEDULER, but still having that issue where the user has to wait 20 mins before the process finishes.
    Did you ever solve that problem where the user clicks the button and then a page is returned immediately while the job is firing away with scheduler
    Any help would be great and much appreciated.
    Thanks

  • APEX_PLSQL_JOB.SUBMIT_PROCESS /  Process Type "PLSQL DBMS JOB"

    Has anyone got APEX_PLSQL_JOB.SUBMIT_PROCESS to work? I've seen several threads which my exact problem but am unsure if anyone has got it to work.
    Here is my process:
    declare
      jobnumber number;
    begin
    IF apex_plsql_job.jobs_are_enabled THEN
        jobnumber := apex_plsql_job.submit_process(
              p_sql => 'insert into temp_jobtest
                        values (''APEX PLSQL Job'',sysdate); 
                        commit;');
    END IF;
    end;Process runs and APEX_PLSQL_JOBS shows SYSTEM_STATUS as "COMPLETE" but no rows are ever added to the temp_jobtest table. I tried submitting directly using dbms_job and it worked as expected.
    I have read: Background jobs
    I really wish we could still create a process type of (PLSQL DBMS JOB). If this functionality has been deprecated then why is it still referenced in the User Guide?
    From the APEX User Guide, Release 2.2, B28550-01, July 2006; page 13-15; heading - "Using a Process to Implement Background PL/SQL"
    The simplest way to implement the APEX_PLSQL_JOB package is to create a page
    process that specifies the process type PLSQL DBMS JOB. By selecting this process
    type, Application Builder will submit the PL/SQL code you specify as a job.

    "Ok, I do see it.....if I was still working in a version pre 2.0"
    Which is exactly what I have done. I had access to a HTMLDB 1.5 environment.
    --I create a new application in 1.5 with 1 page. 
    --Added a page process with a process type of  "PL/SQL DBMS JOB". 
    --Exported the application.
    --Import the application into APEX 2.2 environment
    --copy page from imported application to my application
    --copied the process from my copied page to the page in my application where I want the process
    So far it is working just as I expected.
    Thanks Jeleeb! I present you with a silver medal.

  • I am trying to create a print ready PDF from a word file with unacceptable results.

    I am trying to create a print ready PDF from a word file with unacceptable results.
    The word file has a trim size of 6” x 9”. It has been set to mirror margins with the inner, top and bottom margins set to 0.75”, the outer margin is set to 0.5” and the gutter to 0.14”.
    It doesn’t matter if I create the PDF from inside Word, or open Acrobat Pro 11.0.9 and click Create From File, while the resulting document size is correct and the odd numbered pages reflect the correct margins, the even numbered pages do not. This results in some text near the outer margin, as well as the page numbers being omitted.
    Does anyone know how to correct this?
    I just noticed that some of the odd numbered pages' text is also cropped. Apparently Acrobat is refusing to set side margins to smaller than 1" (@ 3cm).

    I'm away from my printer, so I'll try it later. Even so, the proposed test is irrelevant. I operate a small publishing house and am trying to upload certain novels to Ingram, the largest book distributor in the world. The specifications I've set are the specifications they've asked for. Since they've said that the results I'm obtaining are unacceptable, and since they demand submission in PDF form, this renders Acrobat Pro for Mac completely unacceptable for anyone in the publication industry. As far as I can tell, Adobe has a serious bug here that it needs to fix—and at once.

  • OS 10.8 just installed. "Hot Corner" to put new iMac 2.7 GHz Intel Core i5  to sleep mode doesn't work. Have tried cordless and corded mouse with same result. Momentary sleep, immediate wake. Any idea how to fix?

    Set "hot corner" to put iMac to sleep.  Doesn't work.  Selecting the corner will momentarily put to sleep, but immediately rewakes.  Have tried all four corners with same result.  Have tried with wireless mouse and with corded mouse with same result.  Any ideas as to how to fix?

    You've been so great, I want to thank you for all the help over a very frustrating day.  Last evening, I redownloaded and installed the fresh copy of Mountain Lion.  The problem remained.  After installing the new OS 10.8, any clicks on a web page (Firefox browser) didn't open the page, but instead made a copy of the page on the desktop. Felt it must be hardware  degrading, so I set up a case with Apple support for today.  Early in the diagnostics, I had swapped out for a corded mouse and the problem remained.   As a last try, I changed out my wireless mouse for a different wireless mouse. That seems to have done the trick. My Logitech mouse is incompatible with OS 10.8.
    Thank you again, so much!
    .../awards rkaufmann87 500 points!

  • Is it possible to recover my data from iCloud backup without working wifi? I have as many other upgraded my iPhone 4S to iOS 7.0.2 with the result that the Wi-Fi or Bluetooth no longer works. However, i can connect to iTunes via cable but there is wrong v

    Is it possible to recover my data from iCloud backup without working wifi? I have as many other upgraded my iPhone 4S to iOS 7.0.2 with the result that the Wi-Fi or Bluetooth no longer works. However, i can connect to iTunes via cable but there is wrong version of backup.

    Answer is no.
    If you want the iCloud backup you have to have n internet connection, thus WiFi.
    The not working WiFi has happened with quite a number of users.
    It is not exactly clear what is the cause but there are suggestions to clear it up:
    Some people have had success by removing an apostrophe from the iPhone name. If your iPhone is called something like “John’s iPhone” then this might work. Go to Settings > General > About > Name and change it to something with no apostrophe.
    Some people have reported success by putting the iPhone into Airplane mode and then going to Settings > General > Reset > Reset Network Settings, but the problem may return.
    You could also try going to Settings > Control Center and disable Access on Lock Screen then turn your iPhone off and on again.
    Make sure that your router firmware is up to date.
    Try backing up your iPhone and then restoring it. Check how to factory reset an iPhone for details.
    If nothing is working for you, try contacting Apple or take your iPhone into an Apple Store.
    Succes, Lex

  • I am trying to re-install Creative Suite 5.5 Design Standard on my Widows 7 Professional computer after I had to replace the hard drive. I keep getting error message and I get "Exit Code 15: Media DB Sync failed". I have run C Cleaner with same results. H

    I am trying to re-install Creative Suite 5.5 Design Standard on my Widows 7 Professional computer after I had to replace the hard drive. I keep getting error message and I get "Exit Code 15: Media DB Sync failed". I have run C Cleaner with same results. Have Disabled UAC and Startup items and Services with no success. Please help - frustrated to no end. Can someone help me?

    make sure you're using the adobe cleaner, not crap cleaner, Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    copy the installation files to a desktop folder and install from there.

  • How to Populate the JTable Object programatically with SQL Results

    I'm wondering if someone could help me on how to populate the JTable Object with SQL Results wherein the Row of tjhe JTable object is automatically adjusted depending on how many records you have queried.
    Thanks in advance and God bless! (",)
    * frmMain.java
    * Created on October 4, 2006, 6:15 AM
    package tds;
    import java.io.*;
    import java.awt.Toolkit;
    import javax.swing.JFrame;
    import javax.imageio.*;
    import javax.swing.JFrame;
    import java.sql.*;
    import javax.swing.table.DefaultTableModel;
    * @author Dexter.Carlit
    public class frmMain extends javax.swing.JFrame {
    private Connection connection = null;
    private DefaultTableModel model;
    /** Creates new form frmMain */
    public frmMain() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
    jSplitPane = new javax.swing.JSplitPane();
    jScrollPane1 = new javax.swing.JScrollPane();
    jPanel3 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTree1 = new javax.swing.JTree();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel1 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jTextField2 = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    jTextField3 = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    jTextField4 = new javax.swing.JTextField();
    jPanel5 = new javax.swing.JPanel();
    jScrollPane3 = new javax.swing.JScrollPane();
    jGrid = new javax.swing.JTable();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jProgressBar1 = new javax.swing.JProgressBar();
    jPanel2 = new javax.swing.JPanel();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowOpened(java.awt.event.WindowEvent evt) {
    formWindowOpened(evt);
    getAccessibleContext().setAccessibleName("frmMain");
    jSplitPane.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
    jSplitPane.setDividerLocation(200);
    jSplitPane.setDividerSize(10);
    jScrollPane2.setViewportView(jTree1);
    org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
    jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel3Layout.createSequentialGroup()
    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 916, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jPanel3Layout.setVerticalGroup(
    jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 410, Short.MAX_VALUE)
    jScrollPane1.setViewportView(jPanel3);
    jSplitPane.setLeftComponent(jScrollPane1);
    jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
    jLabel1.setText("First Name:");
    jLabel2.setText("Last Name:");
    jLabel3.setText("Position :");
    jLabel4.setText("Department:");
    jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Search Results"));
    jGrid.setModel(new javax.swing.table.DefaultTableModel(
    new Object [][] {
    new String [] {
    "LName", "FName", "Position", "Department", "Office No", "Local No", "Office Mobile No", "Home No", "MobileNo", "Email Address"
    jGrid.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
    jGrid.setColumnSelectionAllowed(true);
    jGrid.setName("");
    jGrid.setTableHeader(jGrid.getTableHeader());
    jScrollPane3.setViewportView(jGrid);
    jScrollPane3.getAccessibleContext().setAccessibleName("rset");
    org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(
    jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)
    jPanel5Layout.setVerticalGroup(
    jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE)
    jButton1.setText("Find");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    jButton1MouseClicked(evt);
    jButton2.setText("Clear");
    jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    jButton2MouseClicked(evt);
    org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
    jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
    .add(jLabel1)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE))
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
    .add(jLabel2)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
    .add(1, 1, 1))
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
    .add(jLabel3)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jLabel4)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE))
    .add(jPanel4Layout.createSequentialGroup()
    .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
    .addContainerGap())
    jPanel4Layout.linkSize(new java.awt.Component[] {jButton1, jButton2}, org.jdesktop.layout.GroupLayout.HORIZONTAL);
    jPanel4Layout.setVerticalGroup(
    jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel4Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel1)
    .add(jTextField1))
    .add(18, 18, 18)
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel2)
    .add(jTextField2))
    .add(16, 16, 16)
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel3)
    .add(jTextField3)
    .add(jLabel4)
    .add(jTextField4))
    .add(14, 14, 14)
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jProgressBar1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 438, Short.MAX_VALUE))
    .addContainerGap())
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jProgressBar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    jTabbedPane1.addTab("Search", jPanel1);
    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(0, 458, Short.MAX_VALUE)
    jPanel2Layout.setVerticalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(0, 401, Short.MAX_VALUE)
    jTabbedPane1.addTab("Directory", jPanel2);
    jSplitPane.setRightComponent(jTabbedPane1);
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jSplitPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jSplitPane)
    pack();
    }// </editor-fold>//GEN-END:initComponents
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    }//GEN-LAST:event_jButton1ActionPerformed
    private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked
    jGrid.setModel(new javax.swing.table.DefaultTableModel(
    new Object [][] {
    {null, null, null, null, null, null, null, null, null, null},
    {null, null, null, null, null, null, null, null, null, null},
    {null, null, null, null, null, null, null, null, null, null},
    {null, null, null, null, null, null, null, null, null, null}
    new String [] {
    "LName", "FName", "Position", "Department", "Office No", "Local No", "Office Mobile No", "Home No", "MobileNo", "Email Address"
    jGrid.updateUI();
    }//GEN-LAST:event_jButton2MouseClicked
    private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
    try {
    //Load and register SQL Server driver
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    //Establish a connection
    Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://X.X.X.X:1433","MyAccount","MyPassword");
    //Create a Statement object
    Statement sql_stmt = connection.createStatement();
    //Create a ResultSet object, execute the query and return a
    // resultset
    ResultSet rset = sql_stmt.executeQuery("SELECT * FROM EpxDirectory..Directory Order By LName");
    // Populates a JTABLE Object
    int i=0;
    while (rset.next()){
    String LName = rset.getString(1);
    String FName = rset.getString(2);
    String Position = rset.getString(3);
    String Dept_Code = rset.getString(4);
    String OffPhoneNo = rset.getString(5);
    String LocalNo = rset.getString(6);
    String OffMobileNo = rset.getString(7);
    String HomePhoneNo = rset.getString(8);
    String MobileNo = rset.getString(9);
    String Email = rset.getString(10);
    jGrid.updateUI();
    jGrid.setValueAt(rset.getString(1).trim(),i,0);
    jGrid.setValueAt(rset.getString(2).trim(),i,1);
    jGrid.setValueAt(rset.getString(3).trim(),i,2);
    jGrid.setValueAt(rset.getString(4).trim(),i,3);
    jGrid.setValueAt(rset.getString(5).trim(),i,4);
    jGrid.setValueAt(rset.getString(6).trim(),i,5);
    jGrid.setValueAt(rset.getString(7).trim(),i,6);
    jGrid.setValueAt(rset.getString(8).trim(),i,7);
    jGrid.setValueAt(rset.getString(9).trim(),i,8);
    jGrid.setValueAt(rset.getString(10).trim(),i,9);
    i++;
    //Close the ResultSet and Statement
    rset.close();
    sql_stmt.close();
    //Close the database connection
    connection.close();
    System.out.println(Integer.toString(i) + " rows found");
    } catch(Exception e) {
    System.out.println("Failed to connect; Please view Stack Trace");
    e.printStackTrace();
    }//GEN-LAST:event_jButton1MouseClicked
    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
    }//GEN-LAST:event_formWindowOpened
    public static void run(){
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    frmMain frmMain = new frmMain();
    frmMain.setLocationRelativeTo(null); // Center the JFrame on the
    frmMain.setVisible(true);
    private void exitApplication() {
    // try {
    // //gui.putStatus("Closing the connection....please wait.....");
    // if(connection != null) {
    // // connection.close(); //Closing the connection object.
    // } catch(SQLException ex) { //Trap SQLException
    // //gui.putStatus(ex.toString());
    System.exit(0); //Exit the aplication
    * @param args the command line arguments
    public static void main(String args[]) {
    run();
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JTable jGrid;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JProgressBar jProgressBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSplitPane jSplitPane;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTree jTree1;
    // End of variables declaration//GEN-END:variables
    }

    Use code tags.
    Don't mix GUI and JDBC together. Split them out into separate classes.
    You have a good start, but you will need to loop through your resultset and also pull the ResultSet metaData for you column headings

  • My HP mini 210 will not boot up. The repair utility starts, but runs and runs with no results.

    My HP mini 210-2080NR will not boot up.  The repair utility starts, but runs and runs with no results. Safe mode start up also fails. Tried BIOS diagnostics with f10, memory passed, but HD startd but did not finish.  Diagnostic log shows rusult 0303.  Any ideas would be helpful.  Thanks.

    You can order HP recovery media here, or call HP on the phone to order 1-800-474-6836
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=bph07143&cc=us&lc=en&dlc=en#N76
    If HP no longer has Recovery Media for your model, order them here
    http://www.computersurgeons.com/Default.aspx

  • I just jazzed up my 2 Ghz iMac with 10.6.8, and 4 gigs of memory. I'm VERY happy with the results (fast!), but now I have a thin yellow line way over on the right side of the screen, which goes from top to bottom. This is really strange! Any input?

    I'm VERY happy with the results (fast!). However, the really strange thing is this - there is now a thin yellow line, way over on the right side of the screen, which goes from top to bottom, and stays there no matter where I go or what I do. I've never seen anything like this! It was not there before I did the upgrades. Anyone out there ever heard of such a preposterous thing ~ or have any ideas on how to get rid of it?

    Hello Mark,
    It's going to mean a lot of reading but you should study the 'More like this' legend to your post's immediate right.  >>>>>>>>   plus some of the links within each.
    The problem is well explored with much guidance on what to do and where to go.

  • TS1368 I keep getting this error message and can't open the iTunes store. I've reinstalled iT a half dozen times with no results. "Registry settings used by the iT drivers for importing & burning CDs & DVDs are missing" reinstall iTunes

    I can't open the iTunes store and keep getting this error message. "Registry settings used by the iT drivers for importing & burning CDs & DVDs are missing. Reinstall iTunes." I've reinstalled iT a half dozen times with no results.

    You might have two different things going on at once here.
    Starting with the registry settings message.
    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    iTunes for Windows: "Registry settings" warning when opening iTunes

  • Apex report result doesn't agree with the result of sql developer

    Hello guys,
    at the moment I try to create a standard report which takes his content from several spreadsheets. Because of some problems with the searchbar I'm not able to use an interactive report. The sql query contains a function, which sets some space characters into the content of a column. But there is a big problem. When I call my sql query in apex from the spreadsheets the result doesn't agree with the result which affords the sql developer.
    I know that the sql developer affords the right result.
    best regards
    wderr
    Edited by: user9072567 on 07.02.2010 12:57

    thats the query:
    select "TWORKITEM"."WORKITEMKEY",
    "TWORKITEM"."PROJCATKEY",
    "TPROJECT"."LABEL",
    "TWORKITEM"."PACKAGESYNOPSYS",
    replace(replace("TWORKITEM"."PACKAGEDESCRIPTION", chr(10), '<br>'),'<td></td>','&lt;td&gt;&lt;/td&gt;') packagedesc,
    suche_ohne_ti_be("TWORKITEM"."WORKITEMKEY") "CHANGEDESCRIPTION"
    from "TWORKITEM" "TWORKITEM", "TPROJECT" "TPROJECT", "TPROJCAT" "TPROJCAT"
    where "TWORKITEM"."PROJCATKEY" = "TPROJCAT"."PKEY"
    and "TPROJCAT"."PROJKEY" = "TPROJECT"."PKEY"
    and (instr(upper("TWORKITEM"."WORKITEMKEY"), upper(nvl(:P10_SEARCHTEXT, "TWORKITEM"."WORKITEMKEY"))) > 0
    or instr(upper("TPROJECT"."LABEL"), upper(nvl(:P10_SEARCHTEXT, "TPROJECT"."LABEL"))) > 0
    or instr(upper("TWORKITEM"."PACKAGESYNOPSYS"), upper(nvl(:P10_SEARCHTEXT, "TWORKITEM"."PACKAGESYNOPSYS"))) > 0
    or instr(upper("TWORKITEM"."PACKAGEDESCRIPTION"), upper(nvl(:P10_SEARCHTEXT, "TWORKITEM"."PACKAGEDESCRIPTION"))) > 0
    or instr(upper(suche_ohne_ti_be("TWORKITEM"."WORKITEMKEY")), upper(nvl(:P10_SEARCHTEXT, "TWORKITEM"."WORKITEMKEY")))>0
    I mean with spreadsheets some tables/charts. And I take those informations from 3 of them.
    regards
    wderr

  • App-V PowerShell: Script to Query XenApp Servers for App-V Publishing Errors and Output an Excel Document with the Results

    Please Vote if you find this to be helpful!
    App-V PowerShell:  Script to Query XenApp Servers for App-V Publishing Errors and Output an Excel Document with the Results
    Just posted this to the wiki:
    http://social.technet.microsoft.com/wiki/contents/articles/25323.app-v-powershell-script-to-query-xenapp-servers-for-app-v-publishing-errors-and-output-an-excel-document-with-the-results.aspx

    Hi petro_jemes,
    Just a little claritification, you need to add the value to the variable "[string]$ou", and also change the language in the variable "$emailbody" in the function "Get-ADUserPasswordExpirationDate".
    I hope this helps.

Maybe you are looking for

  • 1 line item in the sales order ship to different shipping address

    Hi, Our customer A have 3 different branches (meaning 3 different shipping address). During the creation of the sales order for 1 material A, I want to ship 50pc to this customer A: 10pc to address A1 20pc to address A2 20pc to address A3 In my sales

  • Macbook pro freezes for no reason even after installing 10.8 on a brand new hard drive

    Macbook pro freezes for no reason even after installing 10.8 on a brand new hard drive. Tried to reset pram, smc, nvram. Tried installing new RAM. Tried installing new hard drive. You should know that my internal drive is installed in a cheap externa

  • Internet Expenses and HR setups

    Hi, Could you please advise me as to what setups need to be done in HR shared install (we haven't installed HR and won't use it) inorder for iExpenses and Payables invoices approval to be setup using workflow or AME. Additionaly, which is more recomm

  • X61 VGA output to 1366x768

    Hi, can I output X61 to an external LCD at 1366x768 via VGA? Thanks!

  • How to add Order quantity in outbound ASN ?

    Hello Experts, I need to send the order quantity along with the delivery quantity in the outbound ASN. What is the procedure and which field do I need to include for order quantity ? Thanks in advance