Forms PL/SQL

Im having a little difficulty with PL/SQL in forms its different to the pl/sql for sql*plus.
I have an orders form. it has the following fields:
Order Id
Employee ID
Order Quantity
Order Date
Customer Id
Item No
Order Price
It has a subforms which shows the items for the order when a query is run.
I have a button new record with the following PL/SQL:
begin
     clear_form;
     select ord_id.nextval
     into :orders.ORDER_ID
     from dual;
select sysdate
into :orders.ORDER_DATE
from dual;
end;
when i enter a value for item no and quantity i want the sub form to display the record entered. i want the quantity be be checked to see if the value is less than the quantity in stock and if so take away that value. should this be done 'POST CHANGE' of the fields? or should it be done when the user clicks the save button. What is the PL/SQL to do this?

Not sure what you mean by a "subform". Maybe you can explain that.
PL/SQL in Forms is no different from SQL Plus. It is just that there is so much more to do in a form.
when i enter a value for item no and quantity i want the sub form to display the record entered.If you mean that you want to look up the item information and display it in a separate block on the form...
You can do that, but it takes a timer started by the when-validate-item trigger in the item no. Here are two threads where you can view the suggested code:
Re: restricted packaged procedure (FRM-40737)
Re: WHEN-MOUSE-LEAVE and WHEN-VALIDATE-ITEM  on Forms 10g block
i want the quantity be be checked to see if the value is less than the quantity in stock and if so take away that value. should this be done 'POST CHANGE' of the fields? or should it be done when the user clicks the save button. What is the PL/SQL to do this?It should be done in a when-validate-item trigger. Post-change runs other times when you would not want to check the amount available.

