Thank you so much!

On 12/21/05, Russ Jones <[EMAIL PROTECTED]> wrote:
> SQLSelect should return to you a RecordSet, which contains just one
> record.
> You can get the value from the recordset, something like this
> (untested code):
>
>    dim CashDB as REALSQLDatabase
>    dim rs as RecordSet
>    dim sumall as double
>
>    rs = Cashdb.SQLSelect("SELECT SUM(credits) from mainDB WHERE
> account =  '"
>    +  vAccount +  "'")
>    if rs <> null then
>      if CashDB.Error then
>        // handle error - eg
>        msgbox CashDB.ErrorMessage
>        return
>        // but you can do better than that
>      end
>      if rs.RecordCount < 1 then
>        // another error
>      end
>      sumall = rs.IdxField(1).Value
>    end
>
>
>
> On Dec 21, 2005, at 1:19 PM, Xico Pires wrote:
>
> > I'm really newbie on MySQL. I'm trying to sum the content of DB field
> > called "credits"
> >
> > dim sumall as double
> > sumall = Cashdb.SQLSelect("Sum credits from mainDB WHERE account =  '"
> > +  vAccount +  "'")
> >
> > but I'm getting a type mismatch error. The field "credits" is defined
> > like "double" in DB.
> >
> > Please help me.
> >
> > Thanks in advance.
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>
>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to