Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Two questions on external functions written in Delphi
Mon, Apr 5 2010 11:13 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

1. Can I define a parameter as a BLOB and then access using ParamValues.FindByName('FldStr').AsString for the call to the Delphi function without having to

2. Is there a way to get an external function written in Delphi to return either a NULL or a string? The reason I ask is for my merge lists function where I want to return either stringlist.text or a null. If there is a way to get NULL returned at all I can work round it by testing for my function result being emptystring and then passing null in the DoRoutine procedure.


Roy Lambert

ps wouldn't it be nice if we had a .AsStringList property for CLOB parameters
Mon, Apr 5 2010 3:35 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< 1. Can I define a parameter as a BLOB and then access using
ParamValues.FindByName('FldStr').AsString for the call to the Delphi
function without having to >>

Without having to what ?

<< 2. Is there a way to get an external function written in Delphi to return
either a NULL or a string? The reason I ask is for my merge lists function
where I want to return either stringlist.text or a null. If there is a way
to get NULL returned at all I can work round it by testing for my function
result being emptystring and then passing null in the DoRoutine procedure.
>>

Yes, just set the TEDBParamValue.Null parameter to True for a NULL result,
and set TEDBParamValue.AsString to '' for an empty string result.

<< ps wouldn't it be nice if we had a .AsStringList property for CLOB
parameters >>

Yes, it would be.  Unfortunately that links in all sorts of stuff that
cannot be linked in under .NET.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Apr 6 2010 2:32 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

><< 1. Can I define a parameter as a BLOB and then access using
>ParamValues.FindByName('FldStr').AsString for the call to the Delphi
>function without having to >>
>
>Without having to what ?

err couldn't you read the invisible writing - it said "CAST(blob as VARCHAR)"

>Yes, just set the TEDBParamValue.Null parameter to True for a NULL result,
>and set TEDBParamValue.AsString to '' for an empty string result.

I thought this morning "I think .Null in the interfaces Tim sent me had both read and write. I wonder if"

Thanks for confirming.

><< ps wouldn't it be nice if we had a .AsStringList property for CLOB
>parameters >>
>
>Yes, it would be. Unfortunately that links in all sorts of stuff that
>cannot be linked in under .NET.

What's .net? Smiley

Roy Lambert
Tue, Apr 6 2010 2:45 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< err couldn't you read the invisible writing - it said "CAST(blob as
VARCHAR)" >>

No, you are going to have to CAST it beforehand.  If you don't, then the
string that you get from AsString will be a string of hexadecimal
characters, i.e. a binary constant.

<< What's .net? Smiley>>

Welcome to the 21st century, Roy. Wink

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Apr 6 2010 7:53 PMPermanent Link

David Cornelius

Cornelius Concepts

Avatar

> Welcome to the 21st century, Roy. Wink

Nah, Welcome to Microsoft!  Smiley

--
David Cornelius
Cornelius Concepts
Wed, Apr 7 2010 3:12 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>No, you are going to have to CAST it beforehand. If you don't, then the
>string that you get from AsString will be a string of hexadecimal
>characters, i.e. a binary constant.

Fair enough.

>Welcome to the 21st century, Roy. Wink

Is that the time.....already.

Roy Lambert
Image