Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,457
    Thanks
    15
    Thanked 0 Times in 0 Posts

    best connection - asp to sql

    What's the best way for me to run a sql server stored procedure that will quickly open the db, run the sql and close the db?

    There will be many connections simultaneously? What is the best recordset connection type to use?

  • #2
    New Coder
    Join Date
    Jun 2003
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    why do you need a recordset? does your sql stmt return any data?

  • #3
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    If you are using ASP Classic, then you should just be able to create an ADODB connection, use the execute method to call your stored procedure and then close the connection. You could do it in 3 lines.
    OracleGuy

  • #4
    New Coder
    Join Date
    Jun 2003
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if you are using ASP.NET it's still the same 3 lines

    cnn.Open()
    cmd = New OleDbCommand("yourStoredProcedure", cnn)
    cmd.CommandType = CommandType.StoredProcedure
    cmd.ExecuteNonQuery()


  •  

    Posting Permissions

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