Imports System.Data.Sql
Imports System.Data.SqlClient
Public Class SQLControl
Public SQLCon As New SqlConnection With {.ConnectionString = "Server=ACERES1\SQLEXPRESS;Database=TestDb;User=admin;Pwd=Admin-123;"}
'Public SQLCon As New SqlConnection With {.ConnectionString = "Server=ACERES1\SQLEXPRESS;Database=TestDb;User Id=admin;Password=Admin-123;"}
Public SQLCmd As SqlCommand
Public Function HasConnection() As Boolean
Try
SQLCon.Open()
SQLCon.Close()
Return True
Catch ex As Exception
MsgBox(ex.Message)
Return False
End Try
End Function
End Class
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE