Problems with asp, retrieval of value returned from a stored procedure

0

Good afternoon, I'm having trouble retrieving a value returned in a stored procedure. The database is sql server.

The procedure executes an insert and returns the id of this data, however I can not retrieve 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%>

Someone could tell me if something is wrong with the code or another way to do this in asp.

obs: my asp knowledge is very limited.

    
asked by anonymous 07.12.2016 / 20:37

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 this function and it worked perfectly.

    
09.12.2016 / 19:49