T
Tim
Hi, I'm kinda new to Dot Net in general and I'm trying to see if I can
get some Connection stuff in a mesage box.. Well, I tried this code and
I get an error that says " Type SQL Connection is not Defined" .. I have
the System.Data reference in solution explorer, but I'm not sure what
references I need? Maybe that isn't the problem, and if not, can someone
tell me what it is?
Thanks in advance
Tim
Code: ----------------------------------------------------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim myConnection As New SqlConnection
myConnection.ConnectionString = "Persist Security
Info=False;Integrated
Security=SSPI;database=levelheadedbobdb;server=sql11.mySQLserver.com;Connect
Timeout=30"
myConnection.Open()
MessageBox.Show("ServerVersion: " + myConnection.ServerVersion _
+ ControlChars.Cr + "State: " + myConnection.State.ToString())
myConnection.Close()
End Sub
---------------------------------------------------------------------------------------
get some Connection stuff in a mesage box.. Well, I tried this code and
I get an error that says " Type SQL Connection is not Defined" .. I have
the System.Data reference in solution explorer, but I'm not sure what
references I need? Maybe that isn't the problem, and if not, can someone
tell me what it is?
Thanks in advance
Tim
Code: ----------------------------------------------------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim myConnection As New SqlConnection
myConnection.ConnectionString = "Persist Security
Info=False;Integrated
Security=SSPI;database=levelheadedbobdb;server=sql11.mySQLserver.com;Connect
Timeout=30"
myConnection.Open()
MessageBox.Show("ServerVersion: " + myConnection.ServerVersion _
+ ControlChars.Cr + "State: " + myConnection.State.ToString())
myConnection.Close()
End Sub
---------------------------------------------------------------------------------------