Return type mismatch when using MFC ODBC class with decimal type

Return type mismatch when using MFC ODBC class with decimal type

Post by Gavin Cha » Fri, 22 Mar 1996 04:00:00



Hi,

     I have an application that uses MS MFC ODBC class to query the
sybase 11.0 database.  When ever I use RFX_xxx to receive the data from
sybase, it gives me return type mismatch.  I even tried use the
convert(varchar(10),DECIMAL_COLUME_NAME) as a return and RFX_Text to
receive it but it doesn't work.  Does anybody encountered this problem
and know of a solution or work-around for it?  Any hints, pointers will
be appreciated.

Thanks,
Gavin Chan

 
 
 

1. Type Mismatch when Adding Matching Type Decimal Fields

Okay, I'm having a really basic problem that I just can't believe could
actually a bug.  My source table has two decimal columns both defined
Precision=7, Scale=2 and my target table has one decimal column also with
Precision=7, Scale=2.  The following line fails on a "Type Mismatch" error
during a simple ActiveX transformation using VBScript:

     DTSDestination("Total_Amount") = DTSSource("Amount_1") +
DTSSource("Amount_2")

I'm simply adding two decimal fields -- this is not a complex operation
here.  I even changed the target to Precision=9, Scale=2 to acommodate a
larger decimal, but it didn't help.

I'm running SQL Server 2000 with SP2.  Any ideas?  Thanks very much.

Chuck

2. Error 16923: Cursorfetch: Maximum length of '%s' is incompatible with that of selected column in the cursor.

3. Type Mismatch while using Activex Script Task with numeric data type

4. excesive db size

5. type mismatch when instantiating ADODB.Command class

6. what is the method to upload a word.doc to a SQL field?

7. type mismatch error while importing data to a BIT type column

8. someone was trying to get into my computer

9. Data Types in CreateParameter statement causing type mismatch

10. Type Mismatch reading from Access 2K of type Date

11. Passing Classes to other classes (using user defined types)

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

13. SQL Server decimal field type returned by DAO 3.5