Hi i have an issue calling stored proc from ASP i can run this proc fine in Query Analyser. For some reason it wont run in my ASP. There is no error message it just wont update my table as i would expect. I have done some response.write in the code so I know its getting to this point. any ideas?
ASP:
The sp:
-Gus
ASP:
Code:
Set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = gConn
cmd.CommandText = "usp_SearchResult"
cmd.CommandType = adCmdStoredProc
With cmd
.Parameters.Append .CreateParameter("@SearchStr", adVarChar, adParamInput, 60)
.Parameters.Append .CreateParameter("@searchBroad", adBoolean, adParamInput, 0)
.Parameters.Append .CreateParameter("@Hits", adInteger, adParamInput, 0)
.Parameters("@SearchStr") = "testangus"
.Parameters("@searchBroad") = 0
.Parameters("@Hits") = 0
cmd.Execute adExecuteNoRecords
End With
Set cmd = Nothing
The sp:
Code:
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
ALTER PROCEDURE [dbo].[usp_SearchResult]
@Searchstr varchar(60),
@searchBroad bit,
@Hits int
AS
SET NOCOUNT ON
INSERT INTO [SearchResult]
(
SearchStr,
SearchBroad,
Hits
)
VALUES
(
@Searchstr,
@searchBroad,
@Hits
)
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
-Gus