Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sp_OAMethod and Bad Variable Error

Status
Not open for further replies.

Bwintech

Programmer
Jan 25, 2002
25
0
0
GB
Hiya

I am trying to execute a COM objects method from T-SQL. I am using sp_OAcreate to create an instance - which is not producing an error.

The Method expects 3 variables, int, string, string. and returns a 1 or 0.

I am referencing it as below..

EXEC @hr = sp_OAMethod @object, 'OLogon', @RETURN OUT , 22,
@logon,@Password

I am constantly getting the following error:0x80020008 bad variable type - even if I hardcode the logon and passwords themselves and not through variables.

I would appreciate any help.

Much Thanks,
Brett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top