Re: Fw: Help with VB & stored procedures
Posted in 1999
Mark Dont know how to do it in VB, but this is how I do it in java. try { // execute the procedure stmt.execute("EXECUTE PROCEDURE ..."); } catch (SQLException sqle) { System.out.println(sqle.getErrorCode()+": "+sqle.getMessage()); } I would expect something similar to be available in VB. In my SP, I have an error block which looks something like: begin on exception set esql, eisam raise exception esql, eisam; end exception; -- sql statement here end HTH Sujit mcollins@us.dhl.com on 09/28/99 09:25:56 AM To: Informix list <informix-list@iiug.org> cc: (bcc: Sujit Pal) Subject: Fw: Help with VB & stored procedures Apologies in advance if this has been posted previously. I've been trying to post it to the list over the last week, but have not yet seen it in the emails version of the group that I get. We are trying to execute stored procedures from within a Visual Basic program, and have managed to actually get the procedure to execute. The problem we have is that there are several places in the stored procedure that an error can be trapped, and when we trap one, we raise the -746 error condition and provide a message detailing what specific error was encountered. The problem we have is that the programmer can't retrieve the error message within the program. Does anyone have a code sample that they can share that addresses this problem? Thanks in advance. Mark Collins mcollins@us.dhl.com