• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

Data Conversion

How do I do a data type conversion with C ?

For example:  
At the beginning of my program, I declare
char student;

I would like to convert this to
SQLCHAR student;
once I enter one of my functions

Can anyone tell me how n the coding to do this data conversion?

1 Solution
What is SQLCHAR?  Is it a structure?  Is it just a typedef for char?
if you need to use this variable just a few times, you can use casting.
something like this:
char student1;
SQLCHAR student2;

student1 = (SQLCHAR) student1;

but, if you want to use this vaiable constantly as SQLCHAR, you need to declare a new variable and assign it the value of the old variable like in my example (of course, yo cann't have them both with the same name)

Hope this helps,
Arnon David.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Increase Security & Decrease Risk with NSPM Tools

Analyst firm, Enterprise Management Associates (EMA) reveals significant benefits to enterprises when using Network Security Policy Management (NSPM) solutions, while organizations without, experienced issues including non standard security policies and failed cloud migrations

Tackle projects and never again get stuck behind a technical roadblock.
Join Now