techref9
asked on
COM DLL ACCESSING FROM MSSQL
Hi,
I wrote COM DLL(test.dll) using VC++ 6 to communicate with WAS.
If i invoke functions in COM DLL ( test.dll) using Visual Basic application , No issues everything is working fine
if i invoke the same functions in MSSQL using Stored Procedure - not working.
In VB defining variables as String
in SQL defining varibales as Varchar
In COM DLL - function ( BSTR, BSTR , BSTR) - using BSTR and converting them internally char * and working , return type BSTR( converting Back). i am using W2A function to convert BSTR to Char *.
COM DLL is compiled with _MBCS in settings options.
Any Ideas ?
Thanks,
Naren
I wrote COM DLL(test.dll) using VC++ 6 to communicate with WAS.
If i invoke functions in COM DLL ( test.dll) using Visual Basic application , No issues everything is working fine
if i invoke the same functions in MSSQL using Stored Procedure - not working.
In VB defining variables as String
in SQL defining varibales as Varchar
In COM DLL - function ( BSTR, BSTR , BSTR) - using BSTR and converting them internally char * and working , return type BSTR( converting Back). i am using W2A function to convert BSTR to Char *.
COM DLL is compiled with _MBCS in settings options.
Any Ideas ?
Thanks,
Naren
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A year ago I had to call DLL functions from SQL Server ... now it seems that I was at the same point as your question seems to target ... fortunatly the article that helped me is still available ... ;-)
http://www.devarticles.com/c/a/SQL-Server/Extended-Stored-Procedures-Intro-And-10-Cool-Examples/
Best regards,
Raisor