One of the requirements of a DA is to return information about the result
set columns.  Does Sybase give a name to column "count(*)".  Some database
products do and some don't.  Try giving the column an alias name like so

select count(*) as total from db_table

assuming Sybase supports this of course.

Regards,

Bob



--------------------------------------------------------------
Robert E. Tierney                    [EMAIL PROTECTED]
Going Virtual                        http://www.goingv.com
10800 Independence Pointe Pkwy      Phone: 1-704-849-0731 x109
Matthews, NC 28105                    Fax: 1-704-849-2279
                                   AOL-IM: RETierney
--------------------------------------------------------------

On 8 Aug 2000, Stephen Nosal wrote:

> Folks -
> 
> How do I execute SQL statements such as select count(*) from db_table?
> 
> I'm running zope 2.2 with the SybaseDA 2.0b2. My connection to the database works 
>fine, ie select * from small_table where amount>1000 produces a valid result set.
> 
> Using just the DA connection test, the statement select count(*) from db_table comes 
>up with the error:
> 
> Error Type: ValueError
> Error Value: Empty column name,
> 
> Any insight here would be great - I couldn't find anything documented about database 
>functions.
> 
> - Steve
> 
> 
> __________________________________________________________________
> Get your Private, Anti-Spam, Free Email at http://e3mil.com 
> and Step into a Friendly Universe!
> 
> _______________________________________________
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> 


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to