Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Problem in Saving MySQL table records using POST

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

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

Author Comment

by:ryan_sabarre
ID: 16775708
Thanks in advance.
0
 
LVL 1

Expert Comment

by:Graham9295
ID: 16776488
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.
0
 
LVL 1

Expert Comment

by:tammoz
ID: 16777004
I am using zeos components and I do not use FlushBuffer also, but some times I use refresh after post
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ryan_sabarre
ID: 16777630
I am using mySQL engine "innoDB".
0
 

Author Comment

by:ryan_sabarre
ID: 16778019
By the way, how will i know if my connection from the mySQL server was lost?
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 500 total points
ID: 16787725
>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
--------------------------------------------------
14.2.10.2. 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 ;-)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

810 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