Quantcast

ODBC Driver 2.0.3 COUNT Return Variable Type

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ODBC Driver 2.0.3 COUNT Return Variable Type

jfinch@rushmoreinfo.com
In my tests of SQL statements using ODBC driver version 2.0.3.154 with the Firebird 3.0 Beta 1, COUNT(*) is apparently returning a character variable.  This is causing some errors in my apps that have always expected COUNT to yield an integer, which is what version 2.0.2.153 of the driver returns, at least with Firebird 2.5 data bases.  Perhaps a driver change was made for consistency with other aggregate functions like SUM(), which did return a character under 2.02?  To get the integer my apps
expect, looks like I'd need to change numerous SQL commands to something like CAST(COUNT(*) AS INTEGER) AS TABLECOUNT.  Anyone else experienced this issue?

Jonathan Finch
Principal Consultant
Rushmore Information Services, LLC

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-odbc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ODBC Driver 2.0.3 COUNT Return Variable Type

Dimitry Sibiryakov-3
03.12.2014 20:40, [hidden email] wrote:
> In my tests of SQL statements using ODBC driver version 2.0.3.154 with the Firebird 3.0 Beta 1, COUNT(*) is apparently returning a character variable.

   It should return value of SQL_BIGINT or SQL_NUMERIC types. Perhaps, your software is
not ready to work with these types and ask for conversion to text internally?..

--
   WBR, SD.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-odbc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ODBC Driver 2.0.3 COUNT Return Variable Type

jfinch@rushmoreinfo.com
Thanks for the quick reply.  If the driver is working as designed, then perhaps the issue is indeed with the client app's language.  I will test further.  In any case I know I can solve the problem by CASTING the returned variable to the type needed.

Jonathan Finch
Principal Consultant
Rushmore Information Services, LLC

> On December 3, 2014 at 3:02 PM Dimitry Sibiryakov <[hidden email]> wrote:
>
>
> 03.12.2014 20:40, [hidden email] wrote:
> > In my tests of SQL statements using ODBC driver version 2.0.3.154 with the Firebird 3.0 Beta 1, COUNT(*) is apparently returning a character variable.
>
>    It should return value of SQL_BIGINT or SQL_NUMERIC types. Perhaps, your software is
> not ready to work with these types and ask for conversion to text internally?..
>
> --
>    WBR, SD.
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Firebird-odbc-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-odbc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ODBC Driver 2.0.3 COUNT Return Variable Type

Walter R. Ojeda Valiente
In reply to this post by Dimitry Sibiryakov-3
With Visual FoxPro, a column BIGINT is returned as type character, not as type integer.

But it can be easily converted to integer, with the VAL() function.

Greetings.

Walter.


On Wed, Dec 3, 2014 at 4:02 PM, Dimitry Sibiryakov <[hidden email]> wrote:
03.12.2014 20:40, [hidden email] wrote:
> In my tests of SQL statements using ODBC driver version 2.0.3.154 with the Firebird 3.0 Beta 1, COUNT(*) is apparently returning a character variable.

   It should return value of SQL_BIGINT or SQL_NUMERIC types. Perhaps, your software is
not ready to work with these types and ask for conversion to text internally?..

--
   WBR, SD.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-odbc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-odbc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ODBC Driver 2.0.3 COUNT Return Variable Type

jfinch@rushmoreinfo.com
Yes, and that's apparently came into play as a result of Firebird 3's change to return COUNT() as a BIGINT rather than integer.  So the ODBC driver is declared innocent.  Thanks to all for having helped figure out what's happening.

Jonathan Finch
Principal Consultant
Rushmore Information Services, LLC

> On December 3, 2014 at 3:42 PM "Walter R. Ojeda Valiente" <[hidden email]> wrote:
>
>
> With Visual FoxPro, a column BIGINT is returned as type character, not as
> type integer.
>
> But it can be easily converted to integer, with the VAL() function.
>
> Greetings.
>
> Walter.
>
>
> On Wed, Dec 3, 2014 at 4:02 PM, Dimitry Sibiryakov <[hidden email]> wrote:
>
> > 03.12.2014 20:40, [hidden email] wrote:
> > > In my tests of SQL statements using ODBC driver version 2.0.3.154 with
> > the Firebird 3.0 Beta 1, COUNT(*) is apparently returning a character
> > variable.
> >
> >    It should return value of SQL_BIGINT or SQL_NUMERIC types. Perhaps,
> > your software is
> > not ready to work with these types and ask for conversion to text
> > internally?..
> >
> > --
> >    WBR, SD.
> >
> >
> > ------------------------------------------------------------------------------
> > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> > from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> > with Interactivity, Sharing, Native Excel Exports, App Integration & more
> > Get technology previously reserved for billion-dollar corporations, FREE
> >
> > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Firebird-odbc-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
> >
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk_______________________________________________
> Firebird-odbc-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-odbc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
Loading...