I am creating a database application with a sql server backend,but i seem to have a problem extracting an integer Field(size=8) from the database.when using the code
var
q:Tsqlquery;
TID:Integer;
begin
.......
TID:=(q.Fields[0].asinteger);
...
end;
The code works fine for Delwhen the value queried from the db is a string but when the value is an integer the field value when viewed as an integer is 0 and a null string when viewed as a variant
var
q:Tsqlquery;
TID:Integer;
begin
.......
TID:=(q.Fields[0].asinteger);
...
end;
The code works fine for Delwhen the value queried from the db is a string but when the value is an integer the field value when viewed as an integer is 0 and a null string when viewed as a variant