Hi guys,
I'm not sure if I posted this in the right area but here goes. I want to connect to a SQL Database remotely located on my website (eg. abc.net) and this is the code I am using
I have enabled remote connection on the server and I can connect to it using TOAD. Any help would be appreciated
I'm not sure if I posted this in the right area but here goes. I want to connect to a SQL Database remotely located on my website (eg. abc.net) and this is the code I am using
VB.NET:
Imports System.Data.SqlClient
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
Dim connection As SqlConnection
connection = New SqlConnection()
connection.ConnectionString = "Server=abc.net; Uid=abc_username; Pwd=password; Database=abc_db;"
Try
connection.Open()
MessageBox.Show("Connection Opened Successfully")
connection.Close()
Catch mysql_error As SqlException
MessageBox.Show("Error Connecting to Database: " & mysql_error.Message)
Finally
connection.Dispose()
End Try
I have enabled remote connection on the server and I can connect to it using TOAD. Any help would be appreciated