I have written a stored proceedure for MSSQL that needs to run for hours at
a time. I need to execute it from C++ code. The current code does:
nRet = SQLDIRECTEXEC(hstmt, "exec stored_proc", SQL_NTS)
followed shortly after by a
Free_Stmt_Handle(hstmt) //roughly
The stored proc currently dies with the statement handle, not fully
populating the table I need it to.
I need to either know when the proc finishes so I can close the handle after
that, or allow the proc to run independently on the server no matter what
the program is doing (is exited, etc), either of these is fine.
Please Help! Thanks in advance!
Joseph