Sub btnSync_Click
If lblStation.Text="" Or lblStore.Text="" Then
Msgbox("Please Congigure the Parameters", "Sync")
Return
End If
Connection
End Sub
Sub Connection()
Try
sqlServer.Close
If SqlPort="" Then
SqlPort="1433"
End If
If SqlInstance="" Then
sqlServer.Initialize("net.sourceforge.jtds.jdbc.Driver", "jdbc:jtds:sqlserver://" & SqlIpAddress & ":" & SqlPort & ";databaseName=" & SqlDatabase & ";user=" & SqlUserName & ";password=" & SqlPass & ";")
Else
sqlServer.Initialize("net.sourceforge.jtds.jdbc.Driver", "jdbc:jtds:sqlserver://" & SqlIpAddress & ":" & SqlPort & ";databaseName=" & SqlDatabase & ";instance=" & SqlInstance & ";user=" & SqlUserName & ";password=" & SqlPass & ";")
End If
lblExpirationDate.Visible=False
lblProgress.Visible=True
progressSync.Visible=True
progressSync.Progress=0
Sleep(500)
CreateTables
syncDatabases
Catch
Log(LastException.Message)
MsgboxAsync("Please check your Connection.", "Connection Error")
End Try
End Sub