Index
2009-04-30 20:24Rafael Copquin : Re: vfp9 and sql server express (more issues)
2009-05-01 09:23Stephen Russell : Re: vfp9 and sql server express (more issues)
Back to top
Re: vfp9 and sql server express (more issues)

Author: Rafael Copquin

Posted: 2009-04-30 20:24:36   Link

Another issue I have with SQLExpress is this:

A SQLSE table has a price field with a numeric(10,2) type.

When it comes to VFP through an SPT call it comes with the correct structure

(apparently)

But after transforming it with the cursortoxml function to produce a cXML

variable, the opposite function, xmltocursor fails in particularly that

field: the error message is that it is getting the incorrect data type

If I browse the cursor, it shows 23,50 ( not 23.50 as should be)

I solved it with the cast function in a select statement:

select cast(price as N(10,2)) as price from mycursor into ......

However, the price is 23.50 but I only get 23.00. No matter what I do, the

cents are discarded.

?????

Rafael Copquin

©2009 Rafael Copquin
Back to top
Re: vfp9 and sql server express (more issues)

Author: Stephen Russell

Posted: 2009-05-01 09:23:10   Link

On Thu, Apr 30, 2009 at 7:24 PM, Rafael Copquin <rcopquin@ciudad.com.ar> wr=

ote:

> Another issue I have with SQLExpress is this:

>

> A SQLSE table has a =A0price field with a numeric(10,2) type.

>

> When it comes to VFP through an SPT call it comes with the correct struct=

ure

> (apparently)

> But after transforming it with the cursortoxml function to produce a cXML

> variable, the opposite function, xmltocursor fails in particularly that

> field: the error message is that it is getting the incorrect data type

>

> If I browse the cursor, it shows =A023,50 ( not 23.50 as should be)

-----------------------------------

What are the language settings on that workstation? that may be why

you see the comma instead of the decimal.

> I solved it with the cast function in a select statement:

>

> select cast(price as N(10,2)) as price from mycursor into ......

>

> However, the price is 23.50 but I only get 23.00. No matter what I do, th=

e

> cents are discarded.

> ?????

-----------

Where are you doing the cast? In VFP or back on the server?

--=20

Stephen Russell

Sr. Production Systems Programmer

Web and Windows Development

Independent Contractor

Memphis TN

901.246-0159

©2009 Stephen Russell