Karthick Sp
New member
- Joined
- Dec 18, 2011
- Messages
- 1
- Programming Experience
- Beginner
I get the following error when this code is executed
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim myConnection As New OracleClient.OracleConnection("Data Source=karthi;User ID=scott;Password=tiger")
Dim myInsertQuery As String = "update " + ComboBox2.Text + " set question='" + TextBox1.Text + "',unit=" + TextBox2.Text + ",diff='" + TextBox3.Text + "' where " + "qno=" + DataGridView1.CurrentRow.Cells.Item("qno").Value.ToString + ";"
Dim myCommand As New OracleClient.OracleCommand(myInsertQuery)
myCommand.Connection = myConnection
myConnection.Open()
myCommand.ExecuteOracleNonQuery(1)
myCommand.Connection.Close()
End Sub
ERROR MSG:
ORA-00911: invalid character
the connectivity is working properly....
i'm sure there is something wrong with the query plz provide solution....i tried to execute the same query in oracle 9i in the sql plus prompt it executes without any problem ...plz help...
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim myConnection As New OracleClient.OracleConnection("Data Source=karthi;User ID=scott;Password=tiger")
Dim myInsertQuery As String = "update " + ComboBox2.Text + " set question='" + TextBox1.Text + "',unit=" + TextBox2.Text + ",diff='" + TextBox3.Text + "' where " + "qno=" + DataGridView1.CurrentRow.Cells.Item("qno").Value.ToString + ";"
Dim myCommand As New OracleClient.OracleCommand(myInsertQuery)
myCommand.Connection = myConnection
myConnection.Open()
myCommand.ExecuteOracleNonQuery(1)
myCommand.Connection.Close()
End Sub
ERROR MSG:
ORA-00911: invalid character
the connectivity is working properly....
i'm sure there is something wrong with the query plz provide solution....i tried to execute the same query in oracle 9i in the sql plus prompt it executes without any problem ...plz help...