August 6, 2009 at 11:14 pm
Greetings to All!!!
I have just logged onto OLE Automation Procedures and experimenting with SP_OACreate; SP_OAMethod and SP_OASetProperty SProcs.
1.
Here I have trouble in understanding the valid values for the Parameter
'propertyname ' of sp_OASetProperty.
sp_OASetProperty objecttoken , propertyname , newvalue [ , index... ]
(Syntax pasted from BOL)
I have Googled but did not find a list of values this PropertyName Parameter considers. For instance the PropertyName considers 'HostName','LoginSecure' etc..
So, can someone list all the possible values for this parameter.
2.
When I read the body of this SProc, it was referencing to a 'odsole70.dll'. I did a search on my machine to locate this DLL , so as to add this DLL to one of Visual Studio Projects as a reference and study it, but the search yielded no results.
Please tell me how can I locate this DLL on my machine.
In Dead Memories,
[font="Comic Sans MS"]Vampire[/font]
--In 'thoughts'...
Lonely Rogue
August 7, 2009 at 12:25 pm
What are you trying to accomplish using ole automation?
Are you running SQL Server 2000 or 2005/2008? If 2005/2008 then you should look into using the SQLCLR instead of ole automation.
To answer your question. the parameters of sp_OASetProperty depend on the properties made available by the object you created with sp_OACreate. Let's say you created a server object with properties of ServerName and ServerVersion, then the in sp_OASetProperty your parameters would be:
PropertyName - would be either ServerName or ServerVersion
NewValue - would be "ComputerName" for ServerName or 9.0.3025 for ServerVersion.
Did this help?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 11, 2009 at 10:41 pm
Jack,
Thanks for the reply.
What are you trying to accomplish using ole automation?
Are you running SQL Server 2000 or 2005/2008? If 2005/2008 then you should look into using the SQLCLR instead of ole automation.
I am using SQL 2005 and trying to script out all the SProcs of all the databases. I know that there are parallel ways of achieving this task like using SMO in addition to the DMO and OLE Automation procedures. Just gaining acquaintance with these untouched Automation Procs.
Understood that the values of parameters of sp_OASetProperty depends on the object kind created with the sp_OACreate. However, the question still remains the same... what does sp_OACreate expects apart from server object.
I have browsed BOL and found that only 'SQLDMO.SQLServer' object has been mentioned.
Is my question still vague??...i guess not.
Barely Alive,
[font="Comic Sans MS"]Vampire[/font]
--In 'thoughts'...
Lonely Rogue
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply