-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGetMorris.vb
29 lines (22 loc) · 958 Bytes
/
GetMorris.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
Imports System.Data.SqlClient
Imports System.Configuration
Public Class GetMorris
Dim cn As SqlConnection
Dim oCommand As SqlCommand
Private Sub GetBank_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Me.AcceptButton = btnGo
Dim myDate As Date
Dim strSql As String = "Select Max(jnlTrandate) from tblDrJournal"
'Dim myString As String = CType(myDate.Date, String)
cn = New SqlConnection(ConfigurationManager.ConnectionStrings("MorrisDevStr").ConnectionString.ToString)
cn.Open()
oCommand = New SqlCommand(strSql, cn)
myDate = CType(oCommand.ExecuteScalar(), Date)
cn.Close()
Dim myString As String = CType(myDate.Date, String)
lblBrowse.Text += myString
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
End Class