retrieving decimal-type data

retrieving decimal-type data

Post by Ben Newma » Sat, 09 Jun 2001 06:31:19



I have an app that tries to fetch data from a decimal column, but it is only
retaining digits to the left of the decimal point. The buffer I am
retrieving into is certainly large enough, because when I describe the
column in the result set, I allocate 18 bytes of storage (large enough for a
decimal).

I have tried binding the column with SQL_C_CHAR and SQL_C_DEFAULT, but I
only get digits to the left of the decimal point.

Can anyone help?

Thanks,
Ben

 
 
 

retrieving decimal-type data

Post by Aaron Bertran » Sat, 09 Jun 2001 06:45:02


What is your SQL query, and what is the code in the app?

I'm unclear as to whether the decimal places are being truncated by the
query, or by the app, or by the app's presentation.

--
   MVP [ASP]
   http://www.aspfaq.com/



Quote:> I have an app that tries to fetch data from a decimal column, but it is
only
> retaining digits to the left of the decimal point. The buffer I am
> retrieving into is certainly large enough, because when I describe the
> column in the result set, I allocate 18 bytes of storage (large enough for
a
> decimal).

> I have tried binding the column with SQL_C_CHAR and SQL_C_DEFAULT, but I
> only get digits to the left of the decimal point.

> Can anyone help?

> Thanks,
> Ben


 
 
 

retrieving decimal-type data

Post by JT » Sat, 09 Jun 2001 06:54:03


Quote:-----Original Message-----

I have an app that tries to fetch data from a decimal column, but it is only
retaining digits to the left of the decimal point. The buffer I am
retrieving into is certainly large enough, because when I describe the
column in the result set, I allocate 18 bytes of storage (large enough for a
decimal).

I have tried binding the column with SQL_C_CHAR and SQL_C_DEFAULT, but I
only get digits to the left of the decimal point.

Can anyone help?

Thanks,
Ben

Is your recieving field defined as decimal?

 
 
 

1. retrieving decimal-type data

I have an app that tries to fetch data from a decimal column, but it is only
retaining digits to the left of the decimal point. The buffer I am
retrieving into is certainly large enough, because when I describe the
column in the result set, I allocate 18 bytes of storage (large enough for a
decimal).

I have tried binding the column with SQL_C_CHAR and SQL_C_DEFAULT, but I
only get digits to the left of the decimal point.

Can anyone help?

Thanks,
Ben

2. Is checking number of rows from executeUpdate() worth?

3. Data Type SQL Server7.0 need a non decimal 1 E 19 data type

4. The process could not deliver the snapshot to the subscriber

5. Data conversion problems handling DB2 Decimal data types

6. Problem with Oracle installation in a RAID-5

7. HELP NEEDED FOR SQL SERVER DB-LIBRARY :- ERROR WHILE RETRIEVING/CONVERTED DECIMAL DATA

8. What are HIND_C_... indexes/statistics ?

9. Data type of decimal aggregates

10. Decimal data type doesn't work?

11. SQL Server Data Type Decimal

12. Integer data type shown with comma and decimal place

13. fill decimal data type with preceding zeros