Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I create two table in my oracle (11g) database like this:

    create table "test" ("id" int);
    create table test ("id" int);

Then in my C# program there is a problem :

    OracleConnection conn = new OracleConnection(-myConnectionString-);
    conn.Open();
    OracleCommand command = new OracleCommand("select * from test;", conn);
    var v = command.ExecuteReader(); 
    OracleCommand command = new OracleCommand("select * from "test";", conn);
    var v = command.ExecuteReader(); 

for both command.ExecuteReader() I have an "ORA-00911: invalid character" error.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
422 views
Welcome To Ask or Share your Answers For Others

1 Answer

Remove ; (semi-colon) from the end of SQL string


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...