I have a field with value -7590730850027557904 in SQL Server 2005 and I am retrieving it through ADO in Delphi 5 but what I retrieved was 7590730850027557904 - the negative sign was omitted. What is the correct way of retrieving longint values from SQL Server to Delphi 5?
Here is my code
with DataSet do
begin
Connection := Conn;
CommandText := 'SELECT * FROM CUSTOMERSLIST';
Open;
end;
ShowMessage(DataSet.FieldByName('SID').AsString);
Thanks to my colleague. The solution is to covert bigint to string as you query from the database.