Internal implementation of SQL procedure command

Hi,

I was working with SQL procedure and i came across that for running procedures we have to use something like :

/* %LogicalDatabase%=GetLogicalDatabase({Customer}) */
EXEC [dbo].[spSELECT_CustomerEmailByID]
    @CustomerID

I tested that and it was working fine. But when i removed the commented part (/* %LogicalDatabase%=GetLogicalDatabase({Customer}) */) then it stopped working.

Can someone explain me what this commented command do and why it is mandatory.Is it making some instance with DB?

Also if it commented how actually we are reading that?


Hi Tanuj,

This is used when you are trying to execute an SP in an external database, that you integrate into an OutSystems application through an extension using Integration Studio.

It is a "hint" for the platform so that it can choose the correct Database Connection, otherwise, it will use the OutSystems Database Connection (what would be fine if the SP was located in the OutSystems Database).

That's the reason why it is commented, as it is meta-information, not something to pass to the database to run.

Cheers.