Author Topic: Tdbgrid update SQL with Mysql5  (Read 3576 times)


  • New Member
  • *
  • Posts: 13
Tdbgrid update SQL with Mysql5
« on: February 08, 2008, 11:45:08 pm »
Bonjour à tous;
Hello everybody;

I'm looking for a way to update my SQL table (Mysql5.0) within a TDBgrid.

The TDBgrid works fine with these parameters only

Code: [Select]
SQLQuery1.ParseSQL:=false; SQLQuery1.ReadOnly:=true;
SQLQuery1.SQL.Text := 'select * from FPdev'+#0;

Thus, during an update, I get an error message like: Impossible, Read only.

If I try with:
Code: [Select]
SQLQuery1.ParseSQL:=true; SQLQuery1.ReadOnly:=false;

"Project raised exception class 'EDatabaseError' with message: Transaction of connection not set"

Thanks for your help

Lazarus 0.9.24
Linux Ubuntu
phpMyAdmin 2.8.1

Code: [Select]
   Datasource1: TDatasource;
    DBGrid1: TDBGrid;
    MySQL50Connection1: TMySQL50Connection;
    SQLQuery1: TSQLQuery;
    SQLTransaction1: TSQLTransaction;


  • New Member
  • *
  • Posts: 13
RE: Tdbgrid update SQL with Mysql5
« Reply #1 on: February 09, 2008, 11:01:12 am »
Bravo !!!!!

Thanks a lot

Quote from: "jzombi"

I've modified your program, so you can now change the data, and you can add new fields to a table too.
You can download it from here:
I hope, you'll find it useful.

ps. sorry, my english is very bad after midnight:)


TinyPortal © 2005-2018