Problems with Asp, value recovery returned from a stored Procedure

Asked

Viewed 79 times

0

Good afternoon, I’m having trouble recovering a returned value in a stored Trial. The database is sql server.

Procedure executes an Insert and returns the id of this data, however I cannot recover the id value in Asp.

   <% sql = "exec nova '86320115000189','TESTE TESTE TESTE'"
   Set rs=Server.CreateObject("ADODB.recordset")
     rs.Open sql, conn    
       codigo_avaliacao = cInt(rs("codigo"))
     rs.Close
   Set rs=Nothing 
   %>
  <%=codigo_avaliacao%>

Would someone know if there’s something wrong with the code or another way to do it in Asp.

Bs: my knowledge in Sp is very limited.

  • Leonardo is welcome to Sopt, when you say problems, what would they be? Ask your question so that it becomes clearer and so you can get an adequate answer to your problem...

  • Can you ask the question about the structure of the Procedure? The input parameters and what is the return?

1 answer

0

The problem is in the cint function, the value was returned in rs("code"), but the cint function did not return anything.

I removed that function and it worked perfectly.

Browser other questions tagged

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