|
Dear all,
I am cuurrently using DAO to access my oracle DB, i have a datetime field and would like to sort by the records according to dates/time.
Anybody have any method sorting Dates or time using DAO?
your help will be greatly appreciated!!!!
|
|
|
|
|
Why don't you specify your sorting request in your SQL statement? Like this:
"SELECT ... FROM ... WHERE ... ORDER BY (datetime_field_name)"
|
|
|
|
|
Thank's for replying, but i would like to sort it from a range of dates.
U know how to do it in DAO using filters or using any method?
Thank you very much
|
|
|
|
|
For those using DAO or mircosoftjet engine to sort date
i found the solution
Hope this will help you all!!!
SELECT *
FROM tblInvoices
WHERE CustomerID = 1 AND InvoiceDate > #01/01/98#
Note that the date string is enclosed in number signs (#).
More details ,
http://www.abspos.net/HelpRT/Microsoft%20Jet%20SQL%20-%20Fundamentals.htm
|
|
|
|
|
Hey guys,
does somebody know how to add a mailuser with the help of vc++ on a Win2k ??? Are their any tools on windows which i can call through vc++ to create such an account ??
Thanks
da sonu
|
|
|
|
|
|
Thanks for your response.
what about a simple user on a win2000 ??
da sonu
|
|
|
|
|
Is there somebody who can answer this ??
da sonu
|
|
|
|
|
Hi,
I am trying to call an external program which operates in a Dos Shell from my Property-Page based MFC project. It takes an input data file and outputs another data file.
Any suggestions?
kash
|
|
|
|
|
What exactly is your problem? Does ::ShellExecute() not work?
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
I think you may call _spawnl with arguments..or May goto for ShellExecute..what else you want ?
|
|
|
|
|
Just tried ShellExecute, which consequently is a pretty cool function.
I'm trying to run a program in a different directory to the one my MFC project is kept in.
I tried this:
ShellExecute(NULL,"open","d:\My Documents\Folder\ProgramA.exe",NULL,NULL,SW_SHOWNORMAL);
but it doesn't like the different folder.
kash
|
|
|
|
|
You maybe need to escape the backslashes in your string:
ShellExecute(NULL,"open","d:\\MyDocuments\\Folder\\ProgramA.exe",NULL,NULL,SW_SHOWNORMAL);
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
yep that works but now the dos console opens up but doesn't initialise my ProgramA.exe. It just displays an empty dos window and hangs up.
|
|
|
|
|
Kash wrote:
It just displays an empty dos window and hangs up.
I just tested with ipconfig.exe . It opens for a fraction of a second and closes.
Maybe it is in your ProgramA.exe?
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
ProgramA.exe is fine when it's run outside my MFC project.
The dos prompt works as it should when i call it explicitly but am getting problems when i call a program.
Also all windows programs are executing correctly.
I need ProgramA to work and hold until I have operated on it then i want to exit ProgramA and return to the MFC project.
Kash
|
|
|
|
|
Kash wrote:
I need ProgramA to work and hold until I have operated on it then i want to exit ProgramA and return to the MFC project.
I do not understand this sentence.
Do you want programA to start in a DosBox, perform its function and close the dosbox? This works on my computer.
Or do you need the dos box to stay open, to show the output of ProgramA?
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
the latter, as ProgramA requires user inputs and once these have been obtained, it can then perform it's function and be exited by the user.
|
|
|
|
|
Kash wrote:
ProgramA requires user inputs
Oh. I see.
From you first post ("It takes an input data file and outputs another data file.") on, I always thought of command line params.
For a test, I tried "more.com", (which also wants input) with ShellExecuteEx():
CString s ("C:\\WINNT\\system32\\more.com");
SHELLEXECUTEINFO SEI = {0};
SEI.cbSize = sizeof(SEI);
SEI.lpVerb = "open";
SEI.lpFile = s;
SEI.nShow = SW_SHOWDEFAULT;
BOOL err = ::ShellExecuteEx( &SEI );
if (err!=TRUE)
{
} and it seems to work. If this does not help, maybe calling a Batch-file that in turn calls your program may help?
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Thank you very much for your help.
kash
|
|
|
|
|
How can i convert a string represented by BSTR to char * ?
|
|
|
|
|
Just check out with W2A() ...
|
|
|
|
|
|
hello @all,
a few days ago, i asked:
i would like to build a hyperterminal into a mfc program (after i pressed a button, the hyperterminal is to appear).
how can that be done?
i got the answer:
::ShellExecute(0,0,"hypertrm.exe",0,0,SW_SHOW);<br />
it functions perfectly (special thanks to M A V)!
now, when the hyperterminal starts, i must make a few settings (select the com, give a name, baudrate and so on).
is there a possibility to load an old "test.ht"? i don´t want to make any settings at the beginning of the hyperterminal.
how can that be done?
thank you very much
sunny
|
|
|
|
|
Pass test.ht on the command line
::ShellExecute(0,0,"hypertrm.exe", "test.ht",0,SW_SHOW);
you may need to pass the full path to the test.ht file.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|