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 - 2002-02-18 : 09:24:53
|
| Vito writes "Win2000 SP1SQL Server 7I am trying to invoke a method of the object that I created in VC++. If I test my DLL from anywhere else (VB, ASP), I have no problems instantiating my object. This is what I do in the stored procedure:DECLARE @hr intDECLARE @object intEXEC @hr = sp_OACreate 'myObjectProgId', @object OUTand it fails with "ClassFactory cannot supply requested class".If I try using the class GUID I get the same result.Please help.Thanks." |
|
|
SteveHill
Starting Member
2 Posts |
Posted - 2002-08-07 : 02:01:06
|
| I'm having the exact same problem with SQL2K on W2K.. runs fine in VB on the same box, and on an XPPro/SQL2K box within the database.. |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-08-07 : 08:15:49
|
| You may need to change the threading model of the DLL, I can't remember which ones SQL Server likes and doesn't like, but there is at least one threading model that sp_OA doesn't work with. |
 |
|
|
SteveHill
Starting Member
2 Posts |
Posted - 2002-08-07 : 09:58:45
|
| It was originally apartment, so I changed it to single, but same error.. what's driving me nuts is that it works on my SQL 2000 server on my XP Pro box, but not on my W2K Server box.. |
 |
|
|
de9625
Starting Member
17 Posts |
Posted - 2002-08-12 : 08:33:54
|
| I got the same error message when I tried to creat the object by the GUID. When I used the progId and the class it finally worked.EXEC @hr = sp_OACreate 'ProgID.Class', @object OUT It's on a SqlServer2k on a Win2kServer. |
 |
|
|
|
|
|