|
Does anybody know how to use LIKE correctly. I use "Select * from transaction where myDate LIKE '%1/6/04%'" But it didn`t word. The myDate is a text.
|
|
|
|
|
I think the way you use LIKE is correct but the field type of your myDate might be causing the problem. Is it a VARCHAR or TEXT type? If it is a DATE type, probably this won't work. You need something like this
result.Format(" date '%4d-%02d-%02d' ",d.GetYear(),d.GetMonth(),d.GetDay());
and use = or >= instead.
So your SQL statement should be
SELECT * FROM PO WHERE PO.PURCHASED_DATE = date '1997-12-31'
The example SQL statement above is from PL-SQL of the Oracle but should be compatible on T-SQL and the rest.
Hope this helps
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi!
I'm drawing in a custom control, which derives from CWnd. I placed the custom control inside a dialog, and the custom control is a member variable of the dialog.
When i click on the custom control, i draw a line, from that point to 10 pixels to the right. The problem is that if i drop the line on the right side of the control, a part of the line gets drawn in the dialog.
Is there any way to prevent it drawing in the dialog, or outside the control?
or how do i get the size of the custom control so i can validate if some part ofthe line will be drawn outside the control?
thanks!!
|
|
|
|
|
GetClientRect returns the size of the dialog.
|
|
|
|
|
This has probably been asked before...
Is it possible to set the text of a window (happens to be an edit control) owned by another app (I have a valid target CWnd* )? SetWindowText() and PostMessage() seems to work only if the window is owned by the same thread.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
How about PostThreadMessage() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Unfortunately the method fails with error 1159 (The message can be used only with synchronous operations). Too bad there's no SendThreadMessage(). :)
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
Another one of my newbie problems , and this time I just don't know where I should start. My MFC-app has a rebar with two bands. One is the "standard" toolbar, which is working fine. The other one uses a small dialog resource, which in turn contains two controls besides a couple of static labels, a checkbox and a combo-box.
The thing is, I need to be able to set and get the values in these controls, and I quite frankly don't have a clue on where to start. I've created a seperate class for the dialog resource, and created a couple of control variables in this class.
Now, I need to be able to set the values for these controls, basically when the window opens (SDI + CScrollView)... I've tried a couple of things, which, well..., didn't work Any clues on how to do this?
Another thing is getting the values, I need to do this when drawing my view - the controls defines how the view should be drawn. I can probably do this knowing the answer to my last question, but... how??
I realize that this isn't exactly the hardest questions being asked around here, so thank you for your time and help.
Regards,
Jorgen E.
|
|
|
|
|
>> I've created a seperate class for the dialog resource,
Have you worked with MFC CDialog based classes before? Have you used MFC's DDX mechanism to get/set values from a CDialog class?
If not you should consider going through a turtorial like Scribble or something.
-pete
|
|
|
|
|
Well, I have worked with them, but not enough it seems :P I'll take another look at scribble!
Assuming I didn't confuse you too much with my question, and you understood me: any more ideas? Anything is appreciated!
- J
|
|
|
|
|
how many different email servers are normally used?
i.e. smtp, mimi etc.
what are main different between them?
cheers
includeh10
|
|
|
|
|
I think you want the General Discussions forum.
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
what does it mean?
includeh10
|
|
|
|
|
includeh10 wrote:
what does it mean?
I think that your inquiry is best posted in the "General Discussions" forum, not in the "Visual C++" forum as this inquiry does not reference MFC or C++.
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
post this on the lounge General Discussions forum!!
TOXCCT >>> GEII power
|
|
|
|
|
I need to send out canned audio message from my computer to a pagger. The problem is that other human users may be using the pagger. I need to monitor the pagger audio output and wait for a period of no activity. The pagger audio output is hooked up to the mic input of my Sound Blaster. Unless it's easier then it looks, I'd rather not have to figure out how to decode the wave file and somehow determine the input level. Is there an easy solution to this problem?
|
|
|
|
|
Need a MFC c++ code for voice record and to save them to the disk.
Michael Geffen
|
|
|
|
|
Is there a way to launch a PDF from an application
and then programmatically print it without the end-user
seeing all this going on?
I can ShellExecute, but the whole things displays. I want it to be hidden. Most importantly tough, I can't
figure out how to programmatically click File/Print/Ok
on the Adobe Reader from a different application.
Any ideas?
Please, any response any one can give me will be greatly
appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
You could use the "print" verb (instead of "open") when you call ShellExecuteEx() . This will cause the standard Windows print dialog to open, bypassing the Adobe Acrobat GUI.
I don't know how to directly print to the default printer without showing the print dialog.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
try to get it's handle and the use
ShowWindow(hdlg/*it's handle*/,SW_HIE);
toi get it's hanlde make a program that will get the window from point
GetWindowFromPoint
put it down
and then try to hide the window with that handle;
gabby
|
|
|
|
|
Hello
I've got a CTreeCtrl. When i double-click on one of the items, i want to get in a CString the string of where i doubleclicked.
the following code
CString temp;
HTREEITEM hItem = m_tree.GetSelectedItem();
temp = m_tree.GetItemText(hItem);
gives me a runtime error.
any ideas?
thanks!!
|
|
|
|
|
Perhaps hItem is NULL? What's the run-time error you're getting?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
HI..Dear..
You need to trap event selChanged & in that even you can get value.. e.g.: I'm traping tree in view by using following code..you can do simmilar
bye
void CLeftFirstTreeView::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
CString aa;
aa.Format("%s", GetTreeCtrl( ).GetItemText(pNMTreeView->itemNew.hItem ));
MessageBox(aa);
}
Tha's it.. you can do this in tree control by traping same event...
bye again
---Sumit Kapoor---
|
|
|
|