0

I'm developing a web aplication where I just have to pass 5 parameters to a Visual Basic 6 method compiled on a DLL. The following parameters are:

IdReport As Long
IdModel As Long
rsFilter As ADODB.RecordSet
stUser As String

My problem is when I comment the line

olist.ListReport CLng(request("REP_ID")), CLng(request("RMO_ID")), list, CStr(session("MM_Domain") & "\" & session("MM_User"))

the aplication works perfect and doesn't show error 500 on the browser. When I uncomment the line I'm getting error number 500 and I can't detect the cause even I check the syntax using sublime text and Visual Studio.

This is the ASP Classic code:

<%
Dim olist
Set olist = Server.CreateObject("cisft_Customers.Reports")

Dim list
Set list = Server.CreateObject("ADODB.Recordset")
Set list = olist.GetStructure()  'returns an empty recordset with the structure of the table from database

Dim array_list
array_list = Split(request("list"), ".")

Dim i
Dim list_item

i = 0
Do While i < IBound(array_list) + 1
    &nbsp; list_item = Split(array_list(i),"_")
    &nbsp; list.AddNew
    &nbsp; list("CustomerId") = CInt(list_item(0))
    &nbsp; list("CustomerOperator") = CInt(list_item(1))
    &nbsp; list("Ref_Value") = CStr(list_item(2))
    &nbsp; i = i + 1
Loop

If list.recordcount > 0 Then
    list.MoveFirst
End If

olist.ListReport CLng(request("REP_ID")), CLng(request("RMO_ID")), list, CStr(session("MM_Domain") & "\" & session("MM_User"))

response.write(Err.Number & "-" & Err.Description)

response.end
%>
Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
  • There isn't enough to help us help you... you'll need to turn on detailed errrors. but just off the top of my head ... you might have a value in your `request("...")` that won't cast to `cLng`... so print those values out using response write... Also provide us with documentation on the object "cisft_Customers.Reports" – GWR Apr 06 '17 at 18:31
  • Thanks for the asnwer. Finally i've resolved it by my own, i wrote on error resume next in first line of code and it worked. cisft_Customers.Reports is the dll generated by me. cisft_Customers is the name of the dll and Reports is the name of the class. Next time I'll be more clear to ask – Marcos Gonzalez Apr 06 '17 at 20:37
  • 4
    Your error isn't "fixed" with `On Error Resume Next` - it is simply ignored. The error (whatever it was, still occuring - just not halting execution) – GWR Apr 06 '17 at 22:45
  • You're getting the 500 error screen. Do you know how to configure IIS to get detailed error messages for Classic ASP - http://stackoverflow.com/questions/2640526/detailed-500-error-message-asp-iis-7-5 – John Apr 07 '17 at 14:50

0 Answers0