Problem in Saving MySQL table records using POST

Posted on 2006-05-27
Last Modified: 2010-04-05
I tried the ff codes
It failed in myTtable.Flushbuffers, is this not supported with mySQL?

Is there any other way Saving/POSTing records permanently in the Table?
Question by:ryan_sabarre

    Author Comment

    Thanks in advance.
    LVL 1

    Expert Comment

    How are you connecting to your MySQL table ? For example as you using an ODBC connection or a component ? I am using MyDAC with Delphi 2006 and whilst I have never tried to use the Flushbuffers procedure I have never had any problems with posting records to a MySQL table.
    LVL 1

    Expert Comment

    I am using zeos components and I do not use FlushBuffer also, but some times I use refresh after post

    Author Comment

    I am using mySQL engine "innoDB".

    Author Comment

    By the way, how will i know if my connection from the mySQL server was lost?
    LVL 27

    Accepted Solution

    >It failed in myTtable.Flushbuffers, is this not supported with mySQL?

    >Is there any other way Saving/POSTing records permanently in the Table?

    Flushbuffers is meant for desktop-databases, specially paradox and dbase,
    mySQL is a serverbased SQL-Database and cannot handled like a desktop-database

    to keep your inserts permanent into the table the easiest would be to set the autocommit-feature set to on
    -------------------------------------------------- InnoDB and AUTOCOMMIT
    In InnoDB, all user activity occurs inside a transaction. If the autocommit mode is enabled, each SQL statement forms a single transaction on its own. By default, MySQL starts new connections with autocommit enabled.

    If the autocommit mode is switched off with SET AUTOCOMMIT = 0, then we can consider that a user always has a transaction open. A SQL COMMIT or ROLLBACK statement ends the current transaction and a new one starts. A COMMIT means that the changes made in the current transaction are made permanent and become visible to other users. A ROLLBACK statement, on the other hand, cancels all modifications made by the current transaction. Both statements release all InnoDB locks that were set during the current transaction.

    If the connection has autocommit enabled, the user can still perform a multiple-statement transaction by starting it with an explicit START TRANSACTION or BEGIN statement and ending it with COMMIT or ROLLBACK.


    additional i would advice you to learn SQL, so that you will become experience with using of queries
    (which is rather recommended to use instead of TTable by SQL-Databases)

    meikl ;-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now