* * *

Author Topic: bigint trouble  (Read 855 times)

jagnje

  • New member
  • *
  • Posts: 23
bigint trouble
« on: March 12, 2016, 03:33:06 pm »
not a strictly lazarus question but still... i wasnt able to create a table (trying both firebird 2.5 and 3.0rc2 and lazarus 1.6) where some fields were of bigint type. error message was very strange, like that data type is not supported... the strange thing was that before that i was able to use bigints without any hassle.

since i was in a hurry, i just changed the fields into char(10) and then had no problems whatsoever. still, i would like to know what i was doing wrong.

thanks

GetMem

  • Hero Member
  • *****
  • Posts: 1991
Re: bigint trouble
« Reply #1 on: March 12, 2016, 05:17:39 pm »
This works fine with Firebird 2.5/Lazarus Trunk/FPC 3.0.0. The table is created without any errors.

1. Drop a TSQLScript to your form, edit the script property:
Code: Pascal  [Select]
  1. CREATE TABLE TEST (
  2.     ID           INTEGER NOT NULL,
  3.     NAME         VARCHAR(10),
  4.     BIGINT_TEST  BIGINT
  5. );
  6.  
  7. ALTER TABLE TEST ADD CONSTRAINT PK_TEST PRIMARY KEY (ID);            
  8.  

2.
Code: Pascal  [Select]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. begin
  3.   SQLScript1.Execute;
  4.   SQLTransaction1.CommitRetaining;
  5. end;  


 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus