Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problem with running SQL ( Like N'%) in VC++ Pin
Marc Soleda29-Aug-06 20:49
Marc Soleda29-Aug-06 20:49 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
Eytukan29-Aug-06 23:45
Eytukan29-Aug-06 23:45 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
Marc Soleda29-Aug-06 23:50
Marc Soleda29-Aug-06 23:50 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
Eytukan30-Aug-06 3:25
Eytukan30-Aug-06 3:25 
AnswerRe: Problem with running SQL ( Like N'%) in VC++ Pin
Hamid_RT29-Aug-06 22:07
Hamid_RT29-Aug-06 22:07 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
rasha200329-Aug-06 23:39
rasha200329-Aug-06 23:39 
AnswerRe: Problem with running SQL ( Like N'%) in VC++ Pin
Marc Soleda29-Aug-06 23:55
Marc Soleda29-Aug-06 23:55 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
rasha200330-Aug-06 3:03
rasha200330-Aug-06 3:03 
kindly find the function:
CString CGamesDlg::SetFlagCorrect(CString sms,CString level,CString Lang)
{
CString strConnect,sqlS,mDate,mQuestion,mContest,mTime,mLDate;

CDatabase db_mssqlx;
CTime T=CTime::GetCurrentTime();

mTime.Format("%02ld%02ld%02ld",T.GetHour(),T.GetMinute(),T.GetSecond());
mDate.Format("%ld%02ld%02ld",T.GetYear(),T.GetMonth(),T.GetDay());
mLDate.Format("%ld%02ld%02ld",T.GetYear(),T.GetMonth(),T.GetDay()-1);

CString xDT = mDate+mTime;
CRecordset *m_rec = new CRecordset ( &db_mssqlx ) ;

strConnect = _T(SQLConn);

sqlS="SELECT * FROM Games_Qst WHERE (AnsTxt LIKE N'%"+ sms +"%')" ;
AddToLog("sqlS:"+sqlS);

BOOL F1=db_mssqlx.OpenEx(strConnect,CDatabase::openReadOnly | CDatabase::noOdbcDialog);
m_rec -> Open( CRecordset::snapshot, sqlS, CRecordset::none ) ;
int count = m_rec ->GetRecordCount() ;
if (count==0)
{
m_rec -> Close( ) ;
db_mssqlx.Close( ) ;
return "1";
}
else
{
m_rec -> Close( ) ;
db_mssqlx.Close( ) ;
return "0" ;
}
}
QuestionRe: Problem with running SQL ( Like N'%) in VC++ Pin
David Crow30-Aug-06 3:31
David Crow30-Aug-06 3:31 
AnswerRe: Problem with running SQL ( Like N'%) in VC++ Pin
rasha200330-Aug-06 3:46
rasha200330-Aug-06 3:46 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
Marc Soleda30-Aug-06 3:39
Marc Soleda30-Aug-06 3:39 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
rasha200330-Aug-06 3:45
rasha200330-Aug-06 3:45 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
Marc Soleda30-Aug-06 3:56
Marc Soleda30-Aug-06 3:56 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
rasha200330-Aug-06 19:28
rasha200330-Aug-06 19:28 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
Marc Soleda30-Aug-06 20:39
Marc Soleda30-Aug-06 20:39 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
rasha200330-Aug-06 21:41
rasha200330-Aug-06 21:41 
GeneralRe: Problem with running SQL ( Like N'%) in VC++ Pin
Marc Soleda30-Aug-06 22:10
Marc Soleda30-Aug-06 22:10 
QuestionRe: Problem with running SQL ( Like N'%) in VC++ Pin
David Crow30-Aug-06 4:02
David Crow30-Aug-06 4:02 
AnswerRe: Problem with running SQL ( Like N'%) in VC++ Pin
rasha200330-Aug-06 4:21
rasha200330-Aug-06 4:21 
AnswerRe: Context menu problem Pin
Mircea Puiu29-Aug-06 20:19
Mircea Puiu29-Aug-06 20:19 
GeneralRe: Context menu problem Pin
gajendrakashyap29-Aug-06 20:24
gajendrakashyap29-Aug-06 20:24 
QuestionRe: Context menu problem Pin
Hamid_RT29-Aug-06 22:02
Hamid_RT29-Aug-06 22:02 
AnswerIt's something belonging to upper message !?! Pin
Mircea Puiu29-Aug-06 22:16
Mircea Puiu29-Aug-06 22:16 
GeneralRe: It's something belonging to upper message !?! Pin
gajendrakashyap29-Aug-06 23:41
gajendrakashyap29-Aug-06 23:41 
QuestionShow Desktop Problem Pin
payal33529-Aug-06 19:11
payal33529-Aug-06 19:11 

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.