Hello,
I don't understand why realization of Post MySQL procedure is not valid on Integer fileds.
It is not equal to AppendRecord (correct)
See bellow examples:
------ My SQL, My Dac parameters ---------------------
MySQL server version: 5.0.51b-community-nt
MySQL client version: Direct
Data Access Components for MySQL
Standard Edition
Version 5.55.0.37 for Delhi 6
end-- My SQL, My Dac parameters ----------------------
------ Table Script -----------------------------------------
CREATE TABLE `test`.`PostTest` (
`Id` INTEGER(4) UNSIGNED NOT NULL AUTO_INCREMENT,
`Pos` INTEGER(4) UNSIGNED,
`Name` VARCHAR(45),
‘ValFloat’ Float,
PRIMARY KEY (`Id`)
)
ENGINE = InnoDB;
end-- Table Script -------------------------------------------
----- Delhi examples code-------------------------------------
ZE: TMyTable;
Example 1: Result in database table: correct - exactly the same value
procedure TForm1.Button1(Sender: TObject);
begin
ZE.AppendRecord([10,1,'Test',12.34]);
end;
Example 2: Result in database table: not correct
procedure TForm1.Button2(Sender: TObject);
ZE.Append;
Ze.Fields[0].Value:=10;
Ze.Fields[1].Value:=1;
Ze.Fields[2].Value:='Test';
Ze.Fields[3].Value:= 12.34;
ZE.Post;
end;
‘Id’ – value from Auto Increment table parametr.
‘Pos’ – null
‘Test’ – ‘Test’ – correct
‘ValFloat’ - .12.34 - correct
end-- Delhi examples code ------------------------------------------------
Post MyTable Integer problem ?
-
Challenger
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53