hi,
i have written a program on COM Automation for SQL Server, following is the code

Declare @Object int
Declare @RetVal int
Declare @tmp int

Exec @RetVal=sp_OAcreate 'EDISpher.Translate', @Object OUTPUT
Exec sp_OAMETHOD @Object, "TransFile", NULL, "c:\edifile\ShipResponse.xml"

Select @Retval, @tmp as temp, @Object as Object

'EDISpher' is an activex dll.
The function 'Transfile' call AfxOleInit() to intializes the COM object but the COM object is not getting intialized.

Can some one guide what could be the problem.
Thanks in advance.
Regards,
Manpreet