Posted on 2006-04-06
Last Modified: 2013-11-25

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 ?

Question by:techref9
    LVL 15

    Expert Comment


    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 ... ;-)

    Best regards,
    LVL 9

    Accepted Solution

    Try defining the string parameters as 'nvarchar' rather than 'varchar'.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Title # Comments Views Activity
    Problem to adjust sheet 1 78
    c# combobox autocomplete behavior 6 62
    countHi challenge 25 59
    mapShare challenge 13 40
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
    The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now