Solved

Converting datatypes of sybase to vc++

Posted on 2003-11-17
5
328 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add a Condition in ASP Repeater 6 45
Name Space error VS2015 1 35
Data organization issue 7 36
Starting to use Git with Visual  Studio Online 1 19
IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

762 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