Page 1 of 1

SQLERROR -804 Data Type unknown

Posted: Fri 06 Feb 2015 14:57
by Suhaimin
Hello,
var
intvalue : integer;

Uniquery.close;
Uniquery.sql.clear;
Uniquery.sql.add('SELECT NOMOR, (TOTAL - :p0) as Subtot from Test')
uniquery.parambyname('p0').asinteger := intvalue;
uniquery.open;

after open Error message occurs. "SQL Error Code = -804 data type unknown". whats wrong in my code ?thanks

Re: SQLERROR -804 Data Type unknown

Posted: Fri 06 Feb 2015 15:14
by Suhaimin
Hello,
Database Firebird embeded 2.5 . thanks

Re: SQLERROR -804 Data Type unknown

Posted: Mon 09 Feb 2015 08:47
by ViktorV
To solve the problem, try in your code to change the SQL query assigning string of the TUniQuery component with the following:

Code: Select all

  Uniquery.sql.add('SELECT NOMOR, (TOTAL - CAST(:p0 as INT)) as Subtot from Test');

Re: SQLERROR -804 Data Type unknown

Posted: Mon 09 Feb 2015 14:36
by Suhaimin
Thanks.problem solved

Re: SQLERROR -804 Data Type unknown

Posted: Tue 10 Feb 2015 12:19
by ViktorV
Glad to see that the issue was resolved. Feel free to contact us if you have any further questions about UniDAC.