Sql executes in Oracle SQL Developer, but does not run in the C #

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

This SQL when executed in oracle does the insertion but in the implementation of the error

  

ORA-00933: SQL command not properly terminated;

What can it be?

Solved just by taking the semicolon at the end of sql.

Another question that has now arisen with parameters, #

    
asked by anonymous 31.01.2018 / 14:20

1 answer

1

It's quite simple indeed

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 check that I have removed only a semicolon from your string because it can not be interpreted.

    
31.01.2018 / 14:26