Click here to Skip to main content
15,890,282 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionwindow service debuging Pin
Ebube21-Jun-08 1:34
Ebube21-Jun-08 1:34 
AnswerRe: window service debuging Pin
jzonthemtn21-Jun-08 2:06
jzonthemtn21-Jun-08 2:06 
GeneralRe: window service debuging Pin
Ebube21-Jun-08 2:29
Ebube21-Jun-08 2:29 
GeneralRe: window service debuging Pin
Ebube21-Jun-08 4:43
Ebube21-Jun-08 4:43 
AnswerRe: window service debuging Pin
Eduard Keilholz21-Jun-08 7:38
Eduard Keilholz21-Jun-08 7:38 
GeneralRe: window service debuging Pin
Ebube24-Jun-08 6:36
Ebube24-Jun-08 6:36 
AnswerRe: window service debuging Pin
Ashfield21-Jun-08 7:41
Ashfield21-Jun-08 7:41 
GeneralRe: window service debuging Pin
Ebube22-Jun-08 0:27
Ebube22-Jun-08 0:27 
when i put the thread it tell it cannot start the service. if i comment out the tread line and set break point at sub process mail. the service will start but when i point at break. i see a tooltip." the breakpoint will not currently be hit. no symbol have been loaded for this document.

pls hlp see the extract code below
Public Class testService
Private t As Timer
Dim log As New EventLog("Application", ".", "Diamond eMail Solution")
Dim cr, KeyID, sKeyID As Int32, afterLoad As Boolean
Dim panelIndex As Int32, insert As Boolean, ds As DataSet, bllclass As New baseTables, bllAdmin As New Administration
Dim myfileName As String
Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
System.Threading.Thread.Sleep(15000)
Try

t = New Timer(2000)

AddHandler t.Elapsed, AddressOf TimerFired
With t
.AutoReset = True
.Enabled = True
.Start()
End With
Catch ex As Exception
log.WriteEntry(ex.Message, EventLogEntryType.Information)
End Try
End Sub

Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your service.
t.Stop()
t.Dispose()
End Sub
'Protected Overrides Sub OnPause()
' t.Stop()
' MyBase.OnPause()
'End Sub

Private Sub TimerFired(ByVal sender As Object, ByVal e As ElapsedEventArgs)
'Working()
'getApplicationData()
ProcessMail()
End Sub
Sub ProcessMail()
'Try
Dim insert As Boolean


Dim dailydirobj As DirectoryInfo = Directory.CreateDirectory("C:\ebube")

Dim ins As String = "INSERT INTO incoming([pfaAccount] ,[fileName], sent,FullPath) VALUES('ebube','fileName','0' ,'FullPath')"
Dim con As New SqlConnection("Data Source=PRGLAP11;Initial Catalog=diamonddb;Integrated Security=SSPI")
Dim com As New SqlCommand(ins, con)
con.Open()
com.ExecuteNonQuery()
con.Close()

end sub
end class
GeneralRe: window service debuging Pin
Ashfield22-Jun-08 21:00
Ashfield22-Jun-08 21:00 
GeneralRe: window service debuging Pin
Ebube23-Jun-08 7:59
Ebube23-Jun-08 7:59 
AnswerRe: window service debuging Pin
Dave Kreskowiak22-Jun-08 6:32
mveDave Kreskowiak22-Jun-08 6:32 
GeneralRe: window service debuging Pin
Ebube24-Jun-08 19:08
Ebube24-Jun-08 19:08 
GeneralRe: window service debuging Pin
Dave Kreskowiak25-Jun-08 2:36
mveDave Kreskowiak25-Jun-08 2:36 
GeneralRe: window service debuging Pin
Ebube25-Jun-08 8:13
Ebube25-Jun-08 8:13 
Questionexe problem Pin
kadkir20-Jun-08 20:38
kadkir20-Jun-08 20:38 
AnswerRe: exe problem Pin
Christian Graus20-Jun-08 21:20
protectorChristian Graus20-Jun-08 21:20 
AnswerRe: exe problem Pin
jzonthemtn21-Jun-08 2:02
jzonthemtn21-Jun-08 2:02 
GeneralRe: exe problem Pin
kadkir23-Jun-08 19:27
kadkir23-Jun-08 19:27 
QuestionHow can I display these: ♥ ♦ ♣ ♠ , in a richtextbox? Pin
alexvw20-Jun-08 13:30
alexvw20-Jun-08 13:30 
AnswerRe: How can I display these: ♥ ♦ ♣ ♠ , in a richtextbox? Pin
Paul Conrad21-Jun-08 3:56
professionalPaul Conrad21-Jun-08 3:56 
AnswerRe: How can I display these: ♥ ♦ ♣ ♠ , in a richtextbox? Pin
alexvw21-Jun-08 13:24
alexvw21-Jun-08 13:24 
AnswerRe: How can I display these: ♥ ♦ ♣ ♠ , in a richtextbox? Pin
Thomas Stockwell23-Jun-08 15:18
professionalThomas Stockwell23-Jun-08 15:18 
QuestionVB.NET SerialPort.... Pin
Mr. J20-Jun-08 10:54
Mr. J20-Jun-08 10:54 
AnswerRe: VB.NET SerialPort.... Pin
rudemusik20-Jun-08 11:32
rudemusik20-Jun-08 11:32 
GeneralRe: VB.NET SerialPort.... Pin
Mr. J20-Jun-08 11:58
Mr. J20-Jun-08 11:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.