Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    18

    Question Unanswered: Stored Procedure Waitfor command question

    The following code does work but when the stored procedure is called it takes about 10 seconds for it to load. I am not refering to the 30 minute wait before the name is deleted.

    Anyone have any ideas why the call would be so slow? Thanks.

    SERVICE CODE
    conPubs = (New SqlConnection("Server=blah blah blah")
    cmdCommand = New SqlCommand("DeleteName", conPubs)
    cmdCommand.CommandType = CommandType.StoredProcedure
    cmdCommand.Parameters.Add("@Name", Name)
    cmdCommand.Parameters.Item(0).Value = Name
    conPubs.Open()
    cmdCommand.ExecuteNonQuery()
    conPubs.Close()

    STOREDPROCEDURE CODE
    Create Procedure[DeleteName]
    @Name varchar (30)
    As
    Begin
    Set NoCount On
    WaitFor Delay "00:30:00"
    Delete From NameTable Where Name = @Name
    End
    GO

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Does this occur when you use an oledb connection (not the sqlconnection) ?

  3. #3
    Join Date
    Nov 2003
    Posts
    18

    Red face

    Both! I was using SQL. I tried OLEDB and it's a lot faster but still not fast enough to be practical. Takes about 10 seconds to queue it.

Posting Permissions

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