发布新帖

查找

问题
· 二月 9, 2018

Execute store procedure in SQL database problems

Hi, I am trying to execute a store procedure within an ensemble operation to connect to aMsSQL database and I am having problem to pass the input arguments... I have tried several things but only one seems to work and it is not the ideal solution.

ADAPTER = "EnsLib.SQL.OutboundAdapter";

This is the code that works...as you can see the parameter is added to the sql query...not the best solution but the only that works at the moment.

SET SQLQuery = "EXEC [dbo].[xxxx] '" _ pRequest.RawContent _ "'"
SET tSC=..Adapter.ExecuteProcedure(,,SQLQuery,)

I have tried to call a store procedure that does not expect any parameters...and is also working:

SET SQLQuery2 = "{ call Test }"
SET tSC = ..Adapter.ExecuteProcedure(,,SQLQuery2,)

But when I am trying to do the call right based on the documentation...it is not working:

SET SQLQuery3 = "{ call xxxx(?) }"
SET tSC = ..Adapter.ExecuteProcedure(,,SQLQuery3,,"aaaa")

What the ExecuteProcedure is returning is a error message that includes the following:

<Ens>ErrGeneraln SQLState: (HY001) NativeError: [0] Message: [Microsoft][ODBC SQL Server Driver]Memory allocation failure 

Store procedure:

ALTER PROCEDURE [dbo].[xxxx] 
    @HL7MSG                        varchar(max)AS
BEGIN

Looking at the documentation that call seems to be right and looking at some examples I got from internet...everybody seems to use that call same way...but not sure why it is nor working for me.

Can anyone see any problem or help me with this please?

Thanks

9 Comments
讨论 (9)0
登录或注册以继续
问题
· 二月 5, 2018

I am curious about Terminal function

Hi global developers!

I am using terminal but I have some problem with it.

I use $C(1) (ascii code 1) to separate data but I can't see it in the terminal and This is really hard to see in the table.

So I want to get you guys good brain and skill :)

how can I see it in the terminal ?

Terminal(intersystems) :

I can't see anything

another program :

It replaced ascii code 1 (=SOH) to  ┌ (Special Character)

I want to see like another program in Intersystems's terminal.

Thank you smart developers!

3 Comments
讨论 (3)0
登录或注册以继续
问题
· 十二月 15, 2017

$ZSTRIP removing too many characters

We are seeing something funky when using $ZSTRIP.

w $ZSTRIP("ZZZZTESTSLOCKTEST","<","ZZZZTEST")
LOCKTES
T

Shouldn't this be returning....SLOCKTEST and not LOCKTEST, the goal is to remove ZZZZTEST from the beginning of the string.

THanks

Scott Roth

The Ohio State University Wexner Medical Center

1 Comment
讨论 (1)1
登录或注册以继续
问题
· 十二月 14, 2017

Using THROW/CATCH within Business Process Lanaguage

We are starting to look into our BPL's and catch errors that calls may return. Can someone explain how to use the THROW and CATCH within the Business Process Language or have a sample of how it should work?

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

3 Comments
讨论 (3)1
登录或注册以继续
问题
· 十一月 27, 2017

"Contains" operation for bitstring

aa=$zwc(411,1,1,3)/*$bit(1,3,5)*/
bb=$zwc(403,1,0,2)/*$bit(1,3)*/

Is there a handy function to test wether one bit string is covered by another one bitstring? For example, "bb" is covered by "aa".

I currently implement this by one AND operation and then do a bitcount, I just want to know any default function is already out there.

Thanks.

3 Comments
讨论 (3)0
登录或注册以继续