PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Money DataType
Date: Jun 29 1999 7:07PM

Andy Vu writes:
 > I have a sybase question. How do I convert CS_MONEY type which is 8-byte
 > to double type in C, and I am using red hat linux release 5.1

cs_convert() or dbconvert(), depending of the library you are using.

Note that when you convert the value to double you will loose
precision, so if you are doing financial operations you should
probably leave the value as a CS_MONEY datatype and use the cs_calc()
or dbmny*() routines to operate on it.

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com