Skip to Main Content

Oracle Developer Tools for Visual Studio

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

insert value to oracle database in VB.net

485331Apr 29 2006 — edited May 4 2006
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!!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2006
Added on Apr 29 2006
2 comments
3,510 views