VDouble.GetString return formatted string 15 char long

Ivan Smahin ivan_smahin at paradigmasoft.com
Tue Jun 14 07:06:33 CDT 2011


On 6/14/2011 2:42 PM, Francois Van Lerberghe wrote:
> Hello Ivan,
>
> Thank you or the explanation, but I don't see how I can use it in my
> situation.
> Must I set it in the constructor of the Vtable, VDouble or in the
> constructor of the Vcursor ?
>
> In Realbasic, I write :
>
>      dim csr As VCursor
>      csr = mDatabase.SQLSelect(sqlQuery)
>
>      dim myDoubleField As Vdouble
>
>      myDoubleField = csr.VDoubleField(1)
>
>      dim myStringResult As String
>      myStringResult  = myDoubleField.GetString
>
> Where and how can I use the scale property in order to have the desired (old
> style) string output ?
>
>


Create table t1 ( f1 double (5,2) )
...
cursor = SqlSelect( "select f1 from t1" )
...
doubleField = cursor.Field("f1)
...

In this case cursor's field inherit precision and scale from table's field.
You should set desired scale for t1.f1 in order to get desired string 
output.

vKernel provide ability to change scale and precision for even cursor's 
field, but
it is not wrapped in ADKs yet.

Instead you can get field value as a double and build appropriate string 
representation yourself -
in RB.

-- 

Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list