Stored Procedures & ASP help

Results 1 to 3 of 3

Thread: Stored Procedures & ASP help

  1. #1
    Join Date
    Dec 1969

    Default Stored Procedures & ASP help

    My stored procedure book is next to hopeless and I&#039;m clearly putting the wrong questions into google as I&#039;m stuck for clues.<BR><BR>I have the following stored procedure:<BR><BR>CREATE PROCEDURE dbo.spPutData <BR> @id int<BR>AS<BR>BEGIN<BR> insert tblData values (@id)<BR><BR>END <BR><BR>and I call it from my asp using the following code<BR><BR>mystrSQL = "exec spPutData @id=" & request("id")<BR><BR>However, I want to add a timestamp for each time this procedure is called. <BR><BR>I have tried passing a second parameter with the value of now() but I can&#039;t get the syntax right. As an alternative is it possible just to add the timestamp directly from the stored procedure?<BR><BR>Your help would be appreciated

  2. #2
    Join Date
    Dec 1969

    Default Couple of things.

    First, do some debugging.<BR><BR>Show yourself EXACTLY what your SQL statement is that you&#039;re executing:<BR><BR>Response.Write "mystrSQL = " & mystrSQL & "&#060;br /&#062;"<BR><BR>Then, what is the code where you execute this SQL statement?<BR><BR>And lastly, what is the EXACT error that you&#039;re getting?

  3. #3
    Join Date
    Dec 1969

    Default Also...

    just add the timestamp in the sproc. Make sure you have a field, and then just insert getDate() in there...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts