I just use this code to input data to oracle database from vb.net.
Try
Dim mstream As New System.IO.MemoryStream()
PictureBox1.Image.Save(mstream, System.Drawing.Imaging.ImageFormat.Jpeg)
Dim arrImage() As Byte = mstream.GetBuffer()
mstream.Close()
query = "INSERT INTO ds.students (ID,NAME,PIC)" & _
"VALUES (@ID,@NAME,@PIC);"
Dim cmd As OracleCommand = New OracleCommand(query, con)
cmd.Parameters.Add("@ID", Convert.ToInt32(TextBox1.Text))
cmd.Parameters.Add("@NAME", Convert.ToString(TextBox2.Text))
cmd.Parameters.Add("@PIC", arrImage)
Try
con.Open()
cmd.ExecuteNonQuery()
TextBox1.Clear()
TextBox2.Clear()
MessageBox.Show("Added Successfully !")
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
Try
If (con.State = ConnectionState.Open) Then
con.Close()
End If
Catch ex2 As Exception
MsgBox(ex2.Message)
End Try
End Try
Catch ex As Exception
MessageBox.Show(ex.Message)
con.Close()
End Try
when I run this code it give error:
"ORA-00936- missing expression"
Please help me