Sql runs on Oracle SQL Developer, but does not run on C#

Asked

Viewed 2,668 times

2

vsql = @"INSERT INTO ALUNOS_ (UF, IDADE, TELEFONE, NOME_PAI, ENDERECO, EMAIL, 
                             NOME, CIDADE, NOME_MAE)
        values ('sp', 0,'','','','','','','');";

This SQL when running on oracle does the insertion but in the application of the error

ORA-00933: SQL command not closed properly;

What can it be?

Solved just by taking the point and comma at the end of sql.

Another doubt that came up now with parameters, Sql runs on Oracle SQL Developer, but does not run on C application#

1 answer

2


It’s quite simple actually

Your sql:

vsql = @"INSERT INTO ALUNOS_ (UF, IDADE, TELEFONE, NOME_PAI, ENDERECO, EMAIL, 
                             NOME, CIDADE, NOME_MAE)
        values ('sp', 0,'','','','','','','');";

Functional sql;

vsql = @"INSERT INTO ALUNOS_ (UF, IDADE, TELEFONE, NOME_PAI, ENDERECO, EMAIL, 
                             NOME, CIDADE, NOME_MAE)
        values ('sp', 0,'','','','','','','')";

You can verify that I have only removed a point and comma from your string, as it cannot interpret.

  • KKK Face I’m two days into this, thanks. But another problem persists, I will put here.

  • @Brunovinicius If different mark this as solved and create another question

  • I’m new here, how do I mark as solved?

  • Already scored just set the bias

Browser other questions tagged

You are not signed in. Login or sign up in order to post.