Home
Manage Your Code
Snippet: Threading a Sql update (VB.NET)
Title: Threading a Sql update Language: VB.NET
Description: This one is simpler than most Views: 157
Author: Tom Baggett Date Added: 1/30/2012
Copy Code  
1Imports System.Threading
2'threadSub
3Dim op As New ParameterizedThreadStart(AddressOf CreateSQLCompany)
4            Dim newThread As New Thread(op)
5            newThread.Start(sqlCompany)
6'end thread sub
7
8Private Sub CreateSQLCompany(ByVal comp As Object)
9        Try
10            CompanyInfoData.Instance.CreateSql(comp)
11        Catch ex As Exception
12            MsgBox("There was an error: " & ex.Message & ex.StackTrace)
13        End Try
14End Sub
15 
16Private Delegate Sub UIdelegate()