Solved

Converting datatypes of sybase to vc++

Posted on 2003-11-17
5
326 Views
Last Modified: 2007-12-19
Hi all,
  I am using VC++ .NET and sybase as backend.  I have established the connectivity through the 12.5 ASE Sybase driver

  Here is the code:

  SQLSMALLINT      GetDefaultCType(SQLINTEGER SQLType)
{
      SQLSMALLINT rtn = SQLType;
      switch (SQLType)
            {
            case SQL_INTEGER:
                  rtn = SQL_C_LONG;
                  break;
            case SQL_SMALLINT:
                  rtn = SQL_C_SHORT;
                  break;
            case SQL_REAL:
                  rtn = SQL_C_FLOAT;
                  break;
            case SQL_DOUBLE:
                  rtn = SQL_C_DOUBLE;
                  break;
            case SQL_NUMERIC:      
                  rtn = SQL_C_NUMERIC;
                  break;
            //---
                  
            case SQL_VARCHAR:
                  rtn = SQL_C_CHAR;
                  break;

            //---
            }
      return rtn;
}

 I use SQLBindParameter
There is some problem when the datatype is SQL_SMALLINT or any number datatype.  

Can any one help us.
0
Comment
Question by:ajexpert
5 Comments
 
LVL 14

Author Comment

by:ajexpert
Comment Utility
The exact problem is when the datatype is numeric it doesnt fetches the value from database.  It either gets garbage value or zero values.

Please help
0
 
LVL 35

Expert Comment

by:YZlat
Comment Utility
ajexpert, go to http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20798137.html


I gave you some points and you never got them
0
 
LVL 14

Author Comment

by:ajexpert
Comment Utility
Hi community experts,
  I request for deleting of this question.  The problem is resolved.

  It was not parsing numeric data into equivalent vc++.


Thanks
0
 
LVL 96

Expert Comment

by:Bob Learned
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQed, with points refunded (50)

modulo
Community Support Moderator
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now