Skip to Main Content

SQL & PL/SQL

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!

ora 00933 for simple query

1d3e6cee-56ab-4f7d-b893-93f955a56fecNov 3 2016 — edited Nov 3 2016

This is a repost of a question in a thread from yesterday. It was originally tacked on to another question It was suggested that it should be a separate thread.

I have this code in a WPF vb.net program. I am developing in VS 2015 on a Win 10 system.

Imports System.Data

Imports Oracle.DataAccess.Client

Imports Oracle.DataAccess.Types

    Dim oradb As String = "Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))(CONNECT\_DATA = (SERVICE\_NAME = tinytest)));User Id=JimOra2;Password=Jimora01;"

    Dim conn As New OracleConnection(oradb)

    Dim r1 As OracleDataReader

    Dim cmd As New OracleCommand

    Try

        conn.Open()

        cmd.Connection = conn

        cmd.CommandType = CommandType.Text

        cmd.CommandText = "**SELECT \* FROM TABLE1;**"

        r1 = cmd.ExecuteReader

        MessageBox.Show(r1("FIRSTNAME"))

        r1.Close()

        conn.Close()

    Catch ex As Exception

it has a reference to this dll

pastedImage_1.png

it generates this error when the execute reader line is executed.

pastedImage_0.png

if the command: SELECT * FROM TABLE1; is copied to SQL Developer and executed, it returns two rows that were inserted into the table with SQL Developer.

pastedImage_5.png

if the ";" is left off of the statement in the vb.net code it returns

pastedImage_3.png

Why does the query work in SQL Developer and give errors when executed from the WPF vb.net code

I must be missing something really simple. I have searched the web for an answer and cannot find a clue so far.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2016
Added on Nov 3 2016
19 comments
1,046 views