Click here to Skip to main content
15,890,186 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Showing "Passord" Text image Pin
Stuart Dootson14-May-09 1:09
professionalStuart Dootson14-May-09 1:09 
QuestionProcess that continues after you logoff Pin
andypandy213-May-09 22:36
andypandy213-May-09 22:36 
AnswerRe: Process that continues after you logoff Pin
Madhu Nair13-May-09 22:45
Madhu Nair13-May-09 22:45 
GeneralRe: Process that continues after you logoff Pin
andypandy214-May-09 1:15
andypandy214-May-09 1:15 
QuestionSQL Query In ADO MFC/Visual C++ Pin
Astitva2313-May-09 22:26
Astitva2313-May-09 22:26 
AnswerRe: SQL Query In ADO MFC/Visual C++ Pin
Madhu Nair13-May-09 22:39
Madhu Nair13-May-09 22:39 
QuestionRe: SQL Query In ADO MFC/Visual C++ [modified] Pin
Astitva2313-May-09 23:48
Astitva2313-May-09 23:48 
AnswerRe: SQL Query In ADO MFC/Visual C++ Pin
Stuart Dootson14-May-09 1:01
professionalStuart Dootson14-May-09 1:01 
Rather than building a query string embedding the parameter value (can we say SQL Injection[^]?), I'd suggest you build a parameterised query[^].

For what you want, this would want something like:

// Create Command Object.
       Cmd1.CreateInstance( __uuidof( ADODB::Command ) );
       Cmd1->ActiveConnection = your connection;
       Cmd1->CommandText = _bstr_t(L"SELECT Name FROM EmployeeDetails WHERE Name=?");

       // Create Parameter Object.
       Param1 = Cmd1->CreateParameter( _bstr_t(L""),
                                       ADODB::adVarChar,
                                       ADODB::adParamInput,
                                       -1,
                                       _variant_t(_bstr_t(m_EditBoxValue) );
       Cmd1->Parameters->Append( Param1 );

       // Open Recordset Object.
       m_pRS = Cmd1->Execute( &vtEmpty, &vtEmpty2, ADODB::adCmdText );


To use the LIKE operator, just replace WHERE Name=? with WHERE Name LIKE ?

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

QuestionRe: SQL Query In ADO MFC/Visual C++ Pin
Astitva2314-May-09 1:43
Astitva2314-May-09 1:43 
AnswerRe: SQL Query In ADO MFC/Visual C++ Pin
Stuart Dootson14-May-09 2:32
professionalStuart Dootson14-May-09 2:32 
QuestionExtended MAPI - embedding an attachment inside the message Pin
yakobom13-May-09 21:15
yakobom13-May-09 21:15 
AnswerRe: Extended MAPI - embedding an attachment inside the message Pin
Madhu Nair13-May-09 22:29
Madhu Nair13-May-09 22:29 
GeneralRe: Extended MAPI - embedding an attachment inside the message Pin
yakobom13-May-09 22:51
yakobom13-May-09 22:51 
GeneralRe: Extended MAPI - embedding an attachment inside the message Pin
Madhu Nair13-May-09 23:16
Madhu Nair13-May-09 23:16 
QuestionOperating system hangs up + watchdog application for windows Pin
eli1502197913-May-09 19:07
eli1502197913-May-09 19:07 
AnswerRe: Operating system hangs up + watchdog application for windows Pin
«_Superman_»13-May-09 19:12
professional«_Superman_»13-May-09 19:12 
GeneralRe: Operating system hangs up + watchdog application for windows Pin
eli1502197913-May-09 20:23
eli1502197913-May-09 20:23 
GeneralRe: Operating system hangs up + watchdog application for windows Pin
«_Superman_»13-May-09 20:50
professional«_Superman_»13-May-09 20:50 
GeneralRe: Operating system hangs up + watchdog application for windows Pin
eli1502197913-May-09 21:00
eli1502197913-May-09 21:00 
GeneralRe: Operating system hangs up + watchdog application for windows Pin
«_Superman_»13-May-09 21:10
professional«_Superman_»13-May-09 21:10 
QuestionRe: Operating system hangs up + watchdog application for windows Pin
David Crow14-May-09 3:03
David Crow14-May-09 3:03 
Questiondirect map Pin
shefa' isied13-May-09 18:40
shefa' isied13-May-09 18:40 
AnswerRe: direct map Pin
Franck Paquier13-May-09 19:07
Franck Paquier13-May-09 19:07 
QuestionSimple Question about Tool Bars Pin
Software200713-May-09 17:09
Software200713-May-09 17:09 
AnswerRe: Simple Question about Tool Bars Pin
Chandrasekharan P13-May-09 17:20
Chandrasekharan P13-May-09 17: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.