Board index » cppbuilder » ADO CreateParamer

ADO CreateParamer

I have a problem I am having a hard time tracking down.  I am using Borland
C++ Builder 5 Pro.  I am using the smart pointers provided by the Borland
header files for ADO 2K for the _CommandPtr object.  I can use everything
but I am having trouble creating a parameter using characters for the
parameter inputs (passing an AnsiString with the adChar type).  My program
uses the Access 2002 database.  It appears to me that the type gets changed
when passed as a TVariantInParam automatically and this is causing alot of
problems.  When I execute the command I get a parameter conversion error.  I
rewrote a small sample of the code in Visual C++ 6 using the same test case
and did not have any problems.  Has anyone experienced this problem with the
ADO Command object for creating character based parameters?

Thanks
-Alex

 

Re:ADO CreateParamer


On Sat, 14 Jul 2001 16:47:34 -0500, "Alex Passos" <apas...@cst.net>
wrote:

Quote
>I have a problem I am having a hard time tracking down.  I am using Borland
>C++ Builder 5 Pro.  I am using the smart pointers provided by the Borland
>header files for ADO 2K for the _CommandPtr object.  I can use everything
>but I am having trouble creating a parameter using characters for the
>parameter inputs (passing an AnsiString with the adChar type).  

I don't think you want to be using adChar. Instead use the WideString
class for wchar_t.

cheers,
John

Other Threads