Similar Messages

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Forms with SQL Server

    hi,
    Is it possible to connect forms with sql server? if yes, how?
    Any help will be highly appreciated

    Maybe. see:
    <Note:212382.1> How to Build Forms against Microsoft Sql Server
    also do a Metalink search on:
    'oracle client adaptor'
    Best of luck,
    ejs

  • How to be a Forms & PL/SQL Expert?

    Hi Experts, I am very new to Oracle Forms and PL/SQL. I have been doing development in Forms (mostly in 10g but I also in 6i) and PL/SQL for little over 2 years.
    My problem is, I don't know much about how to progress up the ladder to be an Oracle Forms & PL/SQL expert.
    My other big problem is trying to find out how to keep pace with the latest development in Forms and PL/SQL.
    For example, my manager asked me how to print a file in a client printer. I could not give him a solution at once. Only after couple of hours of searching did I find the solution using WebUtil.
    Another instance a manger asked me how to encrypt data in Oracle forms. Again I had to do an extensive search on the web.
    Can an "expert" give a solution at once, without going to the web?
    Another time I was asked to do a performance tuning and could not do it since I have not done before. I tried to follow the method found in this site using a personal DB in my machine but could not simulate a situation.
    How do you keep track of latest developments?
    Are their any sites to go to?
    Is there a routine you can follow?
    Do you have to do R&D regularly? How often?
    How many hours of reading web-sites (on Forms, PL/SQL stuff) should you do for a week?
    How do YOU experts do it?
    You advice would be greatly appreciated.

    First of all I don't consider myself an expert, so my advice here might be flawed as they are based on my experiences ;)
    Can an "expert" give a solution at once, without going to the web?Frankly I hardly know how to write a file using text_io or utl_file, or use some other somewhat regular-use supplied packages without looking them up in the documentation. Well I somehow know, but the code will most certainly throw compile errors. This is due to the fact that the entire oracle documentation is huge, and there are version dependend manuals, and I never liked memorizing things I could easily look up. It just doesn't make sense to memorize entire documentations when you can look them up. So even for basics I go to the web...
    For example, my manager asked me how to print a file in a client printer. I could not give him a solution at once. Only after couple of hours of searching did I find the solution using WebUtil. So in the end you found a solution yourself didn't you?
    Another instance a manger asked me how to encrypt data in Oracle forms. Again I had to do an extensive search on the web.I am around forms a few years, and I don't know an ad-hoc answer to that. I might have a clue, but for a advice I'd have to try and most certainly consult google.
    Another time I was asked to do a performance tuning and could not do it since I have not done before. I tried to follow the method found in this site using a personal DB in my machine but could not simulate a situation. And you know at least where to start now even if you didn't solve the problem, don't you?
    When I started programming C/C++ in school we had a teacher who I consider a C-Guru. Sometimes the answer to how would I implement X? was I don't know exactly yet, but let me do some research and I'll show you. Needless to say that we certainly got our answers. The same guy taught Java with the opening phrase I don't know much about Java, but it is Object-Oriented, the Syntax is C like,and the documentation is quite extensive. He explained things better to us then others who asserted knowing Java.
    IMHO curiosity and being keen to experiment are much more valuable then the ability to memorize manuals and APIs. You might solve your problems with your actual knowledge today, but tomorrow there are new challenges which require new knowledge to be accumulated.
    If you face a problem don't hesitate to get your hands dirty. If a program doesn't do what it's supposed to do fire up the debugger, look at diagnostic infos and see why it fails instead crying about that you don't know why. If you need to learn a new language install the compiler, and write code until it compiles and does what you want it to do. If you need to work with the new asdf server enterprise edition install it, turn it upside down, blow it's config into pieces until it stops working and maybe get it running after that.
    Everything else boils down to showing an active interest in the things you do. There is no formula saying "spend X hours a week on asktom and eventually become a database expert". I regularly (can't say how often) visit asktom because I like reading the questions there. I don't do it because I must or want to become an expert someday, it is simple curiosity.
    As for places to look this is answered easily: the key source for informations on new products is the vendors homepage. It's OTN for oracle, MSDN for microsoft, ubuntu.com for ubuntu, and what ever else. Technical articles etc. about the products are at least listed there.
    Of course in software development there is (at least) one rule which always applies:
    always write code as if the person who will maintain your code is a maniac serial killer that knows where you live
    cheers

  • Forms pl/sql in oracle adf

    hi how can i re use this oracle forms pl/sql
    {PROCEDURE perform_logon IS
    error_message varchar2(100);
    usr_id integer;
    fail_cnt integer;
    fail_limit integer;
    pwd sms_users.pwd%type;
    pwd_dt date;
    pwd_dt_period integer;
    sysdt date;
    msg_lvl varchar2(20) := :system.message_level;
    cursor usr is
      select id,pwd_change_dt,sysdate,pwd,login_failure_count
      from sms_users
      where user_id = :logon.usr_id
    --  and   pwd     = sms_secure.crypt('USR',id,:logon.pwd)
    BEGIN
    set_clnt_details;
      if :logon.usr_id is null then
            error_message := 'User id must be specified';
         sms_code.error_message('SMS-'||to_char(0000001)||': '||error_message,'', 'E', 'SMS');
      end if;
      if :logon.pwd is null then
            error_message := 'Password must be specified';
         sms_code.error_message('SMS-'||to_char(0000002)||': '||error_message,'', 'E', 'SMS');
      end if;
      pwd_dt_period := sms_global.ref_code('SMS','PWD_PERIOD',30,1);
      fail_limit    := sms_global.ref_code('SMS','PWD_FAIL_LIMIT',3,1);
      open usr;
      fetch usr into  usr_id,pwd_dt,sysdt,pwd,fail_cnt;
      if usr%NOTFOUND then
         close usr;
                 sms_alog.record(:global.clnt_user    
                         ,:global.clnt_host_name ||':'||:global.clnt_ip_addr
                         ,'Logon'
                         ,:logon.usr_id
                         ,'Not SMS User'
                         ,:logon.usr_id
                         ,'sms0000');
            error_message := 'Logon to SMS Denied';
         sms_code.error_message('SMS-'||to_char(0000003)||': '||error_message,'', 'E', 'SMS');
      end if;
      close usr;
      if fail_cnt > fail_limit then
                       sms_alog.record(:global.clnt_user    
                         ,:global.clnt_host_name ||':'||:global.clnt_ip_addr
                         ,'Logon - PWD'
                         ,:logon.usr_id ||':'||fail_cnt||':'||fail_limit
                         ,'Password retry limit exceeded'
                         ,:logon.usr_id
                         ,'sms0000');
            error_message := 'Password error limit have been exceeded contact the Administrator';
         sms_code.error_message('SMS-'||to_char(0000014)||': '||error_message,'', 'E', 'SMS');
      end if;       
      if pwd <> sms_secure.crypt('USR',usr_id,:logon.pwd) then
       sms_global.set_user_id(:logon.usr_id);
            update sms_users
              set login_failure_count = nvl(login_failure_count,0) + 1
              where id = usr_id
              :system.message_level := 15;
                          sms_alog.record(:global.clnt_user    
                         ,:global.clnt_host_name ||':'||:global.clnt_ip_addr
                         ,'Logon - PWD Error'
                         ,:logon.usr_id ||':'||:logon.pwd
                         ,'Wrong user Password'
                         ,:logon.usr_id
                         ,'sms0000');
              commit;
              :system.message_level := msg_lvl;
            error_message := 'Logon to SMS Denied';
         sms_code.error_message('SMS-'||to_char(0000003)||': '||error_message,'', 'E', 'SMS');
      else
           if fail_cnt > 0 then
            update sms_users
              set login_failure_count = 0
              where id = usr_id
                          sms_alog.record(:global.clnt_user    
                         ,:global.clnt_host_name ||':'||:global.clnt_ip_addr
                         ,'Logon - PWD Correct'
                         ,:logon.usr_id
                         ,'Reset Failed count'
                         ,:logon.usr_id
                         ,'sms0000');
              :system.message_level := 15;
              commit;
              :system.message_level := msg_lvl;
        end if;            
                          sms_alog.record(:global.clnt_user    
                         ,:global.clnt_host_name ||':'||:global.clnt_ip_addr
                         ,'Logon - PWD Correct'
                         ,:logon.usr_id
                         ,'Success'
                         ,:logon.usr_id
                         ,'sms0000');
      end if; 
      if trunc(pwd_dt + pwd_dt_period) < sysdt then
            login_pwd_title;
         hide_an_item('logon.new_pwd1',1);
         hide_an_item('logon.new_pwd2',1);
                               sms_alog.record(:global.clnt_user    
                         ,:global.clnt_host_name ||':'||:global.clnt_ip_addr
                         ,'Logon - PWD Expired'
                         ,:logon.usr_id
                         ,'Password use Expired'
                         ,:logon.usr_id
                         ,'sms0000');
            error_message := 'Password Expired. Please change password.';
         sms_code.error_message('SMS-'||to_char(0000004)||': '||error_message,'', 'E', 'SMS');
      end if;       
       sms_global.set_user_id(:logon.usr_id);
       :global.User := :logon.usr_id;
       validate_usr_profiles (:logon.usr_id);
    END;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi.
    you can call procedures or functions without problems, and thus reuse
    see the doc http://docs.oracle.com/cd/E24382_01/web.1112/e16182/bcadvgen.htm#sm0297

  • Dynamic function call in Forms PL/SQL [SOLVED]

    I have a 10G form, which has a dropdown list of values. Depending on the value selected, I look up a setup table which will tell me the name of the database package/function to call.
    I then want to call that function with a bind IN parameter and then retrieve the function return value (which is a varchar2 containing message(s) as a stream of text) to display to the user.
    I have searched high and low and cannot find a good example.
    (a) forms_ddl doesn't seem to have the ability
    (b) dbms_sql - some forums/blogs warn away from this due to db version dependencies
    (c) exec_sql seems to be very basic and more aimed at odbc calls, rather than calls to native oracle db functions.
    Here is example pseudo-code of what I am attempting to do on a WHEN-BUTTON-PRESSED trigger
    DECLARE
    v_Param1 VARCHAR2 := 'myInputValue';
    v_FunctionName VARCHAR2 := 'MYDBPKG.MYFUNCTION';
    v_DynamicSQL VARCHAR2;
    v_Result VARCHAR2;
    BEGIN
    v_DynamicSQL := 'BEGIN :v_result:='||v_FunctionName||'('||chr(39)||v_Param1||chr(39)||')'; END';
    Bind v_result variable;
    execute dynamic sql;
    message('the resulting text was <'||v_result||'>');
    END;
    Obviously, my code above has the function name hard-coded, but my real-life code would retrieve this function name from a database table, so I cannot call the function directly in the Forms PL/Sql.
    where the db package/function looks like this:
    create or replace package MYDBPKG as
    function myfunction(I_Param VARCHAR2) return VARCHAR2;
    end mydbpkg;
    Anybody got a good example ?
    Thanks
    Alan
    Edited by: Alan Lawlor on 11-May-2011 09:34

    Alan Lawlor wrote:
    (a) forms_ddl doesn't seem to have the ability
    (b) dbms_sql - some forums/blogs warn away from this due to db version dependencies
    (c) exec_sql seems to be very basic and more aimed at odbc calls, rather than calls to native oracle db functions.you forgot
    (d): don't use dynamic SQL
    As far as I am concerned (from the code I am exposed to) 99,9% of dynamic SQL code is at best used when there is no need for it and at worst it is impemented the most horrific way you can imagine. OK, this is not the entire truth: in 0,4% it is used when there is no need for it, and in the other 0,5% it is used wrong. And in the other 99% it is a combination of both: it is used when there is no need for it plus it is used wrong. So the very best thing you can do is to avoid dynamic SQL.
    but my real-life code would retrieve this function name from a database tablePlease don't do that. This is one of the worst things to do. Forget about the fact that it is a big security hole and most certainly will trash the shared pool of the database and bringing your server down. Most important to developers is that it is a hell of a nightmare to maintain and a lot worse to debug.
    So seriously think about if you want to go down the Dynamic SQL route.
    cheers

  • Oracle forms to SQL SERVER

    Hi
    I have to connect oracle forms to sql server, as per documentation, I created a ODBC string for SQL SERVER, In connect dialog box for oracle forms I entered username, password and @ODBC_string:Database_Name in connect.
    I am not able to connect. Please help me.
    Avinash

    Perhaps your question is more suitable for the Forms forum:
    Forms
    There's APEX as well: http://www.oracle.com/technology/products/database/application_express/html/apex_for_forms.html

  • Apex 4.02 BUG. Form on SQL wizard

    One of the last pages of the form on SQL wizard lets you specify what pages to go to after cancel and submit.
    You can not enter something like &P7_PAGE_ID. here. Because when you finish the wizard you get an invalid number message. You must enter a number here and then when the form is generated go back and change this number back to &P7_PAGE_ID.

    Yes, I guess this is a Bug.
    1. When you speciify a WHERE clause in the Wozard it adds extra quotes when appending the WHERE into the Report SELECT.
    I think thats the root cause, all others just follow as a consequence.
    a. Because the query cannot be parse ( two single quotes) the Use Generic Column Names (parse query at runtime only) is automtacillay set
    b. This leads to COL01 to COL60
    c. Which is turn leads to the link not working.
    I could easily recreate the scenario.
    To fix it I did the following
    1. Removed the extra quotes from the query
    2. Selected Use Query-Specific Column Names and Validate Query and Saved
    It started working correct.
    I suggest you edit your Thred name add BUG at the begining so that it gets spotted by Oracle folks on the forum.
    Regards

  • Conectar el Forms con SQL-SERVER

    Hola...
    Necesito informacisn de como conectar el forms con sql-server 7.0, ya que he logrado mediante sql-plus, dicha conexisn, pero el forms arroja una alerta con pura basura y no seconecta.
    Agradecerma cualquier uinformacisn al respecto.
    Gracias..

    Hola...
    Necesito informacisn de como conectar el forms con sql-server 7.0, ya que he logrado mediante sql-plus, dicha conexisn, pero el forms arroja una alerta con pura basura y no seconecta.
    Agradecerma cualquier uinformacisn al respecto.
    Gracias..

  • Form Rules SQL PCG

    Hi
    I have a client scenario in which we need to check the Header amount of a blanket PO to be compared with
    line amounts.
    If line amounts exceed header amount then an error must be thrown.
    I am trying to create a form rule SQL. for that i started with a small code just to check if we can loop in the lines block and retrieve the values of unit price.
    I am facing an issue when i go and check the results in PO form
    below is the sql code its on when-validate-record in form rule element
    l_item_price      number;
    l_curr_rec number;
    l_last_rec boolean ;
    BEGIN
    fnd_message.Clear;
    First_Record;
    l_curr_rec := name_in('SYSTEM.CURSOR_RECORD');
    l_item_price    := name_in('PO_LINES.UNIT_PRICE');
    Loop
    fnd_message.Clear;
    fnd_message.set_string(l_item_price);
    fnd_message.show;
    if name_in('SYSTEM.LAST_RECORD')= 'TRUE' then
    exit;
    else
    NEXT_RECORD;
    end if;
    end loop;
    END;
    The error says "Illegal Restricted COPY Procedure in WHEN-VALIDATE-RECORD"
    any suggestion would be of help
    Thanks

    Have a look at the PCG user guide (http://docs.oracle.com/cd/E25459_01/doc.730/e25384.pdf). Look at Chapter 6 "Creating Subscribers". Subscribers is how to define under which circumstance should the security rule fire. I hope that helps.

  • How to connect a PDF form to SQL server database through web service?

    Hi,
    I'm new to LiveCycle designer. I have designed a PDF form in LC designer ES2, which suppose to take a personnel number and retrieve the personnel information from a SQL server database. Currently its working fine with XML data and a search button, but I need to securly connect to a database through web service. I know how to connect to a wsdl file through designer. What I need is a wsdl file to connect the form to database. For this purpose, is there any WSDL code to use as the web service?
    I really appreciate your help and advice.

    Hi,
    I'm new to LiveCycle designer. I have designed a PDF form in LC designer ES2, which suppose to take a personnel number and retrieve the personnel information from a SQL server database. Currently its working fine with XML data and a search button, but I need to securly connect to a database through web service. I know how to connect to a wsdl file through designer. What I need is a wsdl file to connect the form to database. For this purpose, is there any WSDL code to use as the web service?
    I really appreciate your help and advice.

  • How to show a message in a form 'PL/SQL Button Event Handler'

    We need validate the sal of an employee, and if it is bigger the value musts
    not be inserted.
    We trying a code like the one shown in the note 134312.1 'HOW TO PASS A
    PARAMETER FROM A PORTAL FORM TO A STORED PROCEDURE' and it works in the insert event of the insert button (using 'PL/SQL Button Event Handler') and it works, but we need to show a message that says the data wasn't inserted. How can we do this?
    The code we used is:
    declare
    v_deptno scott.emp.deptno%type;
    v_empno scott.emp.empno%type;
    v_sal scott.emp.sal%type;
    mySal scott.emp.sal%type;
    v_string varchar2(256);
    blk varchar2(10):='DEFAULT';
    begin
    select sal into mySal from scott.emp where empno=7369;
    v_deptno:=p_session.get_value_as_number(p_block_name=>blk,
    p_attribute_name=>'A_DEPTNO');
    v_empno:=p_session.get_value_as_number(p_block_name=>blk,
    p_attribute_name=>'A_EMPNO');
    v_sal:=p_session.get_value_as_number(p_block_name=>blk,
    p_attribute_name=>'A_SAL');
    v_string:='You just inserted empno: '||to_char(v_empno) ||'to deptno ->
    '||to_char(v_deptno);
    if mySal < v_sal then
    doInsert;
    else
    -- We want to display a message here, when mySal > v_sal
    end if;
    end;
    ----------------------------------

    I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
    Then just reset your flag.

  • Reading old values in a forms pl/sql block

    In a pl/sql block, in a form.
    Lets say I want to loop through...
    cursor c1 is
    select description
    from students
    where student_id = 1000;
    loop
    open c1;
    fetch c1 into v_description
    --step1
    update students
    set description = new description
    where student_id = 1000
    --step2
    select description into v_old_description where student_id = 1000;
    end loop;
    In step2 when I am reading the record I am getting the new description which is expected.
    My question is how can I get the old description. i-s the value of description which was before step1.
    Thanks

    No, you perform an update, so the old value is overwritten in the database.
    If you really want to use sql, and I don't see why in your example, you can try [flashback query|http://www.oracle.com/technology/deploy/availability/htdocs/Flashback_Overview.htm] .

  • LiveCycle PDF form and SQL Server connection

    I'd really like to move from a server-scripted event registration form to a LiveCycle online PDF form, submitted by email and redirecting the user to a Webpage.
    The only obstacle I can see is a dropdown list of users, where a user selects his/her name and then proceeds to choose an event, date, and time. On my
    Webpage form now (scripted in ColdFusion), I use a CFSELECT, which works perfectly. But in looking at LiveCycle, I see that it supports an OLEDB but probably
    not a connection to SQL Server or Oracle. Am I correct? Or is there some workaround that will populate my dropdown list?

    Hello!
    Download jTDS - SQL Server and Sybase JDBC driver from http://sourceforge.net/project/showfiles.php?group_id=33291
    In Oracle SQL Developer open Tools -> Preferences
    Database -> Third Party JDBC Drivers
    Add Entry
    Browse the unzipped driver and add the jtds-1.2.jar file
    emeriqus

  • How to store and retrieve a PDF form to SQL Server from LiveCycle?

    My intention is to save a complete PDF form into a database and then later on retrieve this form from DB.
    To do this, SQL Server has got two datatypes, image or Varbinary(max). I am able to store a PDF using "Execute SQL Statement"(I have written an Insert statement). Some value is being written into DB as well.
    But when I try to retrieve this record using "Query Single Row"(I store the result to a doc variable), the retrieved PDF is of an unknown type and cannot be opened by Adobe Reader.
    I am not sure if my approach is correct. Is it possible to store/retrieve a PDF form to/from a DB through LiveCycle?
    If yes, please give me some guidance.

    hi
    am not sure
    but u can use the same concept as storing image in db and retrieve..
    create a blob column
    parse that pdf and store into that column.
    again u retrieve the content and via file io make the same name with pdf extension..

  • Form an sql query

    Hello,
    I have a problem and can't quite figure it out.
    The picture is like this - I have a campaign which has a set of
    keywords associated with it and a searchtopic. This searches the web for the topic and retrieves results and then counts the number of occurences of each keyword from each hit of the search query and stores this in an analysis table.
    I have the following tables
    Campaign table with campaign_id
    Urlcontent table with url_id and campaign_id -->
    url_id | url | content | campaign_id
    Keyword table with keyword_id and campaign_id -->
    keyword_id keyword campaign_id
    Analysis table with campaign_id, url_id, keyword_id -->
    analysis_id url_id keyword_id count analysetime
    I need to extract data like this
    urla | keyworda | counta | keywordb | countb | analysetimea
    urla | keyworda | counta | keywordb | countb | analysetimeb
    urlb | keyworda | counta | keywordb | countb | analysetimeb
    urlc | keyworda | counta | keywordb | countb | analysetimec
    I think this can be achieved with sql join or subquery but my sql skills
    are really poor.
    I tried ::
    select uc.url, kw.keyword, an.count, an.analysetime from urlcontent uc, keyword kw, analysis an, campaign cm
    join uc.campaign_id = cm.campaign_id
    join kw.campaign_id = uc.campaign_id
    join kw.keyword_id = an.keyword_id
    join kw.campaign_id = an.campaign_id
    where cm.campaign_id=13;
    But this is not working. Appreciate any help. Thanks all.
    cheers,
    sanjeev

    This is probably not the best forum to be posting for help on SQL. Its hard to tell from the explanation of your tables what you need to do. Your join statements need to be of the form:
    JOIN aTable ON tableA.field = tableB.field
    There are several types of join you can perform. Have a look at this tutorial for some help.
    http://www.w3schools.com/sql/sql_join.asp

Maybe you are looking for