Saving changes to database

HI
I have a few queries running in my application.
I want to be able to ask the user when he exists the program
whether he wants to save changes.
And I only want to ask this question if any changes have
been made to any of the queries.
Can someone tell me how can I do this?

Hi,
Yes u can do it in this way.Create a dataobj for the table.Override equals method and clone it before u start editing.and before u save the check for the equals of the clonned object with the original one.this is one of the way to do.
Try it out..
sreeni,
[email protected]

Similar Messages

  • Error message: "Querying or saving changes to the database failed."

    Hi all,
    I can sense I'm becoming a regular on this particular forum - the problem of spending 8 hours a day trying to get this software working!
    _*The problem*_
    When i try and setup a new device, or modify an existing one, I get an error message when i get to the Transcode Settings page. The error message is "Querying or saving changes to the database failed." After this I get a blank screen and can no longer see my settings.
    No amount of restarting has fixed this. And I cannot see a way to create a device through the client software and add transcode settings.
    Help?
    Thanks in advance,
    Ben

    Ah very good!
    Ok - it seems then that this works absolutely fine as a work around. I can create a device and then assign the device to transcode settings through the client adminsitration panel (which is indeed what I meant).
    So, there is a work around. Far less pressing now, but I would like to know why I'm getting the error message all the same - I'm now concerned about the integrity of the database...
    Thanks Tony!
    B

  • Saving Forms in Database

    Hi All,
    We are being unable to save a form into the database.
    This form is all along been saved in the database and it is one
    of the common forms which we use throughout our applications and it basically contains common blocks , procedures which are used or referenced by all file system forms across the application.
    The problem has started recently after we did some changes in it and then again try to store it back into the database. Basically we store another form (900KB) in DB along with this one (2200KB),
    I have tested, with the other form already in the database we
    are not being able to save a form of this big size in the
    database, whereas it allows us to save the form only if its size
    is less than 1600KB. That means it is a form size related issue.
    If anybody has faced similar problem and know if there is any
    change or tuning required in any of the database schema objects
    then please help me. Its a mission critical problem for our
    organisation.
    ORACLE PEOPLE PLEASE HELP US !
    We are using forms 4.5 with Oracle 8.0.6 on MS WindowsNT 4.0.
    Thanks in advance.

    Yes Grant, we get error message :
    The Windows Error (F50des32.exe - Application error) :The
    instruction at "0x5d9e9280" referenced memory at "0x0001567a".
    The memory could not be "read".
    Basically we have two forms in the database, say form1 and form2. Form2 itself is referencing objects in form1, and both these forms are referenced by other filesystem forms. We are unable to save the form2 but not the form1.
    Each time we try to save the Form2 in the database we are facing the problem. Form1.fmb is of the size 828KB, whereas Form2.fmb is 2200KB. Is the problem related to the size of the form ? I believe these forms are stored in the SYSTEM tablespace, I checked the system tablespace, its used 117MB and is 22MB free, initial extent is 122880 and next is 122880 with max
    extent 300.
    This problem is having in all our test databases and is not
    really related to any particular machine (statistics given is of
    one of our test database).This problem may have occured before
    but I am not sure as we are in need to change in the database
    forms first time after I have taken over responsibility.Please
    look into the problem with high priority as we are in need to
    update live applications ASAP.

  • Facing problem while changing the database at runtime

    hi everyone,
    Before posting this thread, i have gone through the various posts addressing the problem....but still iam unable to get the solution for this problem.
    The report has been generated in one system, so the database properties (connection string....) are hardcoded in the report file...
    Now when iam trying to change the database, it is still connecting to the system where the report file was created.
    I have tried the changeDatasource() method, but it didnot worked....
    here is the code for changeDatasource() method
    public static void changeDataSource(ReportClientDocument clientDoc,
                    String reportName, String tableName,
                    String username, String password, String connectionURL,
                    String driverName,String jndiName) throws ReportSDKException {
            PropertyBag propertyBag = null;
            IConnectionInfo connectionInfo = null;
            ITable origTable = null;
            ITable newTable = null;
            // Declare variables to hold ConnectionInfo values.
            // Below is the list of values required to switch to use a JDBC/JNDI
            // connection
            String TRUSTED_CONNECTION = "false";
            String SERVER_TYPE = "JDBC (JNDI)";
            String USE_JDBC = "true";
            String DATABASE_DLL = "crdb_jdbc.dll";
            String JNDI_DATASOURCE_NAME = jndiName;
            String CONNECTION_URL = connectionURL;
            String DATABASE_CLASS_NAME = driverName;
            // The next few parameters are optional parameters which you may want to
            // uncomment
            // You may wish to adjust the arguments of the method to pass these
            // values in if necessary
            // String TABLE_NAME_QUALIFIER = "new_table_name";
            // String SERVER_NAME = "new_server_name";
            // String CONNECTION_STRING = "new_connection_string";
            // String DATABASE_NAME = "new_database_name";
            // String URI = "new_URI";
            // Declare variables to hold database User Name and Password values
            String DB_USER_NAME = username;
            String DB_PASSWORD = password;
            System.out.println("DB_USER_NAME......."+DB_USER_NAME);
            System.out.println("DB_PASSWORD......."+DB_USER_NAME);
            // Obtain collection of tables from this database controller
            if (reportName == null || reportName.equals("")) {
                Tables tables = clientDoc.getDatabaseController().getDatabase().getTables();
                System.out.println("Tables in reports........"+tables.size());
                for(int i = 0;i < tables.size();i++){
                    origTable = tables.getTable(i);
                    System.out.println("origTable........"+origTable.getQualifiedName());
                    if (tableName == null || origTable.getName().equals(tableName)) {
                        newTable = (ITable)origTable.clone(true);
                        // We set the Fully qualified name to the Table Alias to keep the
                        // method generic
                        // This workflow may not work in all scenarios and should likely be
                        // customized to work
                        // in the developer's specific situation. The end result of this
                        // statement will be to strip
                        // the existing table of it's db specific identifiers. For example
                        // Xtreme.dbo.Customer becomes just Customer
                        newTable.setQualifiedName(origTable.getQualifiedName());
                        System.out.println("newTable........"+newTable.getQualifiedName());
                        // Change properties that are different from the original datasource
                        // For example, if the table name has changed you will be required
                        // to change it during this routine
                        // table.setQualifiedName(TABLE_NAME_QUALIFIER);
                        // Change connection information properties
                        connectionInfo = newTable.getConnectionInfo();
                        // Set new table connection property attributes
                        propertyBag = new PropertyBag();
                        // Overwrite any existing properties with updated values
                        //propertyBag.put("Trusted_Connection", TRUSTED_CONNECTION);
                        //propertyBag.put("Server Type", SERVER_TYPE);
                        propertyBag.put("Use JDBC", USE_JDBC);
                        propertyBag.put("Database DLL",DATABASE_DLL );
                        propertyBag.put("JNDI Datasource Name",JNDI_DATASOURCE_NAME );
                        propertyBag.put("Connection URL", CONNECTION_URL);
                        propertyBag.put("Database Class Name", DATABASE_CLASS_NAME);
                        //propertyBag.put("Server Name", SERVER_NAME); //Optional property
                        // propertyBag.put("Connection String", CONNECTION_STRING); //Optional property
                        // propertyBag.put("URI", URI); //Optional property
                        connectionInfo.setAttributes(propertyBag);
                        // Set database username and password
                        // NOTE: Even if the username and password properties do not change
                        // when switching databases, the
                        // database password is *not* saved in the report and must be set at
                        // runtime if the database is secured.
                        connectionInfo.setKind(ConnectionInfoKind.SQL);
                        connectionInfo.setUserName(DB_USER_NAME);
                        connectionInfo.setPassword(DB_PASSWORD);
                        // Update the table information
                        clientDoc.getDatabaseController().setTableLocation(origTable,newTable);
    Also i tried with replaceConnection() method...........it displayed the report, but with not column names and data
    need help regarding.......
    Edited by: abhishek.c1984 on Jun 25, 2009 10:02 AM

    In the report i have two tables.............so before changing the database properties for each table iam printing their names.
    The names are dispalyed correctly.......but once i set the table location...i.e through the following method..
    clientDoc.getDatabaseController().setTableLocation(tables.getTable(i),newTable);
    every time i can see only one table i.e. properties are set for the first table ........and each time the properties are being set for the first table only.....i dont no what is happening to the rest of the tables..
    I have posted the method in the above post.....can any one please trace out the problem
    Note: when i comment the following code, i can see all the tables
    clientDoc.getDatabaseController().setTableLocation(tables.getTable(i),newTable);
    when i uncomment it, i can see only first table repeating every time...
    Edited by: abhishek.c1984 on Jun 25, 2009 1:03 PM

  • All the attachments both in SRM and R/3 must be saved in IXOS database

    Dear all,
    I am having the following requirements:
    We are creating Shopping Cart in SRM with attachments and these attachments are saving in the IXOS database. All these (same attachments) are relpicating to R/3 whenever system generates PR or PO automatically. These attachments are copying to R/3 with URL, which is picking from IXOS, i.e. physically attachments are not saving R/3 DMS server, but saving in IXOS DB only. It is to avoid duplicate saving in both Data bases.
    If user making any changes in the attachments or adding attachments in R/3, these new ones are at present saving in R/3 (DMS) data base, but not in the IXOS data base. Now our client requirement is that all the attachments, whether attached in SRM or R/3, all the attachments must be saved in IXOS database.
    To meet this requirement, what are the settings we have to do? Please reply if anybody is having idea on this.
    Thanks & Regards,
    Veerappa
    Edited by: Chinna Veerappa on Sep 2, 2011 8:02 AM

    This is not MM specific, you should contact the admin for DMS.
    make your customizing in SPRO >  Cross-Application Components > Document Management  .......
    define your content repository (IXOS) in OAC0 and link the object types to the repository in OAC3
    In the content repository you define to where (IXOS) you store the documents

  • How is the 'import-packages' information saved in the database, and how long?

    Hello,
    I am  developping a ECM Connector for Adobe LiveCycle ES, which is a customized component.
    1 - Who should I contact to have some specific support  ?
    There is no detailed information yet on this on the adobe site  (http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/js/html/w whelp.htm?href=000931.html&accessible=true) .
    If you  think that I should address my problem to another department of Adobe, please  tell me which department?
    I give you another description of my problem. In fact, I have  been investigating on it.
    2 - If I  put this in my component.xml file, in step  1:
    <component-id>com.rsd.adobe.livecycle.RSDFoldersConnector</component-id>
    <version>1.0</version>
    <import-packages><package  version="1.0">com.rsd.simpleApiFolders</package>  </import-packages>
    If I change the  version to 1.1 and remove the  'import-packages' (in step 2) , will the new component need the  com.rsd.simpleApiFolders package. It seems that is still needs it.
    3 - How is the  'import-packages' information saved in the  database, and how  long?
    In  fact, on thursday, I used 'import-packages'  to make a test. And since them, I  can not deploy any of my components.
    LiveCycle throws a  ClassNotFoundException.
    ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException:  Internal error.
    [java] at  com.adobe.idp.dsc.registry.component.impl.ComponentRegistryImpl$6.doInTransaction(Compone ntRegistryImpl.java:338)
    ... Caused  by: java.lang.ClassNotFoundException: http-0.0.0.0-8080-1Class name  com.rsd.simpleApiFolders.Context from package com.rsd.simpleApiFolders not found.
    [java] at  com.adobe.idp.dsc.DSContainerSearchPolicy.searchClassUsingParentFirst(DSContainerSearchPo licy.java:234)
    Thank you in advance
    Regards.

    1 - Who should I contact to have some specific support  ?
    That would depend on your Adobe support contract and if your organization has a TAM assigned.  You should check with your organization's Adobe contact and see what support options your organization has purchased.
    Having said that, this forum has a few people that may be able to help (but the forum does not have a SLA associated with it)
    2 - If I  put this in my component.xml file, in step  1:
    <component-id>com.rsd.adobe.livecycle.RSDFoldersConnector</component-id>
    <version>1.0</version>
    <import-packages><package  version="1.0">com.rsd.simpleApiFolders</package>  </import-packages>
    If I change the  version to 1.1 and remove the  'import-packages' (in step 2) , will the new component need the  com.rsd.simpleApiFolders package. It seems that is still needs it.If your component class needs the simpleApiFolders class then yes, you still need it.  Think of import-packages like a class-path statement (but with packages and not jars).  Its not physically moving the package into your application, but allowing you to access it from another container.
    3 - How is the  'import-packages' information saved in the  database, and how  long?
    As far as I know they are not imported into the database. As I stated above, I believe that the import-packages just allows you to point to classes that are in the app server's classpath, but are not physically in you component jar file.  As long as that class is in the app server class-path (or in the Adobe EAR file) then you should be able to access it.  Is the jar file containing the simpleApiFolders class in the app server's lib directory?

  • Day Light Saving Changes for Europe

    Hi,
      We are using SQL Azure databases in North Europe location. 
    When trying to use GETDATE() function, it is not considering the day light saving changes and brings back the time less by an hour.
    Is that something that we need to or can do on the server or database
    Having issues in saved records even for auditing purposes.
    Any help will be highly appreciated
    Many thanks
    Deepu

    When trying to use GETDATE() function, it is not considering the day light saving changes
    Hello Deepu,
    All SQL Azure server in all Azure locations (America, Europe, Asia, etc) returns for GETDATE always the same value: The current UTC date time. No time zone offset, no daylight saving, always UTC only. You can simply check it with this query:
    select GETDATE(), GETUTCDATE()
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Change the Database Name in Essbase Studio

    Hi All,
    Happy new year to all of you.
    Is there a way to change the database name in Essbase Studio, what I can see now once we have registered a database in Database Sources panel, we can't change the Database Name because it is always grayed out but the server name, user name and password can be changed.
    Actually I have mentioned this issue to our team before starting development and they proposed me the schema that I can use, but suddenly our client did not agree with it that we have been using, and then our client asked us to use another schema, FYI we are using Oracle Database as the data source.
    Can you guys here share how to manage this situation.
    Thanks,
    Rudy

    For Essbase Studio, the configuration metadata are saved as CP_tablenames, look for the CP tables, and make proper database change for the database name.
    1. Make a Oracle backup for the CP tables before you change the metadata so that you can get back in case if error
    2. Change the CP_CONNECTION TABLE, NAME column
    3. Change the CP_SOURCE table, column DNAME, for example, it is called TBC.Sales, change to NewDB.Sales
    I am not sure if there are other table also need to be updated, anyway, when you update the DBname in the metadata level, everything should be consistent in all of the related tables. Here, I assume the new db has the same table names as the old db, if the new db has very different table names, recreating everything may be easier and has less risk.
    http://hyperionexpert.blogspot.com/
    Bob

  • Where are my saved changes....please

    I know to all of you this will sound like the stupidest question ever asked... but I've always used Picnik to edit my photos...and after this last holiday thought I'd try and get my head around using iPhoto...Straight away I've hit a number of problems..but whats giving me the biggest headache..
    After clicking on the thumbnail to bring up the picture, do my cropping, editing etc, once happy, press DONE, some times nothing happens and the picture just returns un-edited to thumbnail size.... or more annoyingly drop down and bar tells me its saving changes.... but nothing happens... where the **** do I find this illustrious changed to my liking photo... I've looked everywhere...
    Would be so grateful to be pointed in the right direction..
    A complete fool on a PC... Tony

    Tony
    You should see the change you've made in the iPhoto Window. If you don't then your database may be damaged.
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    Regards
    TD

  • Close Excel com object without saving changes?

    Hi, I am trying to write a script which opens each of 31 excel workbooks, retrieves a value from a cell, and closes each workbook after retrieving.
    My code so far:
    $day=1
    $excel = New-Object -ComObject Excel.Application
    $excel.Visible=$True
    $workbook= $excel.Workbooks.Open("C:\Path|to\File\1_"+$day+"_14.xlsx")
    $workbook.sheets.item(1).activate()
    $WorkbookTotal=$workbook.Worksheets.item(1)
    $value = $WorkbookTotal.Cells.Item(7,13)
    $value.Text #this should give you back the Value in that Cell
    $excel.close()
    My problem is that when the code hits the $excel.close() method, the file stays open, and prompts for saving changes.  I don't know why it thinks there are changes, but what I want is to close the workbook without saving changes.
    I've just closed 44 open browser tabs, and have tried many things over the last hour, but can't seem to get this one.
    If anyone has any advice on how to do this, it would be greatly appreciated!
    Thanks,
    Kevin

    Hi,
    Please replace below code:
    $excel.close()
    with
    $workbook.close($false)
    $excel.quit()
    Hope this helps.
    Regards,
    Yan Li
    Regards, Yan Li

  • Error saving job  to database for standard jobs scheduling

    Hi,
        In IDES server when iam goto Tr.code -- SM36 -- Standard Jobs -- Default Scheduling iam getting below error.
    Error saving job  to database
    Message no. BT117
    Diagnosis
    The SAP system was unable to save the current job in the database. This failure suggests that there is a problem with the database system or with the network connections between the SAP application servers and the database system.
    System Response
    Job not saved and not scheduled.
    Procedure
    To analyze this problem, start by checking the system log for messages about network or database problems.  You can also use the computing center management system to check your system for problems.
    Guide me for the same.
    Thanku

    HI,
    Sometimes this error will come.
    Try to schedule jobs manually using SM36 instead of using standard job button.
    Also you can check this thread
    Re: Error saving job SAP_REORG_JOBS to database
    Which seems to report same problem.
    Its nothing to take with database conenctivity as SAP is up and running .
    Try this and revert.
    Regards,

  • How to change the database in a business area

    Hello All,
    I am trying to figure out a way to change the database that a business area connects to. When I created the business area I selected to look at tables from the default database. Now I need to change that setting to connect to a different database. The tables are exactly the same on both databases. I just need to change the database that the business area looks at.
    Is there a simple way of accomplishing this? I want to avoid having to recreate the business area.
    Thank you very much in advanced for your help with this matter.
    Del Benavides.

    Hi,
    Select all your folders in Disco Administrator,ALT+ENTER to go to properties, then change the database from the default database to the remote database.
    Hope that helps,
    Rod West

  • Saving Arrays to database???

    Hi! I'am new on Jsp and I want to save values that the user add into a combobox. I Have a Save_action.jsp that executes when the user click on the submit button. So I want the array values to be saved into the database + be updated. Here is the problem area in Sava_action.jsp
    <%
         String update="";
         Long aCustomerId = aCustomerSession.getCustomer().getCustomerId();
         String[] aIPAddressAllow = request.getParameterValues("IPAddressAllow");
         String[] aEmailAllow = request.getParameterValues("emailAllow");
         String atruncuationMode = request.getParameter("truncuationMode");
         String aoriginatorTemplate = request.getParameter("originatorTemplate");
         String amessageTemplate = request.getParameter("messageTemplate");
         String areceiptActive = request.getParameter("receiptActive");
         String arecipientInMailSubject = request.getParameter("recipientInMailSubject");
         ResultSet aResultSet;
         ICDatabase aDatabase = new ICDatabase();
         //Here is my problem??? What shell I write??
         for (int i = 0; i < aIPAddressAllow.length; i++) {
              if (aIPAddressAllow != null)
    for (int l = 0; l < aEmailAllow.length; l++) {
              if (aEmailAllow != null)
         update = "UPDATE tM2SMSSettings Set IPAddressAllow='" + aIPAddressAllow[0] +"', emailAllow='" + aEmailAllow[0] +"', truncuationMode='" + atruncuationMode +"', originatorTemplate='" + aoriginatorTemplate +"' ,messageTemplate='" + amessageTemplate +"' , receiptActive=" + areceiptActive +", recipientInMailSubject=" + arecipientInMailSubject +" WHERE customerId=" + aCustomerSession.getCustomer().getCustomerId();
         aResultSet = aDatabase.sql(update);
    response.sendRedirect(response.encodeRedirectURL("customerm2sms.jsp"));
    %>

    this is a way but if i see it correctly for each ip adress you'll be adding the emailadresses...
    if that is what you need, then just put the for integer in th array (i for ip and l for email).
    greetings

  • How to reflect db changes - Verify Database doesn't seem to work

    I have changed a database (MS SQL Server) column from varchar 255 to varchar 1000, but the designer doesn't pick up the change.
    I read that db changes can be picked up by using 'Verify Database' feature. It doesn't seem to work for us though. Is there any configuration to turn on for the feature to work properly or any work-around to refresh the database changes?
    We are making the database connection using JDBC (JNDI) option since the report is being used in a Java web application.
    Any comments or insights will be very much appreciated!

    Hi Wallie,
    Thank you very much for your reply! Here are the answers to your questions.
    Are you able to create a new report off the modified database?
    ==> Yes.
    Do new reports see the changes made to the database?
    ==> No.
    Are the reports connecting directly to the database table, or is it a stored procedure, business view, universe being used?
    ==> Through a business view.
    By the way, after trying so many things, I was able to figure out the reason. Since the report is using a view, not directly the table, the view itself had to be recompiled to reflect the table changes so that the view could pass the changes to the report. It was a very good thing to know. Your last question could have been a very helpful insight for this issue! Thank you so much again!

  • Resultset in the same order as saved in the database

    Hi Folks!
    I'm having some trouble with an old development, because for some really strange reason, the same select statement i'm getting the same records but in different order from time to time randomly.
    For example in day 1 i can get:
    1 Text1
    2 Text2
    3 Text3
    And in day 2 i can get:
    1 Text2
    2 Text3
    3 Text1
    Is there a way to force the select statement so it always get it in the order as saved in the database?
    Hope someone can help me with this pretty strange issue.
    Thanks.
    Regards,
    Gilberto Li

    Hi Neil,
    Your answer makes a lot of sense to me. And I agree that it might won't guarantee that bypassing the buffer will work 100%. However i'm still going to make a try see if it works, and how good it works.
    What i'm thinking is that I will need to redesign this old development and insert a new field to a table to add a position so I can order after the select statement.
    But if someone still have any other solution i will appreciate your help.
    Thanks again.
    Regards,
    Gilberto Li

Maybe you are looking for

  • Selected day background color

    I have long wished that the background color of the selected day were more visible. I stumbled across this workaround that might be useful, at least on my iMac. In System preferences, Universal access set the contrast slider is all the way to the lef

  • Troubleshooting PO Approval Workflow notification

    Hi All Some of the iSuppliers are not receiving the PO Approval notifications from the Workflow process. Any ideas/suggestions to debug this issue will be highly appreciated.

  • How to find ACCESSNebraska in this system?

    Been referred to Firefox for "ACCESSNebraska," but it is not available. Why?

  • Account passwords being stamped in plain text during Branding??

    Wanted to bring something to the attention of everyone who may be using the "branding" scripts in MDT 2012 (Latest version) during OS Deployment.  It appears that these scripts take the username and password of the account used to join the domain and

  • IOS4 does not show large contact image.

    Using Exchange contacts (Gmail), adding contact images through iPhone, large contact image appeared when recieving and making calls with iOS 3.xx. After upgrading to iOS4 only small image appear even after adding images againg though the iPhone. Is t