I'm having an issue when opening a TMYquery having this SQL Statement :
I'm storing some preferences into a mediumTExt field (Proprietes field).
It contains datas structured like this :
DernierCodeTournee=0000
Code: Select all
//Query is automatically created then freed
MyTmpQuery:=TMyQuery.create(nil);
MyTmpQuery.Connection:= fmdatamodule.MyConnection;
try
fmdatamodule.MyConnection.StartTransaction;
try
MyTmpQuery.close;
MyTmpQuery.text:=
'Select Proprietes From Preferences where Section = "SIA_Parametres" FOR UPDATE'
MyTmpQuery.open;
AValue.Text := MyTmpQuery.fieldbyname('Proprietes').AsString;
AValue.ValueFromIndex[Prorietes.IndexOfName('DernierCodeTournee')]:= '0001';
MyTmpQuery.edit;
MyTmpQuery.fieldbyname('Proprietes').AsString := Trim(AValue.text) ;
MyTmpQuery.post;
UPDATE Preferences
SET
Proprietes = :1
WHERE
Code: Select all
UPDATE Preferences
SET
Proprietes = 'DernierCodeTournee=0001'
WHERE Section = 'SIA_Parametres'
Code: Select all
CREATE TABLE `preferences` (
`Section` VARCHAR(25) COLLATE latin1_swedish_ci NOT NULL,
`Proprietes` MEDIUMTEXT,
`Descriptif` MEDIUMTEXT,
PRIMARY KEY (`Section`))TYPE=InnoDB;
COMMIT;
INSERT INTO `preferences` (`Section`, `Proprietes`, `Descriptif`) VALUES
('SIA_Parametres','DernierCodeTournee=0000',NULL);
INSERT INTO `preferences` (`Section`, `Proprietes`, `Descriptif`) VALUES
('VERSION_Parametres','Version=0.3.0.0\r\nMiseAJour=SIAFCI_0.3.0.0.exe\r\nDate=23/01/2004',NULL);
COMMIT;
MySQL client version: Direct
Borland BDS 2006 Update 1
MyDAC 4.30.0.10
Any idea ?