0

Im using ASP Classic to connect to a database and when I try to execute a proc that doesnt exist, the error is never return and the SQL Profiler stay calling the:

SET FMTONLY OFF
SET FMTONLY OFF
SET FMTONLY ON  EXEC gpa_proctest_  SET FMTONLY OFF
SET FMTONLY ON  EXEC gpa_proctest_  SET FMTONLY OFF

And my web aplication stay waiting for the error.

Here is my ASP:

set cmd = Server.CreateObject("ADODB.Command")        
cmd.ActiveConnection = conn 'connection string
cmd.CommandText = "gpa_proctest_"
cmd.CommandType = adCmdStoredProc

cmd.Parameters.Append cmd.CreateParameter("@ID_PRJ", adInteger, adParamInput, , 33)
cmd.Parameters.Append cmd.CreateParameter("@LINHA", adChar, adParamInput, 1, "A")

set Rs1 = Server.CreateObject("ADODB.RecordSet")
Rs1.CursorLocation = adUseServer
Rs1.CursorType = adOpenStatic

Rs1.Open cmd

Can anybody help me?

Tks.

Onaiggac
  • 551
  • 1
  • 6
  • 21

1 Answers1

0

I can't seem to post comments, only answers, so sorry for this.

If you remove "SET FMTONLY" all together, do you get the same issue? If not, then try using SET FMTONLY within the stored proc instead of the outside it. This may help you get the error your looking for when the proc isn't there.

Chizl
  • 2,004
  • 17
  • 32
  • Im not using FMTONLY, I never use this command but the Profiler shows that this is executing in background maybe. But, I discovery the real problem is about the ON ERROR RESUME NEXT (ASP Classic). This is causing the strange loop and freenzing my database. – Onaiggac Nov 27 '12 at 16:14
  • What type of SQL provider are you using? e.g. SQLOLEDB – Chizl Nov 27 '12 at 22:11
  • Im not setting the Provider on my connection string: conn = "Driver={SQL Server}; Server=" & conn_server &"; Database="& conn_database &"; UID="& conn_uid &"; PWD="& conn_pwd – Onaiggac Dec 14 '12 at 14:04