Connection Error: Please Help
I have the following code in my Visual Studio.Net editor:
SqlConnection1.Open()
' Dim MySqlConn As New SqlClient.SqlConnection("Server=Maxood;User ID=sa;Password=;Database=Businesses")
Dim MySqlCmd As New SqlClient.SqlCommand
MySqlCmd.CommandType = CommandType.Text
MySqlCmd.Connection = SqlConnection1
MySqlCmd.CommandText = "INSERT INTO buss_seg values('" & txtEntry.Text & "')"
MySqlCmd.ExecuteNonQuery()
SqlConnection1.Close()
When i execute this code , the following error occurs:
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error.
What is the reason.Why it happened, please help!
MAXOOD!
Life is an endless journey towards perfection
__________________
MAXOOD!
Life is an endless journey towards perfection
|