PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: John Messingham on October 08, 2007, 09:56:37 AM

Title: ADO Functions and Integers
Post by: John Messingham on October 08, 2007, 09:56:37 AM
Hi,

Is there any known reason why I would not be able to read an integer field from Firebird/MySQL via the ADO wrapper in FF 2.8?

I do not seem to be getting the values when I use FF_AdoRecordset_GetCollect.

I have no problem with text/char fields.

Edited to say I am connecting to the database via odbc.
Title: Re: ADO Functions and Integers
Post by: John Messingham on October 08, 2007, 10:26:02 AM
Quick update.

By using the 'GetString' command (http://planetsquires.com/support/index.php?topic=1268.0) I can see the values are being returned. I just cannot seem to access them.
Title: Re: ADO Functions and Integers
Post by: Jose Roca on October 08, 2007, 11:03:56 AM
Which kind of integer? Use VARIANTVT in the returned variant and tell us which type is.
Title: Re: ADO Functions and Integers
Post by: John Messingham on October 08, 2007, 11:10:58 AM
Hi Jose,

Thanks for the reply.

Type 3, Long-integer.
Title: Re: ADO Functions and Integers
Post by: Jose Roca on October 08, 2007, 11:17:19 AM
Then use VARIANT# to retrieve the value. Maybe are you using VARIANT$, that is for strings only?
Title: Re: ADO Functions and Integers
Post by: John Messingham on October 08, 2007, 11:27:03 AM
Jose strikes again.

Replaced Variant$ with Variant# and all is ok now.

Thank you for your time.
Title: Re: ADO Functions and Integers
Post by: John Messingham on March 31, 2008, 12:54:34 PM
Can I ask the same question about currency fields (type 6) please.
Title: Re: ADO Functions and Integers
Post by: Jose Roca on March 31, 2008, 03:14:36 PM
Same reply: VARIANT#
Title: Re: ADO Functions and Integers
Post by: John Messingham on March 31, 2008, 04:36:08 PM
Cheers, I should have looked closer at what I was doing.