List:General Discussion« Previous MessageNext Message »
From:Mads Kristensen Date:December 6 2004 8:32pm
Subject:MySQL C API questions
View as plain text  
Hi all.

I'm using the MySQL C API to interface with my MySQL 4.1 server and I
have the following questions:

When I do a SELECT of some integer data value what is actually returned
is a string representation of the integer value and since I need this
integer value in my client I have to convert it. Is it possible to get
MySQL to return the actual integer value instead? 

If not, and I actually have to convert the value every time, I have
another related question: Are the values returned zero-terminated? Or do
I have to use the lengths that I can fetch with mysql_fetch_lengths? The
reason that I ask this question is that if the fields are not
zero-terminated I have to copy the values into a temporary buffer,
zero-terminate that buffer and the do the conversion every time... 
This seems like a lot of wasted work ;-)

Best regards,
Mads Kristensen
Thread
MySQL C API questionsMads Kristensen6 Dec
  • Re: MySQL C API questionsAftab Jahan Subedar6 Dec
RE: MySQL C API questionsDave Juntgen6 Dec