o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Best way to purge log file -

Hi,

I have a text log file which store the error occurs
in my application. Each error is a line in the log
file with this format:

<Date Time> <Error Code> <Error description>

I wish to purge the log file after certain period of
time for eg. KeepDays = 5 days.

That is those errors that are logged more than 5 days ago
are purged, only keep the existing lines where the date is from
5 days ago till now.

If today is 10-Nov-2005, only keep logs with date from 5-Nov-2005 to
10-Nov-2005.

The only way I would think of is to read the log file, compare
the dates and rewrite it to another file. But I think it would
takes quite sometime for the application to do the check.

Does anyone have a optimise ways to purge the log file ?


Thanks in advance.

 

Best way to purge log file -
Hi, I have a text log file which store the error occurs in my application. Each error is a line in the log file with this format: <Date Time> <Error Code> <Error description> I wish to purge the log file after certain period of time for eg. KeepDays = 5 da


How to determine if pass end of the month -
I have a program that is keeping a history of files in an access table. And every month I need to purge the table. There is a file for each day of the month. How can I tell at run time if the current date is in a new month or still in the same month as the history files. Example


RE: Purge records in visual basic -
Does anyone know how to purge the data in the database from visual basic.


purge duplicates from text file -
how can i search a text file and remove all duplicate entries


ID's -
Hey! How can I know when a Ms-DOS Application launch in by the shell command is done? In this example, I want the program PURGE accomplich is job then the will complete the FOR...NEXT instructions. Ex: [code] Private sub CmdOk_Click() for i = 0 to list1.listcount - 1 cmd$ =


Packing a dbf file in VB -
Hi guys ...here is a challange... I have the need to manipulate some dbf files from within my VB app. One requirement is to pack the dbf so as to purge the records marked for deletion...any suggestion on if and how to go about this. Regards Gerard


One difficult question, one mediocre question -
1> Is it possible to make a program that can create executables? If so, how? 2> What's the easiest way to purge a text file of all quotation marks. Thanks


Creating a Sub -
I'm making a sub which will search a string and remove the specified character. Does this work? Code: Private Sub Purge(NOString As String, Char As Integer) CharPlace = InStr(0, NOString, Chr$(Char), vbTextCompare) Mid(NOString, CharPlace) = Null End Sub I've still yet to put


Determining dates -
I want to purge files in a directory that are older than a certain date, say January 1, 2004. How do I do this in vbscript?


trouble with counter freezing -
Hi i am very new at programing. My program/computer freezes when the count gets to 2, cant even print screen! I use "cmdPurge.Text = CStr(Val(cmdPurge.Text) - 1)" to count.. Here is the code: Private Sub cmdPurge_Click(ByVal sender As System.Object, ByVal e As


How long does data need to be kept for -
A user of one of my wonderful apps notified me that an exception was being raised. The error is of course handled so the app keeps running. The app stores data in a database and is purged and compacted on a daily basis. The maximum age for the data is can be set by the user as a numbe


PlaySound "SND_PURGE" not working on Windows 2K -
The SND_PURGE flag for the PlaySound API doesn't seem to purge the .wav file thats currently playing. It works on Win 95, 98. Does anyone know if the SND_PURGE Flag is supported on Windows 2000. Can't seem to find any docs stating this.


purging empty space -
What's a good app to use if I wanna purge (zero fill) the free space on my hdd?


Warp Pipe Project: I have something to do with it. -
Ok. If u didn't purge my latest post in VB .NET forum, u would have known I posted for a LIVE voice chat, just like in messenger. I need a small, small team of developers to help me if you have any free time. If u are interested, just PM me.


Access Database Compression -
We have a real time process and i have to log all the data periodically into an Access database using VB6 as front end for reporting purposes. The problem is that the size of the database increases drastically so i purge the data after 30 days (Delete the records older than 30 days).


how to clear clipboard in ms word 2k3 -
Im looking for a macro command to purge the clipboard in word anyone know it or where to find it thanks


Auto purge program -
Hi all, I am about to create an app which is to run on a server (in the background) and on the first day of a new month it scans the selected drive and deletes any files not created in the previous month. Before i do this i was wondering if it has already been done on here, if


[2005] serial port write buffer - timing issue -
Hello, I'm trying to communicate with an rs485 device, and was having trouble with the timing. The device uses "stick parity". The protocol defines this as setting the first byte of a packet to mark parity (this is the byte corresponding to the address of the device), a


Access Database Manipulation -
In my program, I'm going to give users the option to "purge" the database of older records. So, I need the following to work behind the scenes. I'm going to create a "duplicate" database, with the same table structures as the original, however, this database is


Data self-destruct if PC is stolen -
I'd like to ellicit your suggestions on how to purge sensitive/personal files from a PC/laptop automatically in the event it's stolen or otherwise being accessed by an unauthorized user. My first thought is to simply put a home-grown app in the Startup folder that checks the login u


[Outlook 2003] VBA created email and clicking no/cancel -
Easy question, just looking for confirmation. I have a database that uses Outlook to send an email confirmation. If the user accidentally (or otherwise) clicks No or Cancel when outlook asks if this is a virus, does Outlook completely remove the email message that was created leavin


Time Now -
Hi, i keep getting subscript out of range, with this line If Now + 50 > User(a).Purge Then VB Code: Private Sub Command7e_Click()Dim a As Integer, msg As StringDim count As Integer For a = 0 To UBound(UserDB)If Now + 50 > User(a).Purge Then


System.Threading.Timer runs wild -
There are 2 places in my application where I use a System.Threading.Timer. The app is a Windows Service, and is deployed at several customer sites, where it runs continuously. One timer is used to send a "Keep Alive" email message once every hour. When called, the delega


How do I know when the WAV is done playing -
How do I know when the music is done playing? Here is a sample code that I got from Either Chris or Jop: Option Explicit Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags


Shelling Batch Files -
Ok, when you shell a batch file it executes, but a window remains after it is terminated. You could shell it a million times and end up with a million windows. But what if a used: Code: Shell "C:\mybatch.bat", vbHide Would this actually purge the window from memory o


Purge/Delete old threads -
Hi, I was wondering if an admin or mod can delete the threads on the last two pages here: http://www.vbforums.com/search.php?s...4&pp=40&page=5 Several of the threads in that search were either not started by me or I never replied back to them. I wish to have those threads d


Purge Data problem -
I have problem with delete data. It seems the date type of the field gives me problem. I can delete data with data type Text but i can't delete data with data type Date/time and Number. What is wrong? below is my code. The code below work perfectly all right with data type Text


NEWS FLASH: Plans to Purge Chit Chat -
I have heard from an un-reliable source that mary and brad are going to delete all posts in Chit Chat, including the Post Race We must archive all our work and create duplicates in the test forum.


Date Converter -
Hi! I've got a program which will need to automatically purge data out of the database, after a user specified number of days. So, for example, the administrator for the program decides to 'mark entries older than 180 days inactive', he would type the value 180 into the program.


SourceSafe Slowdown -
We are using Visual Source Safe 6.0a and it seems to be very very slow when you go through the plugin in VB. It takes like 4 minutes to get the history of a file. When you do it through source safe directly and not through vb its acceptable in speed. We are using the database format th


*RESOLVED* Need to make a program that has no user interaction... -
First, hi. My first post. I am a novice/intermediate .NET user that’s almost out of school and a programmer/analyst intern. Program Background: "Write a VB app that runs annually in January to purge services that were retired prior to the January of the previous year."


Free Virtual Memory -
I'm an intermediate level C++ programmer who is pretty new to having to worry about heaps and stacks...thanks in advance for your help. I have an application which uses a lot of memory. With some user settings, it's possible to exceed the memory capacity of the hardware. I've


[2005] Serial Port Help... Please -
Hey Guys and Gals, needing some advice/help. I am trying to take a piece of software, which was written in vb4 but has been compiled and convert the com port output in to vb.net 2005. Unfortunately I can not get my hands on the source code. It is a piece of software that talks to


help needed to access messaging queue -
Hello, I need to create a VB6 app which would be able to read and clear messages stored in the message queue on a Windows 2003 server. The messages are being created in the queue by a 3rd party vendor application. So far I have been unsuccessfull in finding examples on the web.


Training in Production Environment -
This is a question of Database Design. We currently run 3 different environments. Production - All production work done here Test - All testing is done here Training - User Training is done here A few programmers proposed moving the Training Environment into the Production E


Purging Print jobs in Win2000 -
Hi all, I am writing a utility that sends PRN files directly to a printer. I want to be able to purge the jobs in the Print Manager from a command button on the form. My code works in Win98, but in Win2000 the GetLastError call from SetPrinter returns ACCESS_DENIED. According to the


pass Selected toolbar combobox value to function -
Hello, In an Access/vba toolbar, How would I pass the Selected value into the Function, please? Code: Set CBC = CBar.Controls.Add(Type:=msoControlComboBox) With CBC .Text = "Purge Table" .TooltipText = "Delete records in table" .


How to purge the output buffer of MSComm -
Colleagues, Here's what I would like to accomplish: Code: MSComm1.Output = "command" 'send a string of characters MSComm.PortOpen = False 'Immediately close the port. but I'm afraid that I might close the port before all the data is sent. I want to close the por


PlaySound - how to loop -
Ok, so I'm thick. But how on earth do I get this code to LOOP the sound so it keeps playing? I can't get it to work... Code: Option Explicit Private Const SND_APPLICATION = &H80 ' look for application specific association Private Const SND_ALIAS = &H10000


breaking out of frames question, (I ADDED TO POST WITH PICS) code posted -
I have a frame page that hase a contents side where the menu is and a main side where everything else is seen. now the one page i go to that is displayed in the main frame is split into two frames one being named topFrame and the other being name bottomFrame. the top frame is for the