Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. create table Mesa
  2. (
  3. cod number(5)not null,
  4. nome VARCHAR2(20)not null,
  5. ativa VARCHAR2(20)not null,
  6. inativa VARCHAR2(20)not null,
  7. Ativo number(03)not null,
  8. constraint PK_cod_Mesa PRIMARY KEY(cod)
  9. );
  10.  
  11. public void Gravar()
  12. {
  13. string strQuery;
  14. strQuery = "INSERT INTO Mesa";
  15. strQuery += (" VALUES(");
  16. strQuery += ("seq_mesa.NEXTVAL,");
  17. strQuery += ("'" + _nome + "',");
  18. strQuery += ("'" + _ativa + "',");--campo onde irei salvar o ativa ou inativa
  19. strQuery += ("'1'");
  20. strQuery += (")");
  21.  
  22. clnBancoDados ObjClnBancoDados = new clnBancoDados();
  23. ObjClnBancoDados.ExecutaComando(strQuery);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement