|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sp_OACreate and sp_OAMethed Heelllllpppp...
I have a question and I hoping to not sound to lame. I am trying to use the sp_oacreate and the sp_oamethed to run my dll from sql sever 2005
It looks some thing like this EXEC @hr = sp_OACreate 'ActiveDirectoryCom.Adcom', @object OUT,5 IF @hr <> 0 BEGIN --Not able to create the object Return @hr END --Not able to create the object EXEC @hr = sp_OAMethod @object, 'AuthenticateUserFullPath', @FunctionReturn OUT, strUser, strPassword, strDoman IF @hr <> 0 BEGIN --Not able to execute Com function Return @hr END --Not able to execute Com function I have created my dll in .net and placed it in the root drive of the server. How does OACreate know where to locate my dll? One executing this fucntion I am returning -2147221005 -214721148 error code. Have I created my dll incorrectly? The name of the dll is ActiveDirectoryCom and the Class with in the dll is called Adcom and the function that need to run is called AuthenticateUserFullPath. Have I correctly Written the sp_Oa's have tried to use CRL integration in SQL Server 2005 manage it with CREATE ASSEMBLY statement. However that ole automation application that I am trying to execute with the above stored proceedure has a company web service that is a company standard to do the authentication which I have no contol over, So when I try to execute: CREATE ASSEMBLY ActiveDirectoryCom from 'C:\ActiveDirectoryCom\bin\Release\ActiveDirectory Com.dll' WITH PERMISSION_SET = SAFE I get this error Msg 6213, Level 16, State 1, Line 6 CREATE ASSEMBLY failed because method "add_LookupUserInfoFromIDCompleted" on type "ActiveDirectoryCom.com.cshPeopleFinder" in safe assembly "ActiveDirectoryCom" has a synchronized attribute. Explicit synchronization is not allowed in safe assemblies. cshPeopleFinder is a webreference to a webservice. I how that there is many other ways to do this however It is requested that I keep this functionality runing with this stored procedure and that the dll remain on the the secure server. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > Sp_OACreate and sp_OAMethed Heelllllpppp... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|