Lazarus with SQL lazarus / 16-Databases ---------------------------------------------------------------------- bagofmoes · 2015-10-01 09:36 hello, We have a weird problem with MYSQL in Lazarus. At school, we have three different databases in SQL all on different IP-adresses. when a user creates a database table with lazarus and inserts some data it gets saved. when we restart the Lazarus application and request the data from the table, everything we putted in the table is visible in the application. Now we insert new data in the same table and no errors occur. when we request the data from the table from the sql server, everything goes well too! now the weird problem. if we now restart the application and request the data from the sql server, it only gives us the data we putted in the first time. if we go to phpmyadmin to view the table then the only data that is available is the data putted in the first time. however, the indexcounter increases. I hope you could help us to solve the problem! the only thing I can think of is the version numbers. I know the server is 5.6.xx we use the Tsql50connection with the 5.0 client component. however this shouldn't give any problems. what could possibly cause this error? ---------------------------------------------------------------------- Zoran · 2015-10-01 10:52 Maybe you didn't commit the transaction? Depending on transaction isolation level, non-commited data might be visible in database with other sql tools while transaction is still open. But if the transaction is not commited eventualy, the data gets lost. Make sure your transactions get commited. For example, take a look here (Insert query example): http://wiki.freepascal.org/Working_With_TSQLQuery#Insert_query_example Note the last line Code: [Select]SQLTransaction1.Commit; Or see here (How to change data in a table?): http://wiki.freepascal.org/SqlDBHowto#How_to_change_data_in_a_table.3F Note that it says: QuoteAfter applying the updates, a commit must be executed to save the changes on the database server. and then in "EditData" example program, note that there is the line Code: [Select]ATransaction.Commit; ---------------------------------------------------------------------- jma_sp · 2015-10-01 13:05 Hello, i am not an expert but...besides the advice that gives you Zoran . Why you don´t use the same client versión (MySQL56Connection) available with 1.4.2 version of Lazarus? Also, What client library version are you using? and  if it is under Linux, Windows... ??? Saludos. ---------------------------------------------------------------------- bagofmoes · 2015-10-02 06:43 wow the commit action works! I don't know why we overlooked that.. a bit awquard that a simple google search would also be enough to solve the problem. thank you for your response!