Click here to Skip to main content
15,921,548 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: getting quota (space) for an logged-in user in FTP Pin
Ted Ferenc1-Jul-04 21:45
Ted Ferenc1-Jul-04 21:45 
GeneralRe: getting quota (space) for an logged-in user in FTP Pin
harinat1-Jul-04 22:17
harinat1-Jul-04 22:17 
GeneralRe: getting quota (space) for an logged-in user in FTP Pin
Ted Ferenc1-Jul-04 23:00
Ted Ferenc1-Jul-04 23:00 
QuestionHow to add functionality on 'OK' button on a property sheet? Pin
Rajesh_K_Sharma1-Jul-04 21:21
Rajesh_K_Sharma1-Jul-04 21:21 
AnswerRe: How to add functionality on 'OK' button on a property sheet? Pin
Antony M Kancidrowski2-Jul-04 1:58
Antony M Kancidrowski2-Jul-04 1:58 
AnswerRe: How to add functionality on 'OK' button on a property sheet? Pin
PJ Arends2-Jul-04 17:55
professionalPJ Arends2-Jul-04 17:55 
GeneralData base Question ( VC++ and ACCESS) Pin
Anonymous1-Jul-04 20:43
Anonymous1-Jul-04 20:43 
GeneralRe: Data base Question ( VC++ and ACCESS) Pin
RChin2-Jul-04 0:36
RChin2-Jul-04 0:36 
Anonymous wrote:
i used like this but Wrong Query message appears
rs->Open(AFX_DB_USE_DEFAULT_TYPE, "SELECT * FROM Record WHERE (([Record].[Date] Between #m_month/m_date/m_year# And #m_month1/m_date1/m_year1#))");


You have the right idea here. First create a valid SQL string, using the variables that you have set up for user input.
So if you have the int variables: m_monthx, m_datex and m_yearx. Then all you have to do is modify your code like:
<code>
CString strSQL.

<font color=green>// create your sql statement</font>
strSQL.Format(_T("SELECT * FROM Record WHERE (([Record].[Date] Between #%d/%d/%d# And #%d/%d/%d#))"),
m_month1, m_date1, m_year1, m_month2, m_date2, m_year2);

<font color=green>// open recordset with these user-defined values</font>
rs->Open(AFX_DB_USE_DEFAULT_TYPE, (LPCTSTR)strSQL);
</code>





I Dream of Absolute Zero

QuestionHow to change Menu caption dynamically? Pin
uus991-Jul-04 20:37
uus991-Jul-04 20:37 
AnswerRe: How to change Menu caption dynamically? Pin
bneacetp1-Jul-04 20:53
bneacetp1-Jul-04 20:53 
GeneralRe: How to change Menu caption dynamically? Pin
uus991-Jul-04 21:13
uus991-Jul-04 21:13 
GeneralRe: How to change Menu caption dynamically? Pin
Antony M Kancidrowski2-Jul-04 2:22
Antony M Kancidrowski2-Jul-04 2:22 
GeneralRe: How to change Menu caption dynamically? Pin
uus992-Jul-04 4:16
uus992-Jul-04 4:16 
GeneralRe: How to change Menu caption dynamically? Pin
uus992-Jul-04 4:32
uus992-Jul-04 4:32 
GeneralSubclassing Buttons on CPropertySheet Pin
Monty21-Jul-04 19:46
Monty21-Jul-04 19:46 
GeneralRe: Subclassing Buttons on CPropertySheet Pin
PJ Arends2-Jul-04 17:56
professionalPJ Arends2-Jul-04 17:56 
GeneralCompilation problem after installing XP SP2 PSDK on Win2k machine Pin
Vaibhav Sanghavi1-Jul-04 19:17
Vaibhav Sanghavi1-Jul-04 19:17 
GeneralC++ optimization problem Pin
Indrawati1-Jul-04 13:46
Indrawati1-Jul-04 13:46 
GeneralRe: C++ optimization problem Pin
Ravi Bhavnani1-Jul-04 14:10
professionalRavi Bhavnani1-Jul-04 14:10 
GeneralRe: C++ optimization problem Pin
PJ Arends1-Jul-04 14:12
professionalPJ Arends1-Jul-04 14:12 
GeneralRe: C++ optimization problem Pin
Ryan Binns1-Jul-04 14:17
Ryan Binns1-Jul-04 14:17 
GeneralRe: C++ optimization problem Pin
Johan Rosengren1-Jul-04 19:44
Johan Rosengren1-Jul-04 19:44 
GeneralRe: C++ optimization problem Pin
Antony M Kancidrowski2-Jul-04 2:11
Antony M Kancidrowski2-Jul-04 2:11 
GeneralRe: C++ optimization problem Pin
Johan Rosengren2-Jul-04 2:20
Johan Rosengren2-Jul-04 2:20 
GeneralRe: C++ optimization problem Pin
Antony M Kancidrowski2-Jul-04 2:35
Antony M Kancidrowski2-Jul-04 2:35 

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.