SQLERROR -804 Data Type unknown

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Suhaimin
Posts: 79
Joined: Mon 06 May 2013 12:19

SQLERROR -804 Data Type unknown

Post by Suhaimin » Fri 06 Feb 2015 14:57

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

Suhaimin
Posts: 79
Joined: Mon 06 May 2013 12:19

Re: SQLERROR -804 Data Type unknown

Post by Suhaimin » Fri 06 Feb 2015 15:14

Hello,
Database Firebird embeded 2.5 . thanks

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SQLERROR -804 Data Type unknown

Post by ViktorV » Mon 09 Feb 2015 08:47

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');

Suhaimin
Posts: 79
Joined: Mon 06 May 2013 12:19

Re: SQLERROR -804 Data Type unknown

Post by Suhaimin » Mon 09 Feb 2015 14:36

Thanks.problem solved

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SQLERROR -804 Data Type unknown

Post by ViktorV » Tue 10 Feb 2015 12:19

Glad to see that the issue was resolved. Feel free to contact us if you have any further questions about UniDAC.

Post Reply