Home All Groups Group Topic Archive Search About

Ole Automation procedures. DB scope?

Author
18 Aug 2005 3:09 PM
Snake
I have been looking at the OLE automation procs (ex. sp_OACreate, etc. ) and
am wondering about their scope. Does the OLE process have scope on the
executing  transaction?  Or must the OLE object establish its own database
connection?  For example, I have an example using 'SQLDMO.SQLServer' and it
establishes its own  database connection, so some of its parameters are
instance, login name, and PW.

We have several db instances and databases and we move procs around quite
often and I don't want to have to worry about passing db connection info.

Thanks,
Michael

Author
18 Aug 2005 3:28 PM
Mike Epprecht (SQL MVP)
Hi

there is no scope in SQL Server 2000. In SQL Server 2005, CLR objects have a
scope.

Regards
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/



Show quote
"Snake" wrote:

> I have been looking at the OLE automation procs (ex. sp_OACreate, etc. ) and
> am wondering about their scope. Does the OLE process have scope on the
> executing  transaction?  Or must the OLE object establish its own database
> connection?  For example, I have an example using 'SQLDMO.SQLServer' and it
> establishes its own  database connection, so some of its parameters are
> instance, login name, and PW.
>
> We have several db instances and databases and we move procs around quite
> often and I don't want to have to worry about passing db connection info.
>
> Thanks,
> Michael
Author
18 Aug 2005 4:10 PM
Snake
Mike,
I am not sure if you answered my questions in a way that I can understand.
Can you give me a little more detail?
Thanks,
Michael

Show quote
"Mike Epprecht (SQL MVP)" wrote:

> Hi
>
> there is no scope in SQL Server 2000. In SQL Server 2005, CLR objects have a
> scope.
>
> Regards
> --------------------------------
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
>
> MVP Program: http://www.microsoft.com/mvp
>
> Blog: http://www.msmvps.com/epprecht/
>
>
>
> "Snake" wrote:
>
> > I have been looking at the OLE automation procs (ex. sp_OACreate, etc. ) and
> > am wondering about their scope. Does the OLE process have scope on the
> > executing  transaction?  Or must the OLE object establish its own database
> > connection?  For example, I have an example using 'SQLDMO.SQLServer' and it
> > establishes its own  database connection, so some of its parameters are
> > instance, login name, and PW.
> >
> > We have several db instances and databases and we move procs around quite
> > often and I don't want to have to worry about passing db connection info.
> >
> > Thanks,
> > Michael

AddThis Social Bookmark Button