C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 29th, 2006, 06:57 PM
DarkLord[] DarkLord[] is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 32 DarkLord[] User rank is Corporal (100 - 500 Reputation Level)DarkLord[] User rank is Corporal (100 - 500 Reputation Level)DarkLord[] User rank is Corporal (100 - 500 Reputation Level)DarkLord[] User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 19 h 9 m 56 sec
Reputation Power: 10
Using queries from MySQL with newlines.

I'm working on an application that uses MySQL, and in one part the result from a query has newlines in it ("\r\n"). I have a edit control which I configured as multiline. when I use SetDlgItemText(hwnd, IDC_MYBOX, "text\r\ntext") it works, but SetDlgItemText(hwnd, IDC_MYBOX, row[0]).

Is there something I need to do?

Reply With Quote
  #2  
Old October 30th, 2006, 01:08 PM
Mazzie's Avatar
Mazzie Mazzie is offline
Making a mistake is not sin.
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Location: Finland
Posts: 406 Mazzie User rank is Captain (20000 - 30000 Reputation Level)Mazzie User rank is Captain (20000 - 30000 Reputation Level)Mazzie User rank is Captain (20000 - 30000 Reputation Level)Mazzie User rank is Captain (20000 - 30000 Reputation Level)Mazzie User rank is Captain (20000 - 30000 Reputation Level)Mazzie User rank is Captain (20000 - 30000 Reputation Level)Mazzie User rank is Captain (20000 - 30000 Reputation Level)Mazzie User rank is Captain (20000 - 30000 Reputation Level)Mazzie User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 32554 Folding Title: Starter FolderFolding Points: 32554 Folding Title: Starter Folder
Time spent in forums: 1 Week 1 Day 6 h 20 m 50 sec
Reputation Power: 208
Send a message via MSN to Mazzie
1. I have never integrated MySQL with C/C++, and whole SetDlgItemText() function is unknown for me...

But I guess it would help us if you showed where you dumb the data in row[0] (I assume that's pointer to char array, right?). Perhaps you have some problem in there? Try couting/printing the contents of row[0] before using the function to see if it is what you expect.

Mmm.. Your nick makes me hope I could have helped more. I once knew one 'DarkLord' who helped me quite a lot

Reply With Quote
  #3  
Old October 31st, 2006, 04:15 PM
DarkLord[] DarkLord[] is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 32 DarkLord[] User rank is Corporal (100 - 500 Reputation Level)DarkLord[] User rank is Corporal (100 - 500 Reputation Level)DarkLord[] User rank is Corporal (100 - 500 Reputation Level)DarkLord[] User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 19 h 9 m 56 sec
Reputation Power: 10
row[0] represents a MYSQL_ROW which is basically like a char. I think I need to run through the result and replace \r\n with char(13) and char(10). But is there an easy way to do this?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Using queries from MySQL with newlines.

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap