Now since I have got the report working and displaying properly, I'm struck @ this thing and I've got lots of confusion revolving this.
I've got a table with 5 fields in which date was splitted in 4 columns as DD, MM, YY1 and YY2. Using dataset (C#.Net), I've added a new column and concatenated these 4 fields into one and made it look like a date field (mm-dd-yyyy) and this field is a String field. Now the actual problem is that I want to display report based on a Date Range Selection from my Form (i.e 2 Textboxes for Start Date and End Date). I've not much clear idea as how to proceed validating the records as it can't be done at the database level since my database doesn't have anything like a Date Field.
Luc, there is nothing much I can do on the database coz it resides on the AS400 IBM iSeries server and that's the way how dates are stored in mainframe systems.
Then regarding the "looking like date field", its infact the the date itself which is stored in a string field and if I'm not wrong that can be converted into integer or date field..........that's wht i think...........am i right............???
and moreover, i need help on the logical part of how to proceed on it.........
Luc, that's the way they do it in mainframe server. But the thing is that I'm looking for something which could actually help me in doing the date range comparison at the code level. Normally we do it at the database level but since my database doesn't have a date field, I've to do it at the code level. I'm saying so, coz my code concatenates the 4 different fields into one field and display it as date field on crystal report. So if there are chances of any comparison for date range then it has to be done at code level only coz that's the place where its actually shown up as date field.
Did i confused you...........????
To be more clear, I want the date range comparison to be done exactly after the code where its concatenating the fields.............and the code for the same is as given below:
I wouldn't fetch all records and do it on client side, because it would unnecessarily create high load on the database server and fetch more records than actually needed. Can't you do something like this on server side?
WHERE YY >= startyear
AND MM >= startmonth
AND DD >= startday
AND YY <= endyear
AND MM <= endmonth
AND DD <= endday
I totally agree with what you guys are saying, but please let me know whether I can use the SELECT statement on DataSet the same way as we use on Database tables coz I don't have the datefield in database table, its only the newly created DataSet which is holding the DateField.
Now its the newPDS DataSet, which is having the DateField. So, now please tell me a way to apply the date range thing within this piece of code. (Date range from Form is entered in 2 Textboxes as START_DATE and END_DATE in the format of DD/MM/YYYY.
I wondered if there is a way to connect to word application without the running object table.
Meaning, instead of getting the COM object from the ROT, ask from running instance of word (queryInterface or something like that...).
I am having a bit o problem and i need a simple, elegant fix.
The problem: I am uploading a file to a ftp using FtpWebResponse and the Write method from a ftpRequest. I need this file locked for reading until all content has been uploaded to the Ftp and the write method has stopped.
Another app. (actually the same, but on a different machine) will download this file, and i need to read it only when the write method has stopped.
So far, my solutions do not work fully or are very very ... ugly
Here are some ways to consider:
1. have the consumer wait for a signal, and once it receives the signal make a list of available files,
then signal back to the producer; in between the consumer should not start creating new files.
2. have the producer use a fake extension, and once the file is uploaded, have it rename the extension;
3. have the producer a file, and once the file is uploaded, have it signal the consumer while
mentioning the file name.
As for signal, you could use anything available, including the creation and deletion of a file
that simply contains a filename.
My favorite would be 3, i.e. producer creates a file say file1.ext1, then it creates file
"currenttime.signal" containing the text "file1.ext1"; consumer would find all signal files,
read them, delete them, and process the file mentioned in them.
And I would use yyyyMMdd_HHmmss format for currenttime, so the signal files have identical alphabetical
and chronological order.
PS: if you are afraid two files need could be generated in the same second, just add a 2-second
delay in the producer code!
The signal idea has crossed my mind, but not in such a superb manner .
I was afraid i would have to modify quite a lot, and that is not far from truth.
I retrospective, the whole architecture of the program should be reconsidered . Hopefully i'll have the time to do just that, and then i will implement your solution.