user3493093
user3493093

Reputation: 13

Oracle and Asp.net connection

I use Oracle SQL developer and I made a connection to my database with the system user, after I created a user and made a another connection when I try to run I get the SQL Error:

"ORA-01747: invalid user.table.column, table.column, or column specification"

This is my code for insert function:

    Dim sql As String = "INSERT INTO SCHEME(CODE,DESC)" & _
    " VALUES (:CODE,:DESC)"

Dim cmd As New OracleCommand(sql, conn)

cmd.Parameters.Add(New OracleParameter("CODE", txtCODE.Text))
cmd.Parameters.Add(New OracleParameter("DESC", txtDESC.Text))

Upvotes: 0

Views: 87

Answers (1)

user3559224
user3559224

Reputation:

Try this code instead of your code

Dim sql As String = @"INSERT INTO SCHEME(CODE,DESC) VALUES (@CODE,@DESC)"

Dim cmd As New OracleCommand(sql, conn)

cmd.Parameters.Add(New OracleParameter("@CODE", txtCODE.Text))
cmd.Parameters.Add(New OracleParameter("@DESC", txtDESC.Text))

and also your problem is invalid user.table.column, table.column, or column specification

So please check your table and column name...

That's it..

Upvotes: 1

Related Questions