How to execute Sql command behind the submit button?

Hello Dear,
i design a Visual JFS page with 1 text box, 1 dropdown list, 1 date picker and 1 submit button. i have a database connected to my project with hibernate framework. now i want that whatever i change to textbox, dropdown list & date picker, when i press the submit button the information will insert to my database table. could any one help me with sample code or steps or procedure to accumplish my want?
Regards,
Taibur Rahman

Hi,
1) In baking bean you write one method in that you call Dao method or whatever persistence logic.
2) In html or xhtml on submit button u add one attribute i.e action=#{BeanName.actionInsert}
Since you are using visual JSF, simply double click on button, it'll automatically create action method in backing bean and their you write persistence logic.
Thankyou
Shivaprakash

Similar Messages

  • How to fix problem of bypassing the submit button validation by pressing the space bar in the required fields. this occurrs in the internet explorer and chrome browser, but in foxfire.

    How to fix problem of bypassing the submit button validation by pressing the space bar in the required fields. This occurs in the internet explorer and chrome browse but not in foxfire

    How to fix problem of bypassing the submit button validation by pressing the space bar in the required fields. This occurs in the internet explorer and chrome browse but not in foxfire

  • Java Script behind the Submit Button

    I have an existing pdf form which has a submit button. I need to alter the url embedded in the java script behind this submit button, so that upon submission it goes to a different location. I am not able to locate this java script. Can anyone please suggest how to find out the java script. Thanks in advance.

    Are you able to select the button in Acrobat and bring up the Field Properties dialog? If so, the script should be in a Mouse Up JavaScript action. If not, it could be that the form is Reader-enabled or secured, or is an XFA form created in LiveCycle Designer. It may have also been put through the Distribute Form process in Acrobat, in which case it will be Reader-enabled.

  • How to execute SQL Query from the Crystal report X1

    Dear All,
    I am using crystal report X1. In my application am creating run time MS Access tables and giving table name at run time based on my requirement . From these tables I want to fetch data based on some condition and to display using crystal report X1. I have never used the SQL Queries in the Crystal reports. Please help me out.
    Thanks and Regards,
    Rahaneef T

    Please note;
    This forum is dedicated to all other development-related questions which are not directly addressed by other forums. This includes Business Objects SDKs, products, or technologies which do not fall under BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server, or Crystal Reports (for example Desktop Intelligence SDK, Universe Designer SDK, Portal Integration Kits, Java User Function Libraries, and other third party technologies or development languages).
    This looks more like a Crystal Reports design issue?
    Ludek

  • How to execute unix command from the Java program running on Windows

    Hello,
    I need to
    1. Execute a unix shell script from a Java program running on the Windows.
    2. I also need to capture the output of this shell script in my program.
    Please suggest me how to achieve this.
    Thanks in Advance.

    Hi...
    Something is missing here
    If you want to execute a shell script in windows that not posible unless you find or develop a unix shell script parser for windows.
    But if you are trying the execute a unix shell script on a remote unix computer from your java program running on a windows platform you can do that by logging on to the UNIX terminal which is running on port 23 I think.
    You can test this using telnet tool on windows
    just type on command prompt
    telnet <ip of the unix pc> <port number this case 23>
    you should get the unix terminal. If that works you can do the same through java or you can directly conect to port 23 of that pc using sockets that way your program will be platform independant

  • How to execute SQL Query in Code behind Using infopath 2010?

    Hi,
    I've repeatable on infopath form, and want bind it throuth code behind from SQL table. My question is that how to execute SQL Query in code behind from infopath as well as how would get Query result to bind repeatable control?
    Thanks In Advance
    Shoeb Ahmad

    Hello,
    You first need to add new SQL DB connection then you need execute connection from code behind.
    See below link to create new connection
    http://office.microsoft.com/en-in/infopath-help/add-a-data-connection-to-a-microsoft-sql-server-database-HP010092823.aspx:
    http://www.bizsupportonline.net/infopath2010/connect-infopath-2010-sql-server-2008-table.htm
    Then use below code to execute this connection:
    AdoQueryConnection conn = (AdoQueryConnection)(this.DataConnections["Data connection name"]);
    string origCommand = Select * from tablename;
    conn.Command = origCommand;
    conn.Execute();
    Finally bind your table:
    http://www.bizsupportonline.net/infopath2007/4-way-programmatically-add-row-repeating-table.htm
    http://stevemannspath.blogspot.in/2010/09/infopath-20072010-populate-repeating.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How execute a command on the Console from our prgm

    can any body let me know how do we execute a command on the Console from our prgm . . on a windows platform ..
    eg. a simple commant like "dir" or "cls" . . or whatever . . .
    i heard that it can be done by calling the native methods . . but how is that done???

    thankx for the quick reply . .
    for instance i wanna take a file from my local machine . .
    a c++ source code . . (myfile.cpp)
    i want to execute that on the prompt using c:\> tcc myfile.cpp
    and all these i mean reading the file from the HDD and giving it to the console and getting the output everything should be done by my prgm . .
    so basically the command which i usually run on the prompt i should be able to pass that command from my java prgm to the console and get that thing executed . .
    i hope i am clear now .. .

  • How to execute sql qurery in st05

    how to execute sql qurery in st05
    thanks in advanced.

    Hi,
    do this....
    1.create a small ABAP/4 program that contains only the select statement. Before proceeding, test it to ensure that it works.
    2.Open that program in the editor so that it is ready and waiting to execute.
    3.Open a new session using the menu path System->Create session.
    4.Run transaction ST05 (enter /nst05-zero-five, not oh-five-in the Command field, or choose the menu path System->Utilities->SQL Trace). The Trace SQL Database Requests screen is displayed.
    5.If the Trace SQL Status Information box reads Trace SQL is switched off, go to step 7.
    6.At this point, the Trace SQL Status Information box contains Trace SQL switched on by, followed by the user id who turned on the trace and the date and time it was started. You must switch it off before you can proceed. If the trace was started within the past hour, it is possible that it is still being used. Contact the indicated user or try again later. If the trace was started hours or days ago, the user probably left it on by mistake and it can be safely turned off. To turn off the trace, press the Trace Off pushbutton. The message in the Trace SQL Status Information box should now read Trace SQL is switched off.
    7.Press the Trace On pushbutton. The Trace SQL Database Requests dialog box is displayed. The DB-Trace for User field should contain your user ID. If your user ID is not in this field, enter it now.
    8.Press the OK button. You are returned to the Trace SQL Database Requests screen and the status information reads Trace SQL switched on by, indicating that you turned on the trace.
    9.Switch back to the window containing your editor session (the one with your program waiting to execute).
    10.Press F8 to run your program. (Only press F8, do not do anything else, do not even press the Back button.)
    11.When your program has run and the hourglass is no longer displayed, switch back to the trace window.
    12.Press the Trace Off pushbutton. The status information reads Trace SQL is switched off.
    13.Press the List Trace pushbutton. The Trace SQL Database Requests dialog box is displayed. The fields on this screen will already contain values.
    14.Press the OK button. You might need to wait a little while, at most a couple of minutes. The Trace SQL: List Database Requests screen is displayed.
    15.Type %sc in the Command field and press the Enter key. The Find dialog box is displayed.
    16.Type the name of the table you are tracing in the Search For field. (This is the table named in the select statement in your ABAP/4 program.)
    17.Press the Find button. A search results list should be displayed with your table name highlighted.
    18.Click on the first highlighted table name. You are returned to the Trace SQL: List Database Requests screen. Your cursor is positioned on the first line containing your table name. To the right of it, in the Operation column, should be the word PREPARE, OPEN, or REOPEN.
    19.Press the Explain SQL button on the Application toolbar. The Show Execution Plan for SQL Statement screen is displayed.
    20.Scroll down to the execution plan. The index used will be displayed in blue.

  • SQL2005 cluster error MDB-05053  Errors when executing sql command: p nr="

    Hi all,
    We are migrating from 32 bit to x64 bit machines. SQL 2005 database on windows 2003.
    I am trying to install E 4.7-200 SR1 on the clustered nodes. The installation manuals for 4.7 are very old and there is nothing for SQL2005 installation.
    Now that some how we were able to have SQL up and running in clustered environment (It only took 10 days), After installing CI, I am not able to deploy the database and database creation phase is failing with the following error:
    MDB-05053  Errors when executing sql command: <p nr="0"/>.
    I am heavily relying on our server managment team on clustering and hoping they have done a good job, However I need some guidelines which can help me in verifying what they have done is correct and meets SAP and SQL requirments and issues we are facing is actually install problems not cluster.
    SAP install manuals are not detailed in this regards. Also manuals are out dataed and they only show the sql 2000 clustering pre-requisit for 4.7 installls.
    Can any one with clustering experience please help.
    Calling out NPC, As his sql installation and upgrade manual has helped me with stand alone installs, Hoping he has some thing for clustering as well.
    Regards,
    KG

    Hi,
    What installation CD/DVD are you using?
    Try look at SAP note [924288|https://service.sap.com/sap/support/notes/924288],
    and note [969699|https://service.sap.com/sap/support/notes/969699],
    and note [967124|https://service.sap.com/sap/support/notes/967124],
    and note [106275|https://service.sap.com/sap/support/notes/106275].
    In special the last note say at the end:
    "3. You must use the 51031444 CD to install Enterprise 4.7 on an x64 platform with SQL Server 2005. This CD installs the central instances and database instances. To convert the A and B nodes in MSCS, use the SAP NetWeaver 04 SR1 installation master CD or DVD."
    Hope this helps
    Regards
    Rolf

  • How to execute sql scripts from Powershell across multiple databases

    Re: How to execute sql scripts from Powershell across multiple databases
    I have an tsql script that I want to run across a list of databases. How is the best way to do this in Powershell? Thanks.

    My example below, using just the SMO and not breaking up the batches, the ExecuteWithResults give the following error when the .sql file contains a GO. My script files are as simple as a DECLARE and then a GO.
    WARNING: SQL Script Failed
    The object of type "Microsoft.PowerShell.Commands.Internal.Format.FormatStartData" is not valid or not in the correct sequence. This is likely caused by a user-specified "format-list" comm
    and which is conflicting with the default formatting.
        + CategoryInfo          : InvalidData: (:) [out-lineoutput], InvalidOperationException
        + FullyQualifiedErrorId : ConsoleLineOutputOutOfSequencePacket,Microsoft.PowerShell.Commands.OutLineOutputCommand
    Also, when executing from the ISE, is there a way to force the ISE to release the files. I am having to close the ISE and reopen my script every time I want to make a testing change to the .sql file.
    [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo")
    $scriptspath = "C:\temp\psExecuteSQLScripts\scripts"
    $SQLServer = "fidevc10"
    $SQLDB = "Bank03"
    # Create SMO Server Object
    $Server = New-Object ('Microsoft.SQLServer.Management.Smo.Server') $SQLServer
    # Get SMO DB Object
    $db = $Server.Databases[$SQLDB]
    # Load All SQL Scripts in Directory
    $scripts = Get-ChildItem -Path (Join-Path $scriptspath "*") -Include "*.sql" -Recurse
    # Loop through each script and execute
    foreach ($SQLScript in $scripts)
    $fullpath = $SQLScript.FullName
    # Read the Script File into Powershell Memory
    $reader = New-Object System.IO.StreamReader($fullpath)
    $script = $reader.ReadToEnd()
    # Execute SQL
    Write-Host "Executing $SQLScript on $SQLDB...."
    try
    $ds = $db.ExecuteWithResults($script)
    Foreach ($t in $ds.Tables)
    Foreach ($r in $t.Rows)
    Foreach ($c in $t.Columns)
    Write-Host $c.ColumnName "=" $r.Item($c)
    Write-Host "Complete"
    catch [Exception]
    Write-Warning "SQL Script Failed"
    echo $_.Exception|format-list -force
    Write-Host " " -BackgroundColor DarkCyan

  • How to execute unix command line from cocoa?

    how to execute unix command line from cocoa?
    for example, if I want to call "ping" from cocoa, how should I do it? and how can I obtain the return value?
    thank you.
    Power G5 Quad Mac OS X (10.4.3)

    The following article may also help:
    http://cocoadevcentral.com/articles/000025.php
    Mihalis.
    Dual G5 @ 2GHz   Mac OS X (10.4.6)  

  • In batch file i want to execute sql commands

    in x.bat file i write the following
    sqlplus user/pass@host @c:\a.sql
    @c:\b.sql
    when i execute this batch file it is connected to the databse
    and the table of a.sql is created in the database.
    but b.sql is not created.
    it is creating only one table
    i want ot create more no of tables with different .sql files
    like @c:b.sql
    @c:c.sql
    @c:d.sql
    please any body help

    The problem you are running into is that SQL Plus only recognizes the first command you have written in the batch file.
    sqlplus user/pass@host
    SPOOL c:\master.log
    @c:\a.sql
    @c:\b.sql
    SPOOL OFF
    SQLPlus will recognize the spool and first sql command, but the batch file gets command back after the first sql command executes and doesn't recognize @c:\b.sql or know what to do with it. To run multiple SQL commands you have to create an external SQL file with all the sql commands in it with the Spool files you want created, then in the batch file you only call the one SQL script.
    Create a master file like so:
    -- Script Name : AllFiles.sql
    SPOOL c:\master.log
    @c:\a.sql
    @c:\b.sql
    SPOOL OFF
    In x.bat
    CALL SQLPlus user/password@database @AllFiles.sql
    This should get you your required results.

  • Please Suggest...How to execute SQL quiries in JDeveloper using BPEL????

    Hi All,
    I am very new user of Oracle JDeveloper and BPEL. I am trying to develop a process flow in JDeveloper using BPEL and get stuck when I was trying to execute a SQL quiry in the flow.
    How to execute SQL quiries using JDeveloper and BPEL?????????????
    Possibilities might be..
    1.Configring Database Adapter
    2.Using Java Embedded activities of BPEL
    However, any of the above mentioned way is not clear with me how to implement it to get the query run in the process flow.
    It will be great if anyone could help me with this concept....
    Thanks in advance
    -Prabha
    Edited by: user10259700 on Sep 15, 2008 3:48 AM

    Hi,
    though BPEL has its development environment in JDeveloper, it has its own forum
    BPEL
    Frank

  • How to execute Linux command from Java app.

    Hi all,
    Could anyone show me how to execute Linux command from Java app. For example, I have the need to execute the "ls" command from my Java app (which is running on the Linux machine), how should I write the codes?
    Thanks a lot,

    You can use "built-in" shell commands, you just need to invoke the shell and tell it to run the command. See the -c switch in the man page for your shell. But, "ls" isn't built-in anyays.
    If you use exec, you will want to set the directory with the dir argument to exec, or add it to the command or cmdarray. See the API for the variants of java.lang.Runtime.exec(). (If you're invoking it repeatedly, you can most likely modify a cmdarray more efficiently than having exec() decompose your command).
    You will also definitely want to save the returned Process and read the output from it (possibly stderr too and get an exit status). See API for java.lang.Process. Here's an example
    java.io.BufferedReader br =
    new java.io.BufferedReader(new java.io.InputStreamReader(
    Runtime.getRuntime().exec ("/sbin/ifconfig ppp0").
    getInputStream()));
    while ((s = br.readLine()) != null) {...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to execute  make  Command?

      Run in the terminal inside the  make command,prompt:"-bash:make:command not found"  My system version is Mac OS X 10.7.3 Xcode Version is 4.3.
      How to execute  make  Command?
                                    thanks!!

    I switch to / usr / bin directory also did not find the make  only to find a makeinfo. Google to find relevant information, if installed Xcode will be able to run make, but now does not work.
    But still thank you very

Maybe you are looking for

  • PI 7.1 : File to JMS Scenario Help.

    Hello Experts, We are trying to implement a scenario where in we want to send the data in the file as it is to the JMS adapter in 7.1 because the data is already in expected format. The file is generated by SAP. The format of the data is: EDI_DC40  2

  • Local storage is low but after i free up lots of space i still cannot install an app

    I have tried to install the Fifa 13 app on my ipod but keep getting a message saying there is not enough available local storage. I have deleted lots of other apps etc and my available storage is 4.1 GB but I still keep getting the same message when

  • Repetitive Structure in HR....!!!

    Hi, Kindly let me know Repetitive structure in HR. Regards, Nitin Jain

  • Problems upgrading from v10.5.8 to snow leopard.

    I recently purchased Mac OS X snow leopard to upgrade my v10.5.8 Macintosh computer. The computer successfully got half way through the install then automatically rebooted itself. After this happened it remained at the reboot screen indefinitely (scr

  • Component-family and renderer

    Hi All in jsf beta i have following in faces-config.xml and it was working fine. <render-kit> <renderer>      <renderer-type>Text</renderer-type>      <renderer-class>com.sxc.faces.render.CustomTextRenderer</renderer-class> </renderer> </render-kit>