List:MySQL++« Previous MessageNext Message »
From:pavel989 Date:January 27 2009 3:59am
Subject:Re: What is a row? and can i use it as a vector?
View as plain text  

 the funny thing is. i was essentially doing the same thing. i just now used the
mysqlpp::sql_text dbstring, set it equal to row[0], and its running right. TYVM!!? I
didn't know that i woulda needed to use an sql_string.



-----Original Message-----

From: Warren Young <mysqlpp@stripped>

To: plusplus@stripped

Sent: Sun, 25 Jan 2009 1:19 am

Subject: Re: What is a row? and can i use it as a vector?

On Jan 24, 2009, at 8:54 PM, pavel989@stripped wrote:?


> ??? what i was trying to do, is pass the row[0] value, into a new > char array,
> through a?

> for loop, so that itd print the entire value, on different lines > through
> glPrint.?

> basically i was thinking that if the title (in this case) is longer > than 16, i
> want to print?

> 16 char of the title, move down, and continue.?


This is nothing to do with MySQL++.  This is basic text processing problem.?


 From this and the rest of your message, I get the impression that you're just starting to
learn about programming.  That's great, but this is not the place to get that education.?


This might help clear the fog about the connection between MySQL++ string structures and C


?  mysqlpp::sql_text dbstring;?

?  char ac[10];?

?  strncpy(ac, dbstring.c_str(), sizeof(ac));?

?  ac[sizeof(ac) - 1] = '\0';?


That will copy dbstring into a null-terminated array of characters -- a C string --
truncating it to the maximum size of the array, giving at most 9 characters.?


> now when i tried the for loop way, i was getting errors that the > buffer is too
> small, and I?

> think it has something to do with me using "char * " so it was > probably just
> pointer problems.?

> But then i figured i should try to use vectors. and now i get "cant > convert from
> char to char*"?

> or something like that.?


You're not going to get much help for such vague problem descriptions as this.  The best
you can hope for is commiseration.  If you want a solution, show the code and give the
exact text of the error you got when trying to compile or run it.?


--MySQL++ Mailing List?

For list archives:

To unsubscribe:




A Good Credit Score is 700 or Above.  See yours in just 2 easy steps! 


Re: Re: What is a row? and can i use it as a vector?pavel98925 Jan
  • Re: What is a row? and can i use it as a vector?Warren Young25 Jan
Re: What is a row? and can i use it as a vector?pavel98927 Jan