?
Solved

COM DLL ACCESSING FROM MSSQL

Posted on 2006-04-06
2
Medium Priority
?
160 Views
Last Modified: 2013-11-25
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
0
Comment
Question by:techref9
2 Comments
 
LVL 15

Expert Comment

by:Ralf Klatt
ID: 16397105
Hi,

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
0
 
LVL 9

Accepted Solution

by:
gabeso earned 2000 total points
ID: 16398530
Try defining the string parameters as 'nvarchar' rather than 'varchar'.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses
Course of the Month16 days, 1 hour left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question