Hi friends plz help me with dialog programming

hi,
i have developed a screen with flow logic.it has few mandatory fields , radiobuttons,check boxes and pushbuttons such as Create,Save,Display,Back. after entering the values and save i have no problem but when taking back or display it is asking for mandatory field i need not give values for those field to take back.plz provide me with very quick response.
and how do i save data from selected checkboxes or from radiobuttons to ztables and how do i retrieve data back to radiobutton in selected format .
kindly help rewarded for answers.

Hi Sirisha,
Goto menu painter and give given status for ur program-> go to standard tool bar and double click on BACK and select Function type = E.
or
double click on ur PF status  and do the same.
once you give function type E, write one module under PAI like below.
PROCESS AFTER INPUT.
MODULE BACK AT EXIT-COMMAND.
code for Module BACK
IF ok_code = 'BACK' OR ok_code = 'EXIT'.
    CLEAR: ok_code.
    LEAVE TO SCREEN 100." This is the screen where u want to come back
  ENDIF.
ENDMODULE.
This module BACK is executed wherever u write under PAI when Function type E is defined for Screen Element.
for more details on this topic. please have a look.
[http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbaa9535c111d1829f0000e829fbfe/content.htm|http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbaa9535c111d1829f0000e829fbfe/content.htm]
I hope that it helps you ..
Regards,
Venkat.O

