I am using the following try | catch to locate an error:
Try Using conn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings("students").ConnectionString) Dim Sql As String = "INSERT INTO university (username,[password], strEmail) VALUES (@username,@password, @strEmail)" Dim cmd As New OleDbCommand(Sql, conn) conn.Open() cmd.Parameters.AddWithValue("@username", username.Text) cmd.Parameters.AddWithValue("@password", password.Text) cmd.Parameters.AddWithValue("@strEmail", strEmail.Text) cmd.ExecuteNonQuery() conn.Close() End Using Catch ex As Exception LabelMessage.Text = "There is a problem, " & ex.Message End Try
But Visual Studio 2013 does not like 'LabelMessage' so I doubt Try | Catch is working at all. 'LabelMessage' has a squiggly blue underline.
Is there anything else I can use?
The problem I have is that my form field data is inserted into my database locally, but not online on my Web site. My Web hosting service says all my server folder permissions are fine.