...

View Full Version : best connection - asp to sql



esthera
02-02-2005, 08:28 PM
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?

esb01
02-02-2005, 08:46 PM
why do you need a recordset? does your sql stmt return any data?

oracleguy
02-02-2005, 09:44 PM
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.

esb01
02-02-2005, 10:08 PM
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()



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum