Click here to Skip to main content
15,912,977 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: A textbox with squiggly lines in different colours Pin
dan!sh 11-Mar-09 22:53
professional dan!sh 11-Mar-09 22:53 
GeneralRe: A textbox with squiggly lines in different colours Pin
Expert Coming11-Mar-09 23:03
Expert Coming11-Mar-09 23:03 
AnswerRe: A textbox with squiggly lines in different colours Pin
Expert Coming11-Mar-09 22:34
Expert Coming11-Mar-09 22:34 
QuestionCompare data of the last day with the past 4 day’s data Pin
Dobrobit11-Mar-09 18:14
Dobrobit11-Mar-09 18:14 
AnswerRe: Compare data of the last day with the past 4 day’s data Pin
Jumping Jupiter12-Mar-09 7:05
Jumping Jupiter12-Mar-09 7:05 
GeneralRe: Compare data of the last day with the past 4 day’s data Pin
Dobrobit12-Mar-09 11:16
Dobrobit12-Mar-09 11:16 
GeneralRe: Compare data of the last day with the past 4 day’s data Pin
Dobrobit15-Mar-09 21:36
Dobrobit15-Mar-09 21:36 
GeneralRe: Compare data of the last day with the past 4 day’s data Pin
Jumping Jupiter16-Mar-09 1:43
Jumping Jupiter16-Mar-09 1:43 
QuestionInputbox triggering form_closed event Pin
Sonhospa11-Mar-09 13:48
Sonhospa11-Mar-09 13:48 
AnswerRe: Inputbox triggering form_closed event Pin
Luc Pattyn11-Mar-09 14:16
sitebuilderLuc Pattyn11-Mar-09 14:16 
GeneralRe: Inputbox triggering form_closed event Pin
Sonhospa12-Mar-09 9:26
Sonhospa12-Mar-09 9:26 
GeneralRe: Inputbox triggering form_closed event Pin
Luc Pattyn12-Mar-09 10:33
sitebuilderLuc Pattyn12-Mar-09 10:33 
GeneralRe: Inputbox triggering form_closed event Pin
Sonhospa13-Mar-09 12:21
Sonhospa13-Mar-09 12:21 
GeneralRe: Inputbox triggering form_closed event Pin
Luc Pattyn13-Mar-09 12:30
sitebuilderLuc Pattyn13-Mar-09 12:30 
AnswerRe: Inputbox triggering form_closed event Pin
Dave Kreskowiak12-Mar-09 3:47
mveDave Kreskowiak12-Mar-09 3:47 
GeneralRe: Inputbox triggering form_closed event Pin
Sonhospa12-Mar-09 9:29
Sonhospa12-Mar-09 9:29 
Questionerror propagation [modified] Pin
captainmogo11-Mar-09 9:58
captainmogo11-Mar-09 9:58 
AnswerRe: error propagation Pin
Dave Kreskowiak12-Mar-09 3:46
mveDave Kreskowiak12-Mar-09 3:46 
GeneralRe: error propagation Pin
captainmogo12-Mar-09 4:15
captainmogo12-Mar-09 4:15 
ok well my calling code is in a backgroundworker

Class1
Private Sub DoSomething(ByVal sender as Object, ByVal e as DoWorkEventArgs) Handles worker.DoWork

SetTriggerStatus(nam, id, "Started")

Query(start_time, end_time)

....Wait

Query(start_time, end_time)
End Sub
End Class

Module1
Sub SetTriggerStatus(Byval nam as String, ByVal id as Integer, ByVal status as String)
Dim connection as New Client.OracleConnection(My.Settings.OracConnectionString.ToString)
Dim cmd as Client.OracleCommand = Nothing

Try
cmd = New Clinet.OracleCommand("INSERT INTO StatusLog (Name, RuleID, Status) VALUES(:Name,
:RuleID,:Status)", connection)

....set oracleparameters
....execute script

connection.close

Finally
..dispose
End Try
End Sub
End Module


Basically if I get an error connecting to the database in here, I want it to try again. So I would have to put the try/catch around the SetTriggerStatus call from within DoWork? Same with both the query subs?) I also read somewhere that it is not good practice to be putting try/catch blocks in background workers (of course I cant find a good explanation for it now)
GeneralRe: error propagation Pin
Luc Pattyn12-Mar-09 4:54
sitebuilderLuc Pattyn12-Mar-09 4:54 
GeneralRe: error propagation Pin
captainmogo12-Mar-09 5:03
captainmogo12-Mar-09 5:03 
GeneralRe: error propagation Pin
Luc Pattyn12-Mar-09 5:23
sitebuilderLuc Pattyn12-Mar-09 5:23 
GeneralRe: error propagation Pin
captainmogo12-Mar-09 8:14
captainmogo12-Mar-09 8:14 
QuestionHow to export to word using VB 2008 Pin
Manfred ramirez11-Mar-09 8:45
Manfred ramirez11-Mar-09 8:45 
AnswerRe: How to export to word using VB 2008 Pin
Luc Pattyn11-Mar-09 9:41
sitebuilderLuc Pattyn11-Mar-09 9:41 

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.