Click here to Skip to main content
15,905,144 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionrestrict control being active by default Pin
kiranin18-Jul-07 1:05
kiranin18-Jul-07 1:05 
QuestionRe: restrict control being active by default Pin
David Crow18-Jul-07 2:39
David Crow18-Jul-07 2:39 
QuestionRe: restrict control being active by default Pin
Hamid_RT25-Jul-07 8:40
Hamid_RT25-Jul-07 8:40 
QuestionVista and caption bar Pin
jung-kreidler18-Jul-07 0:38
jung-kreidler18-Jul-07 0:38 
AnswerRe: Vista and caption bar Pin
Paresh Chitte18-Jul-07 19:36
Paresh Chitte18-Jul-07 19:36 
QuestionAccess Violation. Pin
p_18-Jul-07 0:30
p_18-Jul-07 0:30 
AnswerRe: Access Violation. Pin
Cedric Moonen18-Jul-07 0:50
Cedric Moonen18-Jul-07 0:50 
GeneralRe: Access Violation. Pin
p_18-Jul-07 0:57
p_18-Jul-07 0:57 
thanks a lot sir
my code is this
i use debugger but i can not find sloution sir
void CCompanyDlg::OnConnect()
{
int i;
MYSQL *myDB;
MYSQL_RES *res;
MYSQL_ROW row;
CString user,pass,aqp;
if ((myDB = mysql_init((MYSQL*) 0)) &&
mysql_real_connect(myDB,"localhost","root",NULL,NULL,3306,NULL,NULL))

{
if ( mysql_select_db( myDB,"gourav") < 0 )
{
MessageBox("Can't select the database !\nTry later.");
goto exit_here;
}
else
{
MessageBox("Can't connect !\nPlease try later.") ;
goto exit_here;
}
}
GetDlgItemText(IDC_USER,user);
GetDlgItemText(IDC_PASS,pass);
if(!mysql_query(myDB,"SELECT id from login WHERE user= \'" + user + "\' "))
res=mysql_store_result(myDB);
row = mysql_fetch_row(res);
{
i = (int) mysql_num_rows( res );
if (i != 1)
{
MessageBox("WRONG LOGIN PLEASE TRY AGAIN", " aq ",MB_ICONASTERISK);
mysql_free_result( res ) ;
goto exit_here;
}
}

switch(atoi(*row))

{
case 0: // regular user
{
CAdmin dlg;
dlg.DoModal();
UpdateData(FALSE);
}
break;
case 1: // administrator
{
CManager dlg1;
dlg1.DoModal();
UpdateData(FALSE);
}
break;
}

exit_here:
mysql_close( myDB);

}




hi

GeneralRe: Access Violation. Pin
Cedric Moonen18-Jul-07 1:06
Cedric Moonen18-Jul-07 1:06 
GeneralRe: Access Violation. Pin
p_18-Jul-07 1:09
p_18-Jul-07 1:09 
GeneralRe: Access Violation. Pin
toxcct18-Jul-07 1:13
toxcct18-Jul-07 1:13 
GeneralRe: Access Violation. Pin
Cedric Moonen18-Jul-07 1:16
Cedric Moonen18-Jul-07 1:16 
GeneralRe: Access Violation. Pin
p_18-Jul-07 1:28
p_18-Jul-07 1:28 
GeneralRe: Access Violation. Pin
Cedric Moonen18-Jul-07 2:12
Cedric Moonen18-Jul-07 2:12 
GeneralRe: Access Violation. Pin
toxcct18-Jul-07 1:13
toxcct18-Jul-07 1:13 
QuestionRe: Access Violation. Pin
David Crow18-Jul-07 2:41
David Crow18-Jul-07 2:41 
Questionhelp with files Pin
josip cagalj17-Jul-07 23:53
josip cagalj17-Jul-07 23:53 
AnswerRe: help with files Pin
PravinSingh18-Jul-07 1:45
PravinSingh18-Jul-07 1:45 
AnswerRe: help with files Pin
David Crow18-Jul-07 2:44
David Crow18-Jul-07 2:44 
AnswerRe: help with files Pin
Hamid_RT25-Jul-07 8:30
Hamid_RT25-Jul-07 8:30 
QuestionSubclassing Issue Pin
LoveCPlusplus17-Jul-07 23:42
LoveCPlusplus17-Jul-07 23:42 
AnswerRe: Subclassing Issue Pin
Mike Dimmick18-Jul-07 2:53
Mike Dimmick18-Jul-07 2:53 
QuestionNamedpipe Pin
charian092017-Jul-07 23:35
charian092017-Jul-07 23:35 
AnswerRe: Namedpipe Pin
Mark Salsbery18-Jul-07 6:19
Mark Salsbery18-Jul-07 6:19 
GeneralRe: Namedpipe Pin
charian092018-Jul-07 14:57
charian092018-Jul-07 14:57 

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.