Can we have an example of using update, insert, and delete stored procedure

I would like to see an example of using retrieve (return resultset), update, insert, and delete stored procedures in JSF. I need to see syntax how JSF can call those stored procedures. This option is absolutely important when building web-application. Currently, I haven't found resource to do for this purpose yet. The database can be any such Oracle, DB2, pointbase, etc that support stored procedures.
Anyone knows?
Thanks,
Tue Vu

Hi ttv,
I asked around a bit and here's some more info:
To bind a ResultSet to a read only Data Table component just set the "value" property of the Data Table component to point at it, and JSF will synthesize a DataModel around it.
* Note that because we can't call the stored procedure at design time, Creator can't do the fancy table layout stuff it does for rowsets. You'll need to hand craft the columns just like the Google Client example.
* As I mentioned previously, you will have to manually code the stored procedure access in your java code - see the code clip I mentioned in previous reply (and if this is via a stored procedure, then any textbook about JDBC will undoubtedly have examples). Simplest way might be a getter method on the page bean that contains the call to the stored procedure and returns the resulting ResultSet object.
* Don't forget to close the result set - we typically do this at the end of the request (i.e. add a close in the afterRenderResponse() method.
* Don't throw exceptions - or if you have to, make sure you close the result set in a finally clause (thrown exceptions bypass the afterRenderResponse method in the lifecycle).
* You give up on the caching provided by our RowSetDataModel (which can't be connected to a ResultSet even manually), so I would recommend that you only use datatables to display the data and then go to a single row page to do edits/deletes (similar to the TwoPage example in AppModel and the Update, Insert Delete tutorial).
And yes please do submit an example - we will gladly post it!!! :) The best way to submit this kind of thing would be through:
http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
on the right side, Related Links, under Creator Heros, click Submit Content and there you can send it in!
Hope this helps!
Val

Similar Messages

  • Is there any way to actually delete messages from my iPhone? I have already synced my iPhone, updated it, and deleted all of my backups but the messages I have "deleted" still appear in the spotlight search.

    Is there any way to actually delete messages from my iPhone? I have already synced my iPhone, updated it, and deleted all of my backups but the messages I have "deleted" still appear in the spotlight search.

    If you already have an iPhone backup or an iCloud backup, just follow the instructions on the page below
    http://www.whatsapp.com/faq/en/iphone/20888066
    If you didn't back up your iPhone, try to use WhatsApp Pocket to recover your chats:
    http://www.fireebok.com/whatsapp-pocket.html

  • Searching update insert and delete statements

    Hi.
    Suppose, there is change request containing 10 or more programs.
    One of the program has statements, working with database tables,
    like update, insert or delete.
    Is there any transaction where we can select request number and find
    programs working with tables directly.

    Hello
    1. Goto table E071 with TRKORR = change request and OBJECT = {reps, repo, rept}
    2. In field OBJ_NAME will be all reports names in this request
    3. In abap-programm upload this reports into internal table
    4. Search for 'update' 'insert' and 'delete'
    P.s. it is only for reports

  • Can I have any tips about using my iPad and iPhone in the USA?

    Ian going to the USA and Canada in September.  I am unclear on what, if anything, I would need to do to access the Internet. I have been told that I can purchase a SIM card but once inserted, I cannot change it back to a UK one.  Is this true? Can I simply use The Cloud or would this be a non starter in certain 'remote' areas? Any help, tips would be appreciated.

    no it's not but if your iphone is sim locked with an uk carrier you need the carrier to unlock it before you can use other sim cards
    about using the "cloud" for whatever purpose require an Internet connection wifi or cellular

  • How / can I have jpg logo objects used on reports automatically updated

    How / can I have jpg logo objects used on reports automatically updated after making changes to the repository copy of the jpg logo object in the repository?   The reports are in the enterprise items folder of the repository and the logo.jpg file is in a subfolder of repository items.  I made changes but the changes seem to apply only after I set my options in crystal reports and open the actual rpt file itself. 
    Is there a way to have the changes to the logo show / apply in all reports that have the repository item logo inserted into it without having to open every rpt file in the repository?

    Yes, I understand that...  the problem I was having was that check box being unchecked whenever an unrelated change was made to rpt file...  I was able to ensure that it remained checked by doing save as to the rpt file and making sure the "enable repository refresh" box was checked and replacing the file when prompted upons saving the rpt file...

  • Can we use both INSERT and UPDATE at the same time in JDBC Receiver

    Hi All,
    I would like to know is it possible to use both INSERT and UPDATE at the same time in one interface because I have a requirement in which I have to perform both the task.
    user send the file which contains both new and old record and I need to save those in MS SQL database.
    If the record exist then use UPDATE otherwise use INSERT.
    I looked on sdn but didn't find any blog which perform both the things at the same time.
    Interface Requirement
    FILE -
    > PI -
    > JDBC(INSERT & UPDATE)
    I am thinking to use JDBC Lookup but not sure if it good to use for bulk record.
    Can somebody please suggest me something or send me the link of any blog or anything to solve this problem.
    Thanks,

    Hi ,
              If I have understood properly the scenario properly,you are not performing insert and update together. As you posted
    "If the record exist then use UPDATE otherwise use INSERT."
    Thus you are performing either an insert or an update which depends on outcome of a search if the records already exist in database or not. Obviously to search the tables you need " select * from ...  where ...." query. If your query returns some results you proceed with update since this means there are some old records already in database. If your query returns no rows  you proceed with "insert into tablename....." since there are no old records present in database.
      Now perhaps the best method to do the searching, taking a decision to insert or update, and finally insert or update operation is to be done by a stored procedure in MS SQL database.  A stored procedure is a subroutine available to applications accessing a relational database system. Here the application is PI server.   If you need further help on how to write and call stored procedure in MS SQL you can look into these links
    http://www.daniweb.com/web-development/databases/ms-sql/threads/146829
    http://www.sqlteam.com/article/stored-procedures-parameters-inserts-and-updates
    [ This part you can ignore, Since its not sure that you will face this situation
        Still you might face some problems while your scenario runs. Lets consider this scenario, after the stored procedure searches the database it found no rows. Thus you proceed with an insert operation. If your database table is being accessed by multiple applications (or users) other than yours then it is very well possible that after the search operation completed with a null result, an insert/update operation has been performed by some other application with the same primary key. Now when you are trying to insert another row with same primary key you get an error message like "duplicate entry not possible for same primary key value". Thus you need to be careful in this respect. MS SQL has a feature called "exclusive locks ". Look into these links for more details on the subject
    http://msdn.microsoft.com/en-us/library/aa213039(v=sql.80).aspx
    http://www.mssqlcity.com/Articles/Adm/SQL70Locks.htm
    http://www.faqs.org/docs/ppbook/r27479.htm
    http://msdn.microsoft.com/en-US/library/ms187373.aspx
    http://msdn.microsoft.com/en-US/library/ms173763.aspx
    http://msdn.microsoft.com/en-us/library/e7z8d5hf(v=vs.80).aspx
    http://mssqlserver.wordpress.com/2006/11/08/locks-in-sql/
    http://www.mollerus.net/tom/blog/2008/03/using_mssqls_nolock_for_faster_queries.html
        There must be other methods to avoid this problem. But the point is you need to be sure that all access to database for insert/update operations are isolated.
    regards
    Anupam

  • How can I change my iphone username to update apps and download anything with the new email I have today?

    how can I change my iphone username to update apps and download anything with the new email I have today?

    Before you make an apple ID with the new email, go to appleid.apple.com.  login with your old email and password. change your old email to your new one. Now you can use your new email as your apple id, but beware if you go through the process of creating a new appleid with your new email address you will not be able to attach your old account to your new email.

  • Heretic here! Have just inherited a used IPAD 2 and work on Windows 7PC Home premium. Can they interact?

    Have just inherited a used IPAD 2 and work on PC windows 7 Home premium.
    Would like capability of using IPAD as a "dumb terminal" occasionally to connect to PC to do scut work while otherwise engaged.  Possible?  Not interested in films and music so much as being able to enter home booking system etc. 
      If Yes, what do I need to make it so? 

    iOS has no file system directly accessible to users and cannot really be used as a 'bridge' to control or operate your machine's operating system (whether OSX or Windows).
    When you say, "enter home booking system," there are plenty of iOS applications which would be suitable for creating home inventory system and spreadsheets. Applications such as dropbox can be used to transfer files between the device and your machine.
    Additionally, barcode scanning apps exist where you can, for example, bulk scan ISBN's, transfer the csv file, and subsequently input them into a spreadsheet on your machine.

  • Can i have 2 Apple IDs using the same playlist from the same pc?

    can i have 2 Apple IDs using the same playlist from the same pc?

    Easiest way is to create separate computer logins with all your own info including your own iTunes library.
    I recommend each individual not have more than one AppleID because you will have purchases on multiple accounts 
    You can use more than one AppleID in an iTunes library.
    AppleID/iTunes =used for purchases.
    iTunes library = iTunes and all media on your computer.

  • Hello, I have two questions on time capsule  I can only have it on my external hd files and free up my internal memory to my mac  I can use an external hard drive, in my case a lacie rugged as shared memory for my two computers

    Hello, I have two questions on time capsule  I can only have it on my external hd files and free up my internal memory to my mac  I can use an external hard drive, in my case a lacie rugged as shared memory for my two computers

    I have a mackbook pro and an iMac if I buy a time capsule 2tb airport, I can use it with time machine and what would be the best way to use it.
    There is no particular setup required for TM.. both computers will create their own backup sparsebundle which is like a virtual disk.. Pondini explains the whole thing if you read the reference I gave you.
    and how to use time capsule airport whit other external hd to use my old lacie airport with the new time capsule
    Up to you.. you can plug the external drive into the TC and enjoy really slow file transfers or you can plug it into your computer and use it as external drive.. which is faster than the TC.. and TM can include it in the backup.
    Again everything is explained in the reference.. you are not reading it.

  • How can I have a single cursor using elements 9 with Windows 7?

    Currently the cursor on my screen is 3 small boxes in place of the single arrow.  I am using Photoshop Elements 9 With Windows 7.  I have loaded the patch files currently in the Adobe system without any success.

    Thank-you that solved the issue.
    In a message dated 4/20/2014 8:57:10 P.M. Eastern Daylight Time, 
    [email protected] writes:
    Re:  How can I have a single cursor using elements 9 with Windows 7? 
    created by Barbara B. (http://forums.adobe.com/people/Barbara+B.)  in 
    Photoshop Elements - View the full  discussion
    (http://forums.adobe.com/message/6315096#6315096)

  • Can I have multiple Ipad airs using the same i tunes account?

    Can I have mutiple Ipad Air using the same I Tunes account?

    Yes. Are you also talking about them using the same Apple/iTunes/iCloud ID for signing on?
    GB

  • Can I have multiple TFS instances use a single SSRS installation

    Can I have multiple TFS instances use a single SSRS installation?
    Thanks

    Hi Kim,
    According to your description, you have multiple TFS instances using one Reporting Services instance. Right?
    For installing TFS, to use a named instance with Team Foundation Server, you must install SQL Server by using a named instance, or move or restore Team Foundation Server data to a named instance, or create a team project collection on a named instance. Please
    refer to the link below:
    Work with SQL Server Named Instances
    Reference:
    Understanding SQL Server and SQL Server Reporting Services
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • I am using mobile internet from my iphone 3g.Can we have any option to use internet on computer using my iphone

    Hi,
    I am using mobile internet from my iphone 3g.Can we have any option to use internet on computer using my iphone

    you can't bypass activation.  Your phone needs to be activated for any of the functions to work.
    This problem happens often to phones previously jailbroken.  Is this the case?

  • HT202157 I have just went to use my airplay and it's now asking for a passcode which I don't have what can I do

    I have just went to use my airplay and my airplay is asking for an apple passcode which I didn't set any suggestions

    In the Airplay settings section on AppleTV there should be an option to enable/disable Airplay a password - basically used to stop someone hijacking someone else's AppleTV display unless they know the code.

Maybe you are looking for