Click here to Skip to main content
15,902,198 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: About Memory initialization Pin
Matthew Faithfull6-Nov-07 23:58
Matthew Faithfull6-Nov-07 23:58 
GeneralRe: About Memory initialization Pin
toxcct7-Nov-07 0:13
toxcct7-Nov-07 0:13 
AnswerRe: About Memory initialization Pin
toxcct7-Nov-07 0:08
toxcct7-Nov-07 0:08 
AnswerRe: About Memory initialization Pin
John R. Shaw7-Nov-07 0:56
John R. Shaw7-Nov-07 0:56 
QuestionHow to make a connection to MySQL in MFC? Pin
TooShy2Talk6-Nov-07 23:15
TooShy2Talk6-Nov-07 23:15 
QuestionRe: How to make a connection to MySQL in MFC? Pin
David Crow7-Nov-07 4:37
David Crow7-Nov-07 4:37 
AnswerRe: How to make a connection to MySQL in MFC? Pin
TooShy2Talk7-Nov-07 14:37
TooShy2Talk7-Nov-07 14:37 
QuestionRe: How to make a connection to MySQL in MFC? Pin
David Crow8-Nov-07 2:41
David Crow8-Nov-07 2:41 
TooShy2Talk wrote:
I run the code but I don't have "mysql.h" and i think the lib.


Exactly how are you running the code in the absence of a necessary .h and .lib file? Sans those, you are not even compiling the code, let alone running it.

To narrow down the problem a bit, try:

MYSQL mysql;
if (mysql_init(&mysql) != NULL)
{
    if (! mysql_real_connect(&mysql, "localhost", "root", NULL, "mydb", 3306, NULL, 0))
    { 
        CString str;
        str.Format("mysql_real_connect() failed.  Error: %s", mysql_error(&mysql));
        AfxMessageBox(str); 
        return FALSE;
    } 
}



"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


QuestionDYNCALL(writeData)((UCHAR *) Pin
doc606-Nov-07 22:59
doc606-Nov-07 22:59 
AnswerRe: DYNCALL(writeData)((UCHAR *) Pin
Matthew Faithfull6-Nov-07 23:08
Matthew Faithfull6-Nov-07 23:08 
GeneralCompilation on dual-core Pin
hairy_hats6-Nov-07 22:37
hairy_hats6-Nov-07 22:37 
GeneralRe: Compilation on dual-core Pin
Matthew Faithfull6-Nov-07 23:00
Matthew Faithfull6-Nov-07 23:00 
GeneralRe: Compilation on dual-core Pin
hairy_hats6-Nov-07 23:04
hairy_hats6-Nov-07 23:04 
GeneralRe: Compilation on dual-core Pin
Matthew Faithfull6-Nov-07 23:15
Matthew Faithfull6-Nov-07 23:15 
QuestionRe: Compilation on dual-core Pin
David Crow7-Nov-07 4:40
David Crow7-Nov-07 4:40 
AnswerRe: Compilation on dual-core Pin
hairy_hats7-Nov-07 4:43
hairy_hats7-Nov-07 4:43 
QuestionAnother CAsyncSocket Problem Pin
TheInfernalCrow6-Nov-07 22:04
TheInfernalCrow6-Nov-07 22:04 
GeneralRe: Another CAsyncSocket Problem Pin
Matthew Faithfull6-Nov-07 22:45
Matthew Faithfull6-Nov-07 22:45 
GeneralRe: Another CAsyncSocket Problem Pin
TheInfernalCrow7-Nov-07 1:40
TheInfernalCrow7-Nov-07 1:40 
AnswerRe: Another CAsyncSocket Problem Pin
Mark Salsbery7-Nov-07 7:37
Mark Salsbery7-Nov-07 7:37 
GeneralRe: Another CAsyncSocket Problem Pin
TheInfernalCrow7-Nov-07 19:25
TheInfernalCrow7-Nov-07 19:25 
QuestionAdd an image on a button. Pin
CodingLover6-Nov-07 21:47
CodingLover6-Nov-07 21:47 
AnswerRe: Add an image on a button. [modified] Pin
Nelek6-Nov-07 22:16
protectorNelek6-Nov-07 22:16 
AnswerRe: Add an image on a button. Pin
Haroon Sarwar6-Nov-07 22:38
Haroon Sarwar6-Nov-07 22:38 
AnswerRe: Add an image on a button. Pin
Hamid_RT7-Nov-07 0:20
Hamid_RT7-Nov-07 0:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.