Showing posts with label inside. Show all posts
Showing posts with label inside. Show all posts

Friday, March 30, 2012

One for the record books

I'm inside EM. I click on a database, then the Stored Procedure list.
Everything's . When I try to scroll down I get a Message Box:
System Error [x]
The memory manager has failed.
[OK] [Cancel]
Obviously, I rebooted, but what the heck would have happened if I hit
[Cancel] ?!?
Peace & happy computing,
Mike Labosh, MCSD
"Musha ring dum a doo dum a da!" -- James HetfieldApparently the memory manager would no longer have failed :)
----
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"Arguments are to be avoided: they are always vulgar and often convincing."
(Oscar Wilde)
"Mike Labosh" <mlabosh@.hotmail.com> wrote in message
news:OSjUAZKtFHA.2008@.TK2MSFTNGP10.phx.gbl...
> I'm inside EM. I click on a database, then the Stored Procedure list.
> Everything's . When I try to scroll down I get a Message Box:
> System Error [x]
> The memory manager has failed.
> [OK] [Cancel]
> Obviously, I rebooted, but what the heck would have happened if I hit
> [Cancel] ?!?
> --
> Peace & happy computing,
> Mike Labosh, MCSD
> "Musha ring dum a doo dum a da!" -- James Hetfield
>|||>> System Error [x]
> Apparently the memory manager would no longer have failed :)
Just try telling that to the memory manager.
Peace & happy computing,
Mike Labosh, MCSD
"Musha ring dum a doo dum a da!" -- James Hetfield|||"We can't fix the actual problem right now, but we're giving you three ways
to close this window."
ML

Saturday, February 25, 2012

OLE Automation and "global variable"

I have an OLE automation object that I am instantiating inside of a stored
proc using
sp_OACreate 'myObject', @.object OUT.
The stored proc is called multiple times, each time instantiating a new
instance of the object (and then destroying it when it is finished).
Is it possible in SQL Server to create a global variable to refer to the
OLE automation object?
IOW can I instantiate the object outside the proc, assign the @.object
pointer to a global variable and then refererence this global variable
inside my stored proc so I don't have to create the object every time it is
called?
Perhaps a more basic question is: is it possible to create global variables
in T-SQL and if so, how?
Thanks
DaveAs far as I know, OLE Automation objects in SQL Server can only exist inside
the scope where they were created.
There are also no global variables in SQL, but you could create a temporary
(or permanent) table to store values that can be accessed "globally".
I strongly recommend you destroy all objects after use, even those
implicitly created by the methods used. But then again you mentioned that yo
u
already do so. :)
SQL 2005 also supports (and controls) CLR, maybe that can provide you with
more functionality.
ML
http://milambda.blogspot.com/