[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-odbc
Subject:    Re: Problem with SUM clause via ODBC ab VB6
From:       <e.didomenico () sinelogo ! it>
Date:       2005-08-20 13:21:13
Message-ID: 00e501c5a58a$0b23c290$6fc8c8c0 () P4X869
[Download RAW message or body]

Hi,

thanks for the help, but the field in question is a double, not
autoincrement, 0 default value, and all records not contains null.
This bug is reported in mysql bug, but there isn't an answer to the
question.

Thank a lot.

EDD
----- Original Message ----- 
From: "Fabio Venditti" <venditti@tiscali.it>
To: <e.didomenico@sinelogo.it>
Cc: <myodbc@lists.mysql.com>
Sent: Saturday, August 20, 2005 3:11 PM
Subject: Re: Problem with SUM clause via ODBC ab VB6


> Hi
>
> I solved similar problems and maybe solution is the same for your.
> When i upgraded my MySQL server some timestamp fields changed their values
> to "0000-00-00" ... so when i tried to get recordsets by VB6 i obtained
EOF
> or data connection errors.
>
> Maybe you have zero-filled fields in your rg table and it prevents you to
> obtain a recordset from ADO driven queries.
> My solution was to delete 'autoincrement' fields.
> If you need to use such types then you'll prefer to check and modify
> standard values for NULL fields.
> Hope this solve your problem.
>
> Ciao.
>
>
> ----- Original Message ----- 
> From: <e.didomenico@sinelogo.it>
> To: <myodbc@lists.mysql.com>
> Sent: Saturday, August 20, 2005 1:56 PM
> Subject: Problem with SUM clause via ODBC ab VB6
>
>
> >
> > My configuration is:
> > MySQL Query Browser 1.1.13
> > MySQL 5.0.10a-beta-nt
> > MySQL client 5.0.4
> > MySQL ODBC 5.51 Driver 3.51.11.00
> > Windows 2000 Pro
> > MDAC_Type 2.81
> >
> >
> > This simple query
> > "SELECT SUM(sub_tot) as totale FROM rg"
> > work fine on MySQL Query Browser 1.1.13
> > result 3456.87
> >
> > when I execute the same query in VB 6.0
> >
> > Dim MySQLConn As ADODB.Connection
> > Set MySQLConn = New ADODB.Connection
> > MySQLConn.Open "MySql_collettore"
> >
> > Dim rst As New ADODB.Recordset
> >
> > rst.Open "SELECT SUM(sub_tot) as totale FROM rg", MySQLConn
> > Do While Not rst.EOF
> >        MsgBox rst("totale")
> > rst.MoveNext
> > Loop
> >
> > it return an empty recordset rst.
> >
> > Why ???
> >
> > Tanks
> >
> >
> >
> > -- 
> > MySQL ODBC Mailing List
> > For list archives: http://lists.mysql.com/myodbc
> > To unsubscribe:
http://lists.mysql.com/myodbc?unsub=venditti@tiscali.it
> >
> >
>
>
>


-- 
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe:    http://lists.mysql.com/myodbc?unsub=mysql-odbc@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic