Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2000-10-31 : 21:07:42
|
Nathan writes "I wish to fire two stored procedures within the same connection. That is open the connection, execute stored_proc_1 and then stored_proc_2 and then close connection.
But it times out. I have use the following code:
Call OpenConn Set cmd = Server.CreateObject("ADODB.Command") Set cmd.ActiveConnection = Conn cmd.CommandText = "sp_insert_CellDetails" cmd.CommandType = adCmdStoredProc cmd.Parameters.refresh cmd.Parameters(1) = iTableID cmd.Parameters(2) = iCol cmd.Execute cmd.CommandText = "sp_insert_PDFLink" cmd.CommandType = adCmdStoredProc cmd.Parameters.refresh cmd.Parameters(1) = 11 cmd.Parameters(2) = 12 cmd.Execute Call CloseConn set cmd = nothing
The function OpenConn opens the connection and BeginTrans The function CloseConn commits the tran and closes the connection.
Cheers
Nathan" |
|
|
|
|
|