|
Christian Graus wrote:
www.microsoft.com
www.google.com
Lol - how helpful ;P
I'll start digging then.
Thanks anyway.
|
|
|
|
|
The key to surviving in this job is knowing how to do your own research! If there is some skill or technology you don't have, then it's up to you to learn it. I've survived nearly 20 years in this business soley because I'm so adept at doing my own research and learning and doing it VERY quickly.
Search engine are youre friend in this business! They are MUCH faster than going to a message board to ask the same question your going to ask Google.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi.. i'd like to ask how can i read and search the contents of a log
file from a remote computer?
i've attached a sample log file and i want to search for "warning" or
"critical error" based on the current date and time..
and i will display on a web page the next lines of it.. until it sees
a blank space right next to the time stamp. any idea how to do that in
vb.net? hope you can help me.. thanks.. what do i have to use?
here's an example from the text file:
###################################################################################################
11/27/04 17:47:14:LOG FILE: D:\ORACLE\ADMIN\log\oramon_marsprod.log LEVEL: 1 PID: 1404
###################################################################################################
11/27/04 17:47:14:************** ORAMON version: 1.0.6 (build: Jan, 28, 2003) *************
11/27/04 17:49:15:ERROR#************* MONITOR: archive_dir_space **************
11/27/04 17:49:15:ERROR#'(%PCT_FREE% >= 10 and %PCT_FREE% < 25)' (evaluated: '(15.8708639888514 >= 10 and 15.8708639888514 < 25)') is violated.
11/27/04 17:49:15:ERROR# DIR_NAME: Y:\oracle\MARS\archive
11/27/04 17:49:15:ERROR# TOTAL_BYTES: 65032785920
11/27/04 17:49:15:ERROR# FREE_BYTES: 12268359680
11/27/04 17:49:15:ERROR# PCT_FREE: 15.8708639888514
11/27/04 17:49:15:ERROR#**** Skipping mail for 'Y:\oracle\MARS\archive@1'
11/27/04 17:49:15:ERROR#***** The following mail will not be delivered
11/27/04 17:49:15:ERROR#Archive Directory: Y:\oracle\MARS\archive has low disk-space (TOTAL: 65032785920 bytes, FREE: 12268359680 bytes, 15.8708639888514 %free). Please make sure that ORABCK is running on the machine and other system files are not using an increased amount of space.
11/27/04 17:49:15:Evaluating pcond=> (15.8708639888514 < 2)
11/27/04 18:39:16:ERROR#************* MONITOR: ora_parameter **************
11/27/04 18:39:16:ERROR#'('%PARAM_NAME%' ne 'open_cursors' and %PARAM_PCT_FREE% >= 6 and %PARAM_PCT_FREE% < 21)' (evaluated: '('db_files' ne 'open_cursors' and 19 >= 6 and 19 < 21)') is violated.
11/27/04 18:39:16:ERROR# PARAM_NAME: db_files
11/27/04 18:39:16:ERROR# ID:
11/27/04 18:39:16:ERROR# PARAM_CUR_VALUE: 205
11/27/04 18:39:16:ERROR# PARAM_MAX_VALUE: 256
11/27/04 18:39:16:ERROR# PARAM_PCT_FREE: 19
11/27/04 18:39:16:ERROR#**** Skipping mail for 'db_files@1'
11/27/04 18:39:16:ERROR#***** The following mail will not be delivered
11/27/04 18:39:16:ERROR#'db_files' init.ora parameter (current: 205, max: 256) has low resource free%: 19. This is a symptom of incorrect init.ora 'db_files' parameter setting.
11/27/04 18:39:22:Mail Elapsed secs: 3659, wait secs: 900
11/27/04 18:39:22:ERROR#Sending mail to D:\ORACLE\ADMIN\oramon\alert.mail mailing list
11/27/04 18:39:22:ERROR#**** Error: bject_extent_growth:WARNING" href="mailto:marsprod@cvspwcora010n2:MARSbject_extent_growth:WARNING">marsprod@cvspwcora010n2:MARSbject_extent_growth:WARNING ERROR
11/27/04 18:39:22:AC2_PROD_8.XIE1F_LOT. object has grown from 917 to 918 extents
11/27/04 18:39:22:AC2_PROD_8.XIE3F_LOTHIST. object has grown from 2770 to 2771 extents
11/27/04 18:39:22:AC2_PROD_8.XIE1F_LOTSUBPRODUCTHIST. object has grown from 4402 to 4403 extents
11/27/04 18:39:22:AC2_PROD_8.XIE1F_ENTITYHIST. object has grown from 2576 to 2577 extents
11/27/04 18:39:22: 11/27/04 18:39:22:To learn more about this monitor go to: http://dumbo.ch.oracle/oramonsupport.asp?monitor=object_extent_growth
11/27/04 18:39:22ending mail to D:\ORACLE\ADMIN\oramon\alert.mail distribution
11/27/04 18:39:24:Mail sent
11/27/04 18:44:16:ERROR#************* MONITOR: ora_parameter **************
11/27/04 18:44:16:ERROR#'('%PARAM_NAME%' ne 'open_cursors' and %PARAM_PCT_FREE% >= 6 and %PARAM_PCT_FREE% < 21)' (evaluated: '('db_files' ne 'open_cursors' and 19 >= 6 and 19 < 21)') is violated.
11/27/04 18:44:16:ERROR# PARAM_NAME: db_files
11/27/04 18:44:16:ERROR# ID:
11/27/04 18:44:16:ERROR# PARAM_CUR_VALUE: 205
11/27/04 18:44:16:ERROR# PARAM_MAX_VALUE: 256
11/27/04 18:44:16:ERROR# PARAM_PCT_FREE: 19
11/27/04 18:44:16:ERROR#**** Skipping mail for 'db_files@1'
11/27/04 18:44:16:ERROR#***** The following mail will not be delivered
11/27/04 18:44:16:ERROR#'db_files' init.ora parameter (current: 205, max: 256) has low resource free%: 19. This is a symptom of incorrect init.ora 'db_files' parameter setting.
|
|
|
|
|
I'd imagine that you'd use regular expressions to capture the text you need.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hi..what are regular expressions? i'd like to extract the lines between the warning or critical error and the line before the blank space after the time stamp
|
|
|
|
|
Google is your friend. MSDN also has a lot of info on regular expressions.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hello,
I have this problem with the windows form. Whenever I travel from a Form A to Form B the screen would actually flick for a while before loading Form B. And whenever I execute a commandbutton to get details from the database to load it in a form, that particular form would actually flick or turned to be a blank white screen while loading is taking time.
So, how do I actually solve this flicking problem and the form that turns out to be a blank white screen whenever a command button has been executed to get details from the database?
Help me out, please...
~MicDevNet~
|
|
|
|
|
Assuming that you're not doing any complex drawing ( where double buffering is the answer ), it sounds like your DB calls are taking so long that your drawing is suffering. The answer is to do your business logic in a seperate thread. Then your UI thread will be free to respond promptly to paint messages.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Yes i am actually running the hitting of database and it's bizness logic on a separate thread.
I heard that i can actually use something like DoEvent on something then to ensure that the screen will still maintain at it's status as before while loading the new data in the datagrid... any idea as to how to use the DoEvent thing...?
~MicDevNet~
|
|
|
|
|
Application.DoEvents()
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Yeah... it's working already.. thanx.. wow.. just a simple line of code and the flicking actually goes away.. hahahah.. thanx very much...
~MicDevNet~
|
|
|
|
|
I have an Access Database to read from.
this is query15:
SELECT TempData.ID, TempData.TemplateID, TempData.Images
FROM TempData
WHERE (((TempData.Size)="15x15"));
It is filling an imagelist with image names from the database. The currently working code is as follows:
Dim ImageList1 As New ImageList()
Dim Count As Integer
Dim Path As String
Temp15Adapter.Fill(TempDS151)
ImageList1.Images.Clear()
Aspect = "15x15\"
If Aspect = "" Then MsgBox("oops", MsgBoxStyle.Information)
For Count = 1 To TempDS151.Query15.Count
Path = TempDS151.Query15(Count - 1).TemplateID
ImageList1.Images.Add(Image.FromFile("C:\Adobe Project\Icons\" & Aspect & Path & ".jpg"))
Next Count
For Count = 1 To TempDS151.Query15.Count
Path = TempDS151.Query15(Count - 1).TemplateID
ListView1.Items.Add(Path)
Next Count
ListView1.LargeImageList = ImageList1
For Count = 0 To TempDS151.Query15.Count - 1
ListView1.Items(Count).ImageIndex = Count
Next Count
ListView1.View = View.LargeIcon
ListView1.Update()
Me.Update()
What I need to do now is filter the queries on TempData.Images depending on a listbox choice (1..12). I would hate to make 12 queries because I will also have to make a similar change to the TempDS151 dataset (for other than 15x15). This is my first adventure with database useage, so I am doing thing 1 step at a time. My initial question may hold up, or I may be shortsighted on my question. Anyone have some help as to which route to travel? I labored a few days just to get THIS to work, so any confusing suggestions will need some kind of example or at least written "For Dummies"
Thanks in advance...
Let me know if I am missing any pertinant info.
David M. LevineX|
|
|
|
|
|
Would your code be simpler like this:
Dim newListViewItem As ListViewItem
For Count = 0 To TempDS151.Query15.Count - 1
Path = TempDS151.Query15(Count).TemplateID
ImageList1.Images.Add(Image.FromFile("C:\Adobe Project\Icons\" & Aspect & Path & ".jpg"))
newListViewItem = ListView1.Items.Add(Path)
newListViewItem.ImageIndex = Count
Next Count
ListView1.LargeImageList = ImageList1
ListView1.View = View.LargeIcon
ListView1.Update()
Me.Update()
What are you trying to do? I can't seem to get my brain around what your doing and what your database is for.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Simpler version is true.
The database contains a list of Template IDs and the number of photographs in that template. The thumbnails of the template show in the list box along with thier IDs. I need to be able to change the contents of the listbox depending on which aspect ratio the album is (15x15 vs 11x14) and how many photos they need to place. The reason for using a database is so I can add templates at will without rewriting the code.
|
|
|
|
|
The process cannot access the file "\\cvspwcora010\d$\oracle\Admin\log\oramon_marsprod.log" because it is being used by another process.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.IOException: The process cannot access the file "\\cvspwcora010\d$\oracle\Admin\log\oramon_marsprod.log" because it is being used by another process.
Source Error:
Line 27: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 28: Dim myFileReader As System.IO.StreamReader
Line 29: myFileReader = System.IO.File.OpenText("\\cvspwcora010\d$\oracle\Admin\log\oramon_marsprod.log")
Line 30: Dim myString As String
Line 31: myString = myFileReader.ReadToEnd
hi.. any idea why this happens? thanks
|
|
|
|
|
Yeah, you're trying to open a text file that is already open by another process. It's possible that this has been caused by a rogue process from a previous debug attempt - happens to me from time to time, and I close the project and reopen, in VS. Not that I go around writing to text files in my web apps, of course.....
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
yeah.. but how can i possibly access the file? a separate process is also accessing the text file
|
|
|
|
|
Then you're screwed. It just doesn't work. I dunno if you can open it if you specify read only access, but I don't think so.
It may be possible under Linux.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
oh i see.. thanks for the help anyway...
regards,
leny
|
|
|
|
|
Sounds like a stupid question...but i seriously cannot figure it out. i am new at VB.NET and i know a bit of C++, but i am having a hard time with VB because it is so different (i still havent grasped the concept of object-oriented programming).
|
|
|
|
|
Hello,
To close your application using code, all that you need to do is use:
Me.Close()
Or:
End
However, Me.Close() is better because it allows the application to finish "garbage collecting".
Programmer2k4
My sig:
"The so-called 'Bugs' do not exist, they are merely features hidden by developers with message boxes that say 'An unhandled exception has occurred'." - Programmer2k4
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
I now use my CodeProject Blog!
|
|
|
|
|
thanks. i was going a little crazy trying to figure it out. say--would you know how to set the desktop picture given a filename?
|
|
|
|
|
does anybody know how i can create a variable?
I mean the VB version of doing this in C++:
int arrayname[length]
and
does anybody know how i can have the user open a picture file and change the desktop picture?
|
|
|
|
|
The VB version is:
Dim arrayname(length) as integer
and
you have to be more specific with that
|
|
|
|
|
You're coming to VB from C++, and the main problem is you don't understand OO ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|