by following code, i want to an Email address to DB, defined to Varchar2. when I got a value by TextBox, for example: input "xxx@hotmail.com",
error like:Unspecified errorORA-04054: database link HOTMAIL.COM does not exist
only if remove "@" the value will be insert successfully, however it is not a standard email address format, how to handle it?
Connect()
Dim myCommand As New OleDb.OleDbCommand
myCommand.CommandText = "INSERT INTO register VALUES (" & _
"111" & ", " & _
"5555555" & ", " & _
Me.TextBox2.Text & ") "
myCommand.CommandType = CommandType.Text
myCommand.Connection = myConnection
Dim myRecAffected As Integer
Try
myRecAffected = myCommand.ExecuteNonQuery
If myRecAffected = 1 Then
Me.TextBox1.Text = "Successful insertion"
Else
Me.TextBox1.Text = "Insertion did not work well"
End If
Disconnect()
Catch ex As Exception
Me.TextBox1.Text = ex.Message
End Try
Any help will be appricated!!!