Similar Messages

  • Set Default Values in Listbox with Dialog Programming

    Hi all,
    I am stuck with a problem i.e  I am working with Dialog Programming Screen
    where i have to set default values in some n numbers of Listbox which i have created on Screen.
    This default value is needed to be fetched from database table.
    I am using single table. Hence no confusion that i have to first fetch data from 1st listbox then corresponding data is fetched into second & so on ..NO NO This is not required.
    Simple one screen which will update a table in database, where  some fields on the screen needs to be default set as per tables domain default values set while table creation.
    Please help me out in this.
    Thanks & Regards,
    Sandhya.

    Please search SDN, before you post a new forum from next time... any ways just follow the below code..
    u need to use the FM 'VRM_SET_VALUES' to implement list box in module pool. Check the below code. u have to write this code in PBO..
    if c = 0.
    select land1 landx from t005t into table wi_country.
    sort wi_country by land1.
    delete adjacent duplicates from wi_country comparing all fields.
    loop at wi_country.
    wa_ctry-key = wi_country-land1.
    wa_ctry-text = wi_country-landx .
    append wa_ctry to wi_ctry.
    endloop.
    call function 'VRM_SET_VALUES'
    exporting
    id = 'ZCUST_MASTER1-COUNTRY'
    values = wi_ctry
    exceptions
    id_illegal_name = 1
    others = 2
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    c = 1.
    endif.
    Hope this helps u,
    Regards,
    Rajesh

  • Plz help me in j2me programming

    Hello friend,
    I am making progress bar in j2me which is made by Gauge class.
    here iam fetching data from jsp page..in between all data process and come on to mobile screen i want to show progress bar on screen..plz help me how can i bind my process with Gauge..
    if u understand me plzz try to solve my problem...
    Thanks in advence
    Aman Gautam

    As this FS seems to be for lingerie company "Victoria's Secret" could points be converted to underwear instead of t-shirts?
    Tip: If you're going to post an entire spec you may want to remove the customer's name first.

  • Plz help me with displaying image.....

    hai friends,
    i am doin a simple project for my school in jsp and servlets.... actually my problem is very simple i tink ...but am unable to track out....and am new to jsp...actually i want to insert an image near my text...but am unable to display image...i simple get an ' X ' mark and the alternate text instead of the image ...is it tat my browser is unable to display images?? can i change the settings of my browser?? plz tell me how to do it ?? i hav pasted my code also....
    <tr>
                   <td valign=top width=100>
                   <img src="/images/icon.bmp" align=left width=30 height=30 alt="image"><a href="/project/servlet/SubforumviewServlet?name=<%= forname %>"><%= forname %></a>
                   </td>
              </tr>
    that forname is the name of my link..
    i hav another doubt also...is CSS like a template?? do we need to write the code or we can just include it to our jsp?? cos i need to enhance my jsp page to look more professional lik websites... sorry if my question is really childish.....plz help me !!!! thanx in advance..

    Hi...
    I tried your code and its working fine..I think the problem is with the location of your image. In the src attribute, give the correct location of the image. If you are giving /images/im.bmp, the folder images should be in the same directory as your jsp. Hope it help.
    Regards,
    Cochu.

  • CAN ANYBODY PLZ HELP: problem opening any program including internet explorer

    i recently got rid of "vista internet security 2010". Took me many scans to wipe it and it seems like i finally cleared it. Now i cant click on anything without it popping up a box saying,
    "open with: choose the program you want to use to open this file".
    I dont understand what happened but it started doing that right after i used my antivirus and it found the trojan.
    can anybody plz help me fix this withouth me having to do a complete system restore?
    ill greatly appreciate it.

    Angie, please be sure to download and run this free tool.
       Malwarebytes' Anti-Malware
    "open with: choose the program you want to use to open this file
    Which file types (see the "extension" at the end of the file) produce that message?
    Which computer? Which Windows?
    -Jerry

  • Plz help me with the workflow.........

    I'm trying my level best to mould my expectations according to the software but till now no success,can you plz explain
    to make the timeline less cluttered and organized we make secondary storylines and compound clips
    since you can't keep too many things in order in a big project you take a portion ,compound it , work in it and come back,
    within the compound clip you put transitions and some secondary storylines get created automatically within the compound clip due to applying transitions.
    When you come back to the main timeline there are several times you have to break apart that compound clip,to now add more shots before and after those individual arrangement of clips ......
    but since it has a secondary storyline in it, it break aparts undoing all the transitions
    if instead of compound clip it is a secondary storyline it creates problem if we have to retime clips the clip again and again leaves its assigned position,nor does it eat on or overlapp the slug it has created with a P tool , when dragged,retiming it increases that clip in both directions thus leaving the assigned place......,or with opacity overlapping or for split screen have to be controlled individually from within the secondary clip in association with another clip below it...........at that moment you definately want to break it apart......
    (I'm assuming that you are understanding I have to work in several layers sometimes six or seven due to complex overlapping ,split screen, keying and titles etc which you can't keep in a linear order)
    Now plz suggest how should I work,
    in my music videos there are more than 300 bits of clips in a 5 minute song......in several layers because of mulitilayer opacity effect and split screens
    it is not possible to cut all the clips first and then put transitions in the end because you have to try arrangement of clips with transitions to see if you get the proper feel of the music else you change the order.......plz suggest me a better work flow.....
    I cannot keyword things in the event browser because keywording such huge number of moments including 2-3 second shots is simply impossible because the process of trying various combinations can only be done when you have them all on the timeline in various layers..........how should I begin and what process should I stick to so that I edit portions finish them come back to main timeline and everything remains unaltered.........Thank you plz help.

    So does this mean......If you can't drag your final work directly from the event browser from the beginning , you are in trouble ?
    Thanks Tom ......................I know you cannot make this software work the way you want the only workflow I see possible is making event browser , the source of your footage at the very start of your project....as if you have planned the editing of all those 300 bits of a music video on the paper before hand......be it organizing clips or using split screen generators the source has to be from the event browser ,once clips are on the timeline the possibilities are too limited.......
    The only way of categorizing clips on timeline are roles which only unhighlight other clips ....it again cannot be used like a selected list of source to make the place less messy.....I think even smart collection works from the event browser not from the timeline because I tried that also.Is it so....?
    A FANTASY ....I wish there was a way where you could select selective clips from the timeline and refer them in a place from where they would all show up like original clips from the event browser so that you could just drag those exact pieces and place one after the other trying combinations and boom........ like you do parts from clips ......but once everything is on timeline I have still not figured out a way that you can have a bank where all those selected bits can be seen even as reference thumbnails and a then they can be placed sequentially on a timeline........dragging , move and pasting , flipping between timelines is the only way of doing it neatly,and that is very tiring and time consuming .....when two timelines can also not be placed in two windows.......I hope you are understanding what I want.......if you can't drag your final work directly from the event browser from the beginning , you are in trouble.
    In earlier versions you could atleast keep all your selected 2-3 second bits or shots on various tracks and just drag them in the final track.....Is there anyway you think can be done in fcpx......I use it because it has some outstanding features other than layers .....else still have to figure out a way....plz help Tom.

  • Pls help me with this program - urgent

    Hi,
    I am new to Java. First time to do the program. Stuck here.
    The description of the program:
    Implement a complex number (numbers of the form a+ib, where i2 = -1, i2 is i raised to power 2 ). Recall that a complex number consists of a real part (a) and an imaginary part (b). Provide a reasonable set of constructors; the methods add, subtract, multiply and divide; as well as toString and equals.
    You are to implement a complex number as having two fields, one for the real part another for the imaginary part.
    If z = a + ib and x = c + id are two complex numbers, then their sum z+ x = (a+c) + i(b+d), quotient z/x = (ac+bd)/(c*c+d*d) + i(-ab+bc)/(c*c + d*d). two complex numbers are equal if their real and imaginary parts are equal.
    I really do not have any clues about imaginary parts and how to do it.
    Could you please help me with that.
    Thanks a lot.

    ur dboubt has nothing to do java.. its a mathematical concept..
    as the question says the complexnumbers can be represented in the form of a+ib where i=squre-root of -1 .. and as this is imaginary (ie u cant get a minus number by squring a number) the second part is called imaginay.
    so as a programmer u dont have to give more strain on this but to declare a class having to instance varaiables and inplememts the methods as said.
    and in the toString() method u can return the numbers in the reuired format like
    return ( a + "+i" +b);

  • Please help me with simple program

    Can someone please write a simple program for me that opens up a webpage in the center of the screen , with a set size, and then asks the user where they would like to click on the screen. Then once the person clicks it asks how many times they would like to click there, and then once they enter the # the program opens up the webpage (in the center at the same spot as before, with the same set size) and automatically clicks on the predesignated spot , and then closes all open internet windows, and keeps doing it for however many times the person chose. PLEASE HELP ME WITH THIS!!! If you could, please post the source code here. Thank you so much to whoever helps me!!!!!!!

    If it's not to learn, then what is the purpose of
    this project?well, if it's not HW and its not for learning java, then why the hell would anyone like to have a program that may open a webpage and then repeatedly click on predefined place...
    let me see...
    now if he had asked for program that fakes IP as well, then i would suggest that he tryes to generate unique clicks, but now... i'm not sure... maybe just voting in some polls or smthing... though, i would not create a program that clicks on the link or form element, but rather just reload url with given parameters for N times...

  • Plz help me with wi-fi

    i am not familiar with the wi-fi network. i am useing verizon fios adn i got the free router( MI424WR i believe it is ) i am having trouble conneting to it. any reasons why i can't? only the first to things pop up in settings>wi-fi>wi-fi networks. i don't get the router or DNS but i get the IP address adn subnet mask. can some1 plz help me out here

    Read the posts from Jason C and dantaoist in this thread:
    http://discussions.apple.com/thread.jspa?messageID=6064013&#6064013

  • Plz help me with this error

    hello plz help me wat i can do for this error and plz also tell me where to place the POI api in tomcat directory.........
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 22 in the jsp file: /HSSFExample.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:13: ';' expected
    import org.a
    ^
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:8: package org.apache.poi.poifs.filesystem does not exist
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;
    ^
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:9: package org.apache.poi.hssf.record does not exist
    import org.apache.poi
    ^
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:11: package org.apache.poi.hssf.model does not exist
    import org.apache.poi.hssf.model.*;
    ^
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:12: package org.apache.poi.hssf.usermodel does not exist
    import org.apache.poi.hssf.usermodel.*;
    ^
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:13: cannot resolve symbol
    symbol : class a
    location: package org
    import org.a
    ^
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:74: cannot resolve symbol
    symbol : class POIFSFileSystem
    location: class org.apache.jsp.HSSFExample_jsp
    POIFSFileSystem fs =
    ^
    An error occurred at line: 22 in the jsp file: /HSSFExample.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:75: cannot resolve symbol
    symbol : class POIFSFileSystem
    location: class org.apache.jsp.HSSFExample_jsp
    new POIFSFileSystem(new FileInputStream(filename));
    ^
    An error occurred at line: 22 in the jsp file: /HSSFExample.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:76: cannot resolve symbol
    symbol : class HSSFWorkbook
    location: class org.apache.jsp.HSSFExample_jsp
    HSSFWorkbook wb = new HSSFWorkbook(fs);
    ^
    An error occurred at line: 22 in the jsp file: /HSSFExample.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:76: cannot resolve symbol
    symbol : class HSSFWorkbook
    location: class org.apache.jsp.HSSFExample_jsp
    HSSFWorkbook wb = new HSSFWorkbook(fs);
    ^
    An error occurred at line: 35 in the jsp file: /HSSFExample.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:89: cannot resolve symbol
    symbol : class HSSFSheet
    location: class org.apache.jsp.HSSFExample_jsp
    HSSFSheet sheet = wb.getSheetAt(k);
    ^
    An error occurred at line: 35 in the jsp file: /HSSFExample.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:94: cannot resolve symbol
    symbol : class HSSFRow
    location: class org.apache.jsp.HSSFExample_jsp
    HSSFRow row = sheet.getRow(r);
    ^
    An error occurred at line: 48 in the jsp file: /HSSFExample.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:108: cannot resolve symbol
    symbol : class HSSFCell
    location: class org.apache.jsp.HSSFExample_jsp
    HSSFCell cell = row.getCell(c);
    ^
    An error occurred at line: 48 in the jsp file: /HSSFExample.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:115: cannot resolve symbol
    symbol : variable HSSFCell
    location: class org.apache.jsp.HSSFExample_jsp
    case HSSFCell.CELL_TYPE_FORMULA :
    ^
    An error occurred at line: 48 in the jsp file: /HSSFExample.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:119: cannot resolve symbol
    symbol : variable HSSFCell
    location: class org.apache.jsp.HSSFExample_jsp
    case HSSFCell.CELL_TYPE_NUMERIC :
    ^
    An error occurred at line: 48 in the jsp file: /HSSFExample.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\examples\HSSFExample_jsp.java:125: cannot resolve symbol
    symbol : variable HSSFCell
    location: class org.apache.jsp.HSSFExample_jsp
    case HSSFCell.CELL_TYPE_STRING :
    ^
    16 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:445)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:536)

    You can put the POI jar file in the WEB-INF/lib directory of your application, or if you want to use it in multiple applications you can put it in the tomcat 4.1/shared/lib directory.

  • Plz help me with Upgradation Tools

    hi Gurus,
    Can u help me with any upgradation tools..
    Regards
    Sahil

    Hi Sahil,
    Upgrade Projects can follow one of the 2 possibility.
    1. Technical Upgrade: in which the basis consultant will handle the same & transport the configurations & developments from 5.0 to 6.0. Subsequent to which functional consultant & ABAP er will do the necessary change in configuration or further configuration & ABAP ers will do necessary developments required.
    2. Traditional ASAP mythology: which would refer as new implementation as a whole.
    STEPS IN TECHNICAL UPGRADE
    • Basis Team will do the prepare activities. (UNIX, BASIS, DBA).
    The client has modified • Developer need to run the Transaction SPDD, which provides the details of SAP Standard Dictionary, objects that. Users need to take a decision to keep the changes or revert back to the SAP Standard Structure. More often decision is to keep the change. This is mandatory activity in upgrade and avoids data loses in new system.
    • After completing SPDD transaction, we need to run SPAU Transaction to get the list of Standard SAP programs that have been modified. This activity can be done in phases even after the upgrade. Generally this will be done in same go so that your testing results are consistent and have more confident in upgrade.
    • Run SPUMG Transaction for Unicode Conversion in non-Unicode system. SPUM4 in 4.6c.
    • Then we need to move Z/Y Objects. Need to do Extended programming check, SQL trace, Unit testing, Integration testing, Final testing, Regression Testing, Acceptance Testing etc.,
    The main Category of Objects that needs to be Upgraded is –
    • Includes
    • Function Groups / Function Modules
    • Programs / Reports
    • OSS Notes
    • SAP Repository Objects
    • SAP Data Dictionary Objects
    • Domains, Data Elements
    • Tables, Structures and Views
    • Module Pools, Sub Routine pools
    • BDC Programs
    • Print Programs
    • SAP Scripts, Screens
    • User Exits
    You can find the difference in release notes of each SAP version.
    Here are the links.
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/e3003deddfae4de10000000a114084/frameset.htm
    http://help.sap.com/saphelp_scm50/helpdata/en/28/b34c40cc538437e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/43/68805bb88f297ee10000000a422035/frameset.htm
    Reward if helpful.
    Regards,
    Harini.S

  • Can u plz help me with the code to add BWART field to the DS:2LIS_04_P_COMP

    I want to add BWART field from AUFM table to the DS:2LIS_04_P_COMP.
    The AUFM table has key fields as :MBLNR,MJAHR and ZEILE.Can someone plz help with the code to put in the existing function module.I see that both 2LIS_04_P_COMP and AUFM have common field AUFNR process order.
    Plz help ASAP.

    I want to add BWART field from AUFM table to the DS:2LIS_04_P_COMP.
    The AUFM table has key fields as :MBLNR,MJAHR and ZEILE.Can someone plz help with the code to put in the existing function module.I see that both 2LIS_04_P_COMP and AUFM have common field AUFNR process order.
    Plz help ASAP.

  • Plz and plz help me with restriction code

    hello to all i have nokia 6288 but when i enter any sim card it want restriction code plz help me thanks allot
    totti

    The reason you are being asked for a code is because the phone is network locked.
    You need to contact the network that it's locked to for the unlock code.

  • Plz help me with this data insertion code

    Hi,
    I am listing a code below ,I am able to insert only one row of value.
    Then i get SQLException.General Exception and a Lock record MSAccess file is generated where .mdb file is stored.
    public void throwtodatabase()
    String gameid;
    ResultSet rs=null;
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con;
    con=DriverManager.getConnection ("jdbc:odbc:MyData","","");
    Statement stat3=con.createStatement();
    rs=stat3.executeQuery("select * from sudoko");
    while (rs.next()) {
    pctr=pctr+1;
    stat3.close();
    con.close();
    catch(Exception g)
    JFrame ob2=new JFrame();
    JOptionPane.showMessageDialog(ob2,g.toString(), "Message", JOptionPane.INFORMATION_MESSAGE);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con;
    con=DriverManager.getConnection ("jdbc:odbc:MyData","","");
    gameid="G00"+String.valueOf(pctr);
    PreparedStatement stat=null;
    for (int t1=1;t1<=9;t1++) {
    for (int t2=1;t2<=9;t2++) {
    stat=con.prepareStatement("Insert into Sudoko(gameid,row,col,val) values(?,?,?,?)");
    stat.setString(1,gameid);
    stat.setString(2,String.valueOf(t1));
    stat.setString(3,String.valueOf(t2));
    stat.setString(4,String.valueOf(array_map[t1][t2]));
    stat.execute();
    con.close();
    catch(Exception xd)
    JFrame ob2=new JFrame();
    JOptionPane.showMessageDialog(ob2,xd.toString(), "Message", JOptionPane.INFORMATION_MESSAGE);
    }Plz help.Thanx in advance.

    Have this stacktrace
    java.sql.SQLException: General error
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(Unknown Source)
    at Sudoko.throwtodatabase(Sudoko.java:1120)
    at Sudoko.generate_random_boards(Sudoko.java:1064)
    at Sudoko.actionPerformed(Sudoko.java:205)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
    n Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
    ce)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

  • Plz help me with random number generators

    cane someone help me write a program that generates 2 random numbers, generates a random operation(+,-,/,*) then ask you for answer, and checks to see if the answer is right, and if not it corrects it for you.
    thank you

    when i do the cases i did the addtion as the first case, and now all i get is addition
    import javax.swing.*;
    import java.text.*;
    import java.util.*;
    public class randomnumbers
         public static void main(String[] arg)
              String input;
              int answer;
              int choice=1;
              Random rand = new Random();
              int num1 = (int) (Math.random()*9+1);
              int num2 = (int) (Math.random()*9+1);
              switch(choice)
                   case 1:System.out.println("What is "+num1+"+"+num2);break;
                   case 2:System.out.println("What is "+num1*'*'*num2);break;
                   default:System.out.println("Illegel Operation");break;          
              input=JOptionPane.showInputDialog("What is the answer?");
              answer=Integer.parseInt(input);
    }

Maybe you are looking for