Insert With Stored Procs

Hello All!

I want to do an insert into my database using Stored procedures. I already know how to delete and select.. i'm gonna post part of my code in wich i make a select to give u gives an idea of how im doing the statements.. if there's anything wrong please let me know.

privatevoid MostrarActionPerformed(java.awt.event.ActionEvent evt){

Connection conexion;

Statement sentencia;

ResultSet resultado;

try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

}

catch (Exception e){

System.out.println("No se pudo conectar con el JDBC-ODBC");

return;

}

try{

conexion = DriverManager.getConnection("jdbc:odbc:con_sql","","" );

sentencia = conexion.createStatement();

String a = ID_E.getText();

int Empleado_ID = Integer.parseInt(a);

resultado = sentencia.executeQuery("exec x "+a);

while(resultado.next() ){

String Name = resultado.getString("Nombre");

String LastName = resultado.getString("Apellido");

Nom.setText(Name);

Ape.setText(LastName);

}

}

catch( Exception e ){

System.out.println( e );

return;

}

}

[2047 byte] By [River_Platea] at [2007-11-27 10:31:47]
# 1

you may have better luck at a good answer from the DataBase Forum. See http://forum.java.sun.com/forum.jspa?forumID=48

kris.richardsa at 2007-7-28 18:12:02 > top of Java-index,Java Essentials,New To Java...