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-10-14 : 22:26:57
|
| Rick writes "Hi all, I have an issue I'm hoping someone can shed some light on. I have a COM object written in VB which uses ADO to connect to the database and extract some data (it works great). This object is instantiated from a stored procedure using sp_OACreate and then a method is called using sp_OAMethod. It works perfectly when the proc is called from query analyser, however, when the proc is called from a trigger, it doesn't work, it instantiates properly but cannot execute the method. This behaviour is totally consistent. I was under the misconception that code was code, regardless of where it is called from, but this appears to not be the case. SQL Server behaves differently when called from a trig, if I hadn't seen it myself I never would've believed it. I've also tried putting all the code from the proc inside the trig instead of calling the proc from the trig, but the result is the same. I've tested this on sql 7 and 2000, making sure that all patches have been applied, and the behaviour is consistent. The problem in part has to do with the fact that this com object uses ado. When I remove the ado references from the object and just pass back some text data to sql server then it works fine regardless if the proc is called from QA or a trig. I know this is a weird one, and I'm hoping someone out there has experienced this problem and found a resolution. many thanks, Rick" |
|
|
|
|
|
|
|