Jump to content
Xtreme .Net Talk

Leeus

Avatar/Signature
  • Posts

    50
  • Joined

  • Last visited

Everything posted by Leeus

  1. Hi all, I just opened up MS Access and saw that I could read in a table containing public folder information! Is this possible in VB.NET, is there a guide/code samples anywhere?
  2. You can't just reference the color.blue directly, you can if you imported system.drawing Otherwise it would be system.drawing.color.blue.
  3. yes and they worked, they also work on the server if i manually place a file in the M:\ drive!! But when Exchange is doing its business it doesn't work!
  4. I have created a windows service that notifies via a net send when a file is created, tested on mymachine and it works fine. Put onto the server and changed the directory to point to my exchange servers M:\ drive and no notifications....however..... when I manually put a file on my M:\ drive I get notified!!!!!! Strange, I have made the service log on as the admin and the admin has full rights, I also tried Local system and no joy either!!!
  5. Leeus

    Repaint

    Doh, of course, thanks.
  6. Is there a way to repaint a whole form, at the moment I use control.update and it reappears but is there a way to do this to all controls on a form??
  7. No seriously, its not going to be used for hacking, I work for an isp and we have huge issues with our customers being open for relay, so this app just checks for that! I could have plumbed in our ip ranges but is seems to do the trick! Thanks guys!
  8. Thanks, not quite for hacking but preventing it! ;)
  9. what does it need to be then?
  10. I used that code and on the first line of the loop (For Each l In ListView1.Items ) I get the following error: An unhandled exception of type 'System.InvalidCastException' occurred in RelayCrawler.exe Additional information: Specified cast is not valid. I'm going crazy!
  11. Has anyone got a function to add a number to an ip address? I want it to cope with once it reaches 254 to increment the previous octet also?!?
  12. Me too!!!
  13. No notepad is not open, the only reason I mentioned it was to prove the file could be opened. The file is a log file constantly being written to.
  14. Just tried that and still same error!
  15. Notepad takes ages but opens the file the VB program gives this error! "The process cannot access the file "c:\mail\Log\PT030928.LOG" because it is being used by another process." I have adapted the code as follows but still doesn't work! Dim sr As New StreamReader(New FileStream(filelocation, FileMode.Open, FileAccess.Read))
  16. The file we are talking about is a 1.3 gig text file, notepad takes an age to open it! I can't see how to adapt it for my code?? txtfilename.Text = txttype.Text & txtdate.Text & ".LOG" Dim filelocation As String = "c:\mail\Log\" & txtfilename.Text Dim sr As New System.IO.StreamReader(filelocation) And then I have to do a readline to read the text file in, this is within a look until readline = nothing
  17. I am trying to open a txt file in a project using the .openfile command within the IO namespace, this works fine but when I try and use it on a file that is being written to it won't let me!! That is understandable but notepad seems to manage it!! Can I do this by opening it in read only mode or something??
  18. txtfilename.Text = txttype.Text & txtdate.Text & ".LOG" Dim filelocation As String = "c:\mail\Log\" & txtfilename.Text Dim sr As New System.IO.StreamReader(filelocation) Dim Line As String Dim vals() As String Dim threads() As String Do Line = sr.ReadLine() If Line Is Nothing Then Exit Do vals = Line.Split(" ") If InStr(Line, txtsearch.Text) > 0 Then If Len(vals(7)) = 5 Then txtmessage.Text += vals(7) & vbCrLf 'txtmessage.Text = Line 'I want action here!!! End If End If Loop While Not Line Is Nothing sr.Close() This works fine so far and retrieves a value in vals(7), at that point I want to go back through the message and find all lines containing that value. Bear in mind I can find several values for vals(7). I can't think of a way of doing it???
  19. I have a database for my support guys and it will show the date opened and the date closed. What I want is a query that will return all of today's closed items, for the past seven days. This is how it is at the moment. select * from support where dateclosed = getdate() What I suppose my question is how do I run all "n" SQL statements and get them into a readable form most efficiently???
  20. Dim connstring As String = "data source=DBSERVER;initial catalog=FastTrack;integrated security=SSPI;persist security info=False;workstation id=LEEUS;packet size=4096" Dim sqlcon As New SqlConnection(connstring) Dim i As Integer Dim arr() As Integer Dim cmdsql As New SqlCommand() Dim dr As SqlDataReader For i = 0 To 7 sqlcon.Open() cmdsql.CommandText = "select count(*) as counted from support where DateDiff(""d"",dateclosed,getdate()-" & i & ") = 0" 'cmdsql.CommandText = CommandType.Text cmdsql.Connection = sqlcon dr = cmdsql.ExecuteReader Do While dr.Read arr(i) = dr.Item("counted") Loop dr.Close() Label1.Text += arr(i) sqlcon.Close() Next i I keep getting ExecuteReader: Connection property has not been initialized. And am I going about this in the right way!???
  21. I just had a quick play with this tool and it looks quite interesting. Is there a way I can use a vb.net app to click buttons in a program, i.e. and a very basic. Click the save button in word, getting these ID's from spy++
  22. Leeus

    Speed Test

    I want to be able to create a speed test for ADSL connections. One similar to http://sod.ms/fast. I assumed I could never do it in pure ASP without some clientside JS, but now that ASP.net is here I thought that I might be able to use a timer. Has anyone got any thoughts on this to get me sorted, even just a rough outline??? Cheers
  23. You have to specify your outgoing mail server, just copy yuor settings from Outlook really, bear in mind it needs to be open for relay from your ip, i.e. the server I specified will not work for you!
  24. You could just copy the directory with all the files in??
  25. Thanks, I was being a muppet!
×
×
  • Create New...