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 - 2001-06-28 : 09:06:18
|
| roy writes "i am trying to use some COM objects in a stored procedure i am writing and have great results until i call a method that returns an object... here is example code:---------------------------------------------------------CREATE PROCEDURE spTestASDeclare @cn intDeclare @cm int Declare @rs intDeclare @iRC intDeclare @EOF bitDeclare @source varchar(255)Declare @Description varchar(1000)EXEC @iRC = sp_OACreate 'ADODB.Connection', @cn OUTEXEC @iRC = sp_OACreate 'ADODB.Command', @cm OUTEXEC @iRC = sp_OASetProperty @cn, 'ConnectionString', 'driver={SQL Server};Data Source=GlobalMerchant;Connect Timeout=10'EXEC @iRC = sp_OASetProperty @cm, 'ActiveConnection', @cnEXEC @iRC = sp_OASetProperty @cm, 'CommandText', 'SELECT * FROM Locale'EXEC @iRC = sp_OASetProperty @cm, 'CommandType', 1EXEC @iRC = sp_OAMethod @cm, 'Execute', @rs OUTEXEC @iRC = sp_OAGetErrorInfo @cm, @source OUT, @description OUTSELECT @description---------------------------------------------------------the description of the error is this:"Error in parameters, or attempt to retrieve a return value from a method that doesn't supply one."can you tell me what i'm doing wrong?Thanks,Roy" |
|
|
|
|
|
|
|