🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.database.ado-net
2 messages
2 total messages Started by clacke Wed, 14 Feb 2007 10:55
Parameter value problem assigning with dbGo
#41
Author: clacke
Date: Wed, 14 Feb 2007 10:55
12 lines
1280 bytes
Hi all.
I'm using dbGo components in a .Net delphi project.
When I set a string parameter value to a string value with the following 
instruction:

myStorProc.Parameters.ParamValues['@ParmName'] := 
QuotedStr(myStringVariable);

I obtain compiler error E2010: incompatible types:'Variant' and 'string'
How can I convert string value to variant?

TIA
Re: Parameter value problem assigning with dbGo
#42
Author: clacke
Date: Sun, 25 Feb 2007 10:07
30 lines
1561 bytes
It seems this NG isn't so much accessed...
Now I find following workaround:

var
    tmpVar :  variant;
begin
    // ......
    tmpVar := QuotedStr(myStringVariable);
    myStorProc.Parameters.ParamValues['@ParmName'] := tmpVar;
    //....
end;

HTH for other people.


> Hi all.
> I'm using dbGo components in a .Net delphi project.
> When I set a string parameter value to a string value with the following 
> instruction:
>
> myStorProc.Parameters.ParamValues['@ParmName'] := 
> QuotedStr(myStringVariable);
>
> I obtain compiler error E2010: incompatible types:'Variant' and 'string'
> How can I convert string value to variant?
>
> TIA
>
>
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads