After call commit sql , data can not flush to disk

I use berkey db which support sql . It's version is db-5.1.19.
1, Open a database.
2. Create a table.
3. exec "begin;" sql
4. exec sql which is insert record into table
5. exec "commit;" sql
6. copy database file (SourceDB_912_1.db and SourceDB_912_1.db-journal) to Local Disk of D, then use a tool of dbsql to open the database.
7. use select sql to check data, there is no record in table.
1
sqlite3 * m_pDB;
int nRet = sqlite3_open_v2(strDBName.c_str(), & m_pDB,SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,NULL);
2
string strSQL="CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );";
char * errors;
nRet = sqlite3_exec(m_pDB, strSQL.c_str(), NULL, NULL, &errors);
3
nRet = sqlite3_exec(m_pDB, "begin;", NULL, NULL, &errors);
4
nRet = sqlite3_exec(m_pDB, "INSERT INTO TBLClientAccount (ClientId,AccountId) VALUES('dd','ddd'); ", NULL, NULL, &errors);
5
nRet = sqlite3_exec(m_pDB, "commit;", NULL, NULL, &errors);
Edited by: 887973 on Sep 27, 2011 11:15 PM

Hi,
Here is a simple test case program I used based on your description:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sqlite3.h"
int error_handler(sqlite3*);
int main()
     sqlite3 *m_pDB;
     const char *strDBName = "C:/SRs/OTN Core 2290838 - after call commit sql , data can not flush to disk/SourceDB_912_1.db";
     char * errors;
     sqlite3_open_v2(strDBName, &m_pDB, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
     error_handler(m_pDB);
     sqlite3_exec(m_pDB, "CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );", NULL, NULL, &errors);
     error_handler(m_pDB);
     sqlite3_exec(m_pDB, "begin;", NULL, NULL, &errors);
     error_handler(m_pDB);
     sqlite3_exec(m_pDB, "INSERT INTO TBLClientAccount (ClientId,AccountId) VALUES('dd','ddd'); ", NULL, NULL, &errors);
     error_handler(m_pDB);
     sqlite3_exec(m_pDB, "commit;", NULL, NULL, &errors);
     error_handler(m_pDB);
     //sqlite3_close(m_pDB);
     //error_handler(m_pDB);
int error_handler(sqlite3 *db)
     int err_code = sqlite3_errcode(db);
     switch(err_code) {
     case SQLITE_OK:
     case SQLITE_DONE:
     case SQLITE_ROW:
          break;
     default:
          fprintf(stderr, "ERROR: %s. ERRCODE: %d.\n", sqlite3_errmsg(db), err_code);
          exit(err_code);
     return err_code;
}Than I copied the SourceDB_912_1.db database and the SourceDB_912_1.db-journal directory containing the environment files (region files, log files) to D:\, opened the database using the "dbsql" command line tool, and queried the table; the data is there:
D:\bdbsql-dir>ls -al
-rw-rw-rw-   1 acostach 0 32768 2011-10-12 12:51 SourceDB_912_1.db
drw-rw-rw-   2 acostach 0     0 2011-10-12 12:51 SourceDB_912_1.db-journal
D:\bdbsql-dir>C:\BerkeleyDB\db-5.1.19\build_windows\Win32\Debug\dbsql SourceDB_912_1.db
Berkeley DB 11g Release 2, library version 11.2.5.1.19: (August 27, 2010)
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
dbsql> .tables
TBLClientAccount
dbsql> .schema TBLClientAccount
CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );
dbsql> select * from TBLClientAccount;
dd|dddI do not see where the issue is. The data can be successfully retrieved, it is present in the database.
Could you try putting in the sqlite3_close() call and see if you still get the error?
Did you remove the __db.* files from the SourceDB_912_1.db-journal directory?
Did you use PRAGMA synchronous, and if so, what is the value you set?
If this is still an issue for you, please describe in more detail the exact steps needed to get this reproduced and provide a simple stand-alone test case program that reproduces it.
Regards,
Andrei

Similar Messages

  • Material availability date can not be after the delivery date

    Dear Experts,
    we are using the following scnario,
    1. Once the user creates the sales order, automatically system creates PO in the background.
    we have created Bapi program for creation of Background PO in SD User Exit.
    The following issue occurs in Prd, DS1, QS1 server, We have done Technical upgradation project, Now when we creates sales order automatically po created with error message of Material availablity date can not be after the delivery date. even sales order no also not updated in the PO.
    QAS server (without technical upgrade) i refered the same input parameter and used the same and create the sales order system generates PO automatically without error message.
    Does any one can through lights on this issue,
    Thanks and Best Regards,
    Muralidharan S

    Hi
    The dates are determined due to shipping and transportation scheduling settings. So check whether the shipping and transportation scheduling is being performed as per the cofiguration settings after Technical upgrade. Since the MAD date should not be after Delivery date but it seems that the dates are not determined properly.
    Also check the Transit  time, Loading time, Pick/Pack time and Lead time are retained as same as before the technical upgrade. Use the QAS server settings to validate the settings in other servers.
    Regards
    Rajkumar K

  • Data can not be transfered in "" Problem : WebService in Interactive FOrm

    Hi everyone,
    According to a tutorial I built a simple PDF Form with WebService as Data Connection (One textfield as input and one button to call the webservice). The WebService is tested in WSNavigator successfully.
    The button is defined as an execution button on server side and with operation from the WS.
    However as I clicked on the button in PDF, I got warning: Data can not be transfered in ""
    I'm not very sure what it means. From the XMLSource i didn't recongnize any error. So just want to ask, if someone has idea. Many thanks in advance.
    Br,
    Bill

    Thank you for your message. It has been forwarded to another of my mail-accounts. Therefore it might take some time to respond.
    To avoid any delays in future, please request in another mail to this address my new mail id. It is not given here as this automatic message will be sent to spam providers, too.
    Kind regards,
    Volker
    Vielen Dank für Ihre Nachricht. Diese wurde an eine weitere meiner E-Mail-Adressen weitergeleitet. Daher kann sich meine Antwort etwas verzögern.
    Um künftige Verzögerungen zu vermeinden, erfragen Sie bitte in einer separaten Nachricht an diese Adresse meine neue E-Mail-Adresse. Diese ist nicht an dieser Stelle erwähnt, da diese automatische Nachricht auch an Spammer gesandt wird.
    Viele Grüße,
    Volker Müller

  • OpenSQLException - object of type java.sql.Date is not normalized

    Hi,
    I am attempting to code an SQL query in an EJB and get the following exception:
    com.sap.sql.log.OpenSQLException: The object of type java.sql.Date with the value '2010-06-04 13:21:09.424' assigned to host variable 1 is not normalized. It must not contain time components in the time zone running the virtual machine. at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85) at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124) at com.sap.sql.jdbc.common.CommonPreparedStatement.setDate(CommonPreparedStatement.java:650) at......
    Below is the code snippet I am using:
                        private static String selWQ  = "Select * from ZZZZ_TABLE " +
                                                                       "where DATEFROM >= ? " +
                                                                  "and DATETO <= ? ";
         public UsageRecord[] getRecords(Date fromDate,Date toDate)
              UsageRecord[] ura = null;
              String q          = null;
              ArrayList al      = new ArrayList();
              try
                   q = selWQ;
                   conn.open();
                   PreparedStatement p = conn.prepareStatement(q);               
                   p.setDate(1, fromDate);
                   p.setDate(2,toDate);                    
                   ResultSet rs = p.executeQuery();
    I have a PreparedStatement and am using setDate to set the values. The fromDate and toDate parameters are of type java.sql.Date
    Can someone please tell me what I am doing wrong and how to fix it?
    thanks
    Brian

    As requested, here is an example of what I used to resolve this:
                   PreparedStatement p = conn.prepareStatement(q);
                   SimpleDateFormat ddf = new SimpleDateFormat("yyyy-MM-dd");
                                               String sFrom = ddf.format(new java.util.Date(fromDate));
                   String sTo   = ddf.format(new java.util.Date(toDate));
                   p.setDate(1, java.sql.Date.valueOf(sFrom));
                   p.setDate(2, java.sql.Date.valueOf(sTo));
                   ResultSet rs = p.executeQuery();
    fromDate and toDate are parameters of type long...
    regards
    Brian

  • When I upgraded iOS 7.1 software when a call comes in I can not click the "listen" when the screen is in lock mode

    when I upgraded iOS 7.1 software when a call comes in I can not click the "listen" when the screen is in lock mode

    User troubleshooting steps as outlined in the manual include restart, reset, restore, restore as new. Have you tried any of these? Restart involves powering off your phone and powering back on. Reset involves the following procedure:
    Close all open apps by double-tapping the home button, then swiping up and off the screen with the app window (not the smaller icon).
    Reset your device: hold down the home button along with the sleep/wake button until the screen goes black and you see the Apple, then let go. (No data loss)

  • After rescue and recovery, I can not find the documents

    After rescue and recovery, I can not find the documents created after the restore point date.
    Moderator note: subject line adjusted for clarity.

    Hi,
    not sure, what exactly the description should tell me, but I guess, that your scenario is like this:
    - you captured some RnR backup
    - made some changes to the system
    - restored the backup
    and now the changes, that you have mde afte the backup was captured are gone.
    If this is your case, then this is a correct situation.
    The backup will restore the whole system back to the stage, as you selected, while it will remove/modify the packages, that have been changed/created  after the time, when the backup was captured.
    In the stage, where you have restored the system, you had the chance to save some files, but as it looks, this did not happened.
    Please correct me if I understod it wrongly.
    Cheers

  • User start date can not be before the current date

    I'm creating users using the Reconciliation engine. The start date attribute doesn't appear to be reconciling. I get many different types of parse errors. The closest I appear to get is when I set the Xellerate User resource object recon field to have Start date as a date field, i receive the error:
    "User start date can not be before the current date.".
    I'm using 9.0.1.1. And I AM trying to create a user that has a start date before todays date.

    Resolution was to patch to 9.0.1.1578

  • After upgrade itune 10.5 can not report problem in app purchase in app purchase

    after upgrade itune 10.5 can not report problem in app purchase in app purchase

    I as well have this issue, on some past purchases it does allow me but others it links to apple support??***

  • I have a ipod that had photos synchronised to an old computer that has sinced crashed and the data can not be recovered. How do I recover the photos stored on the IPOD to my new computer?

    I have a ipod that had photos synchronised to an old computer that has sinced crashed and the data can not be recovered. How do I recover the photos stored on the IPOD to my new computer?

    You'll likely need the assistance of some sort of 3rd party software.  Keep in mind that the photos on your iPod are only scaled down thumbnail versions of the originals.  So even if you do manage to copy them backt to your PC, they will not be in their full original resolution.
    Do a simple Google search for "copy photos from ipod" and you should get a number of hits that can assist you.
    B-rock

  • After the ios7 updated I can not open the iTunes store in my iPhone 5

    After the ios7 updated I can not open the iTunes store in my iPhone 5
    How can I fix it?

    Hi adrimomo,
    Welcome to the Support Communities!
    Here are a few things you can try:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    If you have tried those two things, refer to page 146 in the iPhone User Guide to Reset All Settings:
    iPhone User Guide for iOS 7
    manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf
    Also, check your settings for Safari -- enable cookies and turn off private browsing - see page 57 of the iPhone User Guide above.
    Cheers,
    - Judy

  • After iPhone connects to iTunes, can not find the photos tab for sync

    After iPhone connects to iTunes, can not find the photos tab for sync. Thus, I can not copy some phototes from my Macbook to iPhone, But my iTouch can do this. I don't know why.

    If you are using a mac, you use iphoto.
    If you are on windows, you use whatever camera software windows uses.
    Itunes does not import photos.

  • I am trying adobe Photoshop and adobe illustrator because I can't decide which one to buy so I want to try both, after I downloaded Photoshop I can not see the option "free trial" for adobe Illustrator, it is because I can only free try one at the time??

    I am trying adobe Photoshop and adobe illustrator because I can't decide which one to buy so I want to try both, after I downloaded Photoshop I can not see the option "free trial" for adobe Illustrator, it is because I can only free try one at the time??

    Bryan,
    You can download both at the same time.
    But you may wish to start off with one and use it full time, then download the other later, so you get the maximum possible time with both.
    If you have trouble getting the free trial on the Adobe site, you may try here or here:
    http://prodesigntools.com/tag/ddl
    http://technolux.blogspot.co.nz/2011/02/adobe-direct-download-links-less-akamai.html#more

  • After upgrading the itunes, I can not find my ipad when it connects to the PC

    After upgrading the itunes, I can not find my ipad when it connects to the PC
    Before that, I can see an botton said my ipad. And then I can click it to operate my ipad

    Try this
    Go into the control panel. Add/remove programs. Uninstall iTunes, Apple mobile device service, apple application support. Then go out and redownload and reinstall iTunes and try again.
    There seems to be a glitch with a recent update and one way to overcome it is to just start over. If that doesn't work there are more in depth things you can do.

  • When I went to open creative cloud, it said it needed an update, but after I updated it now can not get it to open up

    When I went to open creative cloud, it said it needed an update, but after I updated it now can not get it to open up

    what do you see when you try to open it?

  • After upgrading to iOS5 I can not auto download anything. The buttons will not switch to ON. Any thoughts?

    After upgrading to iOS5 I can not set the store to auto download anything. The buttons will not stay in the ON position. Any thoughts?

    I experienced this one time and this is what I did and it worked for me. You can try it as well and see of it works for you.
    Settings>Store>Apple ID - tap on your ID and sign out. Restart your iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>Store>Sign In. Then go to automatic downloads and try again.

Maybe you are looking for

  • Exception While Opening a Pop Up From Pivot Table

    Hi, I actually created a pivot table which has the cell data filled with images. I would like to have these images to function as 'CommangImageLink' and onclick of the image ... should open a popup to display the details about that intersection. For

  • Port to be open in Firewall

    Hi, A SQL2012 R2 Express server with reporting services (SSL enabled) is setup on a DMZ zone, the client is on a Trusted zone Port 80 + 443 should be open but 1443 is necessary or not ? Beside it will use the windows native authentication so 113 for

  • Project System CJI3 Report

    CJI3 is not reflecting all the accounts affected by settlement.  For example; if settlement posts to 3 assets in different natural accounts CJI3 will reflect the AUC Cost Elem and the Offst. acct for only the first asset created.  However, the value

  • Open XML document with proper layout

    Hi, I created my own XML form and I have problem when accessing the document within "KM Content". Indeed, when I click on the XML file generated by the XML Form it doesn't render it with the "Show" form but rather displays it as an usual XML document

  • Credential problem

    Hi, I'm new with Itunes U and am still working on getting our site set up. We were able to log in with these credentials friday, but today it loggs us in as a general user. Any ideas? credentials=Administrator@urn:mace:itunesu.com:sites:nhmccd.edu