Solved

Converting datatypes of sybase to vc++

Posted on 2003-11-17
5
330 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 14

Author Comment

by:ajexpert
ID: 9763512
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
ID: 9811246
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
ID: 9817533
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
ID: 10268094
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
ID: 10321348
PAQed, with points refunded (50)

modulo
Community Support Moderator
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

688 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