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 - 2002-02-07 : 10:23:32
|
| writes "I'd like to create a stored procedure that can return records to both an API client(ODBC, OLE DB, ADO, etc.) and a T-SQL batch (another stored procedure). For the T-SQL batch part, you must use a CURSOR type VARYING OUTPUT stored procedure parameter. However, an API client cannot bind to a CURSOR data type. So, the following simple example statements would be necessary:For an ADO client call: Set rs = cn.Execute("EXEC <sp name>")For a T-SQL batch call: EXEC <sp name> @<local var> = @<sp param>As you can see, the ADO client call omits the OUTPUT parameter.How do you set a default value for a CURSOR type OUTPUT stored procedure parameter so that it can be omitted from an EXECUTE statement? " |
|
|
andre
Constraint Violating Yak Guru
259 Posts |
Posted - 2002-02-07 : 10:30:52
|
| You don't need to use a cursor to return records from a stored procedure. If your query has records, they will be returned by the stored procedure to T-SQL and ADO. |
 |
|
|
|
|
|