-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUtilities.vb
35 lines (22 loc) · 981 Bytes
/
Utilities.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Imports System.Data.SqlClient
Imports System.Configuration
Public Class Utilities
Dim cn As SqlConnection
Dim oCommand As SqlCommand
Dim dr As SqlDataReader
Private Sub Utilities_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Private Sub btnImportBusinesses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImportBusinesses.Click
Dim strSql As String = "select distinct left(bnkTranName,20) from tblMorrisTransactions where not left(bnkTranName,20) in"
strSql += "(Select distinct BusLeftName FROM tblBusiness)"
cn = New SqlConnection(ConfigurationManager.ConnectionStrings("MorrisDevStr").ConnectionString.ToString)
oCommand = New SqlCommand(strSql, cn)
cn.Open()
dr = oCommand.ExecuteReader()
If dr.HasRows Then
While dr.Read
End While
dr.Close()
End If
End Sub
End Class