Newbie: SELECT COUNT (*) FROM table

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Newbie: SELECT COUNT (*) FROM table

When I run the above query from the command line, it works

When I run it from my powerbasic program, I can't seem
to get a reasonsible result.

What type of result does count return?
I get something that looks like this:
[ CHR$(133) ][ CHR$(21) ][ CH...

and the type is given as -5...

What is this type?


Re: Newbie: SELECT COUNT (*) FROM table

bsdmike wrote:

Quoted text here. Click to load it

I am guessing here.  Try
select count(*) as rec_count from table

It is possible that no column name is being assigned to count(*) that you
can truly represent.  This is a problem with SQL Server and OLEDB.

Tony Mays

Re: Newbie: SELECT COUNT (*) FROM table

It's because the COUNT(*) expression is returning a BIGINT, and ADO
can't make sense of a number this big. Select the Change BIGINT columns
to INT option (option value 16384).
Previous / Next / Up / Table of Contents

Site Timeline