Dear Friends,
i have some codes below :
Then i want to access Sub KonekLokalWH() from Other Form i.e. : Form2
how can i do that ? it shows error even i already use Public Sub KonekLokalWH() :o
the error is :
Error 2 Name 'KonekLokalWH' is not declared. D:\KERJAAN\Ekspedisi\Ekspedisi\FrmTransaksi.vb 359 13 Ekspedisi
Thank you very much :)
i have some codes below :
Code:
Imports System.Data.SqlClient
Public Class FormMasterEkspedisi
Dim NewRecord As Boolean = True
Dim DataChanged As Boolean = False
Dim ObjConnection As SqlConnection
Dim ConStr As String = "Data Source=.;Initial Catalog=WH;User Id=sa;Password=sa"
Dim ObjTransaction As SqlTransaction
'...
Public Sub KonekLokalWH()
If ObjConnection Is Nothing Then
ObjConnection = New SqlConnection(ConStr)
End If
If ObjConnection.State = ConnectionState.Closed Then
ObjConnection.Open()
End If
End Subhow can i do that ? it shows error even i already use Public Sub KonekLokalWH() :o
the error is :
Error 2 Name 'KonekLokalWH' is not declared. D:\KERJAAN\Ekspedisi\Ekspedisi\FrmTransaksi.vb 359 13 Ekspedisi
Thank you very much :)