[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Executing a Stored Procedure on a different database



Richard,

Have you considered using ASK to define a compile time variable?

ASK OTHERDBNAME

execute {OTHERDBName}..SPGetData
        @p1 = #var1,
        @p2 = #var2,
        @p3 = $var3
        INTO
        &Passed1 char(8),
        &Passed2 int

Ray

On Thu, Dec 04, 2003 at 11:20:12AM -0500, Richard C Spoth wrote:
> I'm using SQR V6.1.3 on an AIX ver 5.1.0 box against Sybase 12.1. 
> 
> We have multiple environments for unit and system testing therefore we 
> pass the server names and database names as environment variables.  I'm 
> trying to execute a Stored Procedure on a different database than the one 
> I'm currently running against.  I have tried using the square brackets 
> with the variable name like I have done may times before to refer to a 
> table in the other database however this method doesn't seem to work for 
> SP.   I have gotten it to execute if I hard code the name of the database, 
> which I am trying to avoid.  Anyone have any idea's?
> 
> E.G.
> 
> execute [$lsOtherDBName]..SPGetData
>         @p1 = #var1,
>         @p2 = #var2,
>         @p3 = $var3
>         INTO
>         &Passed1 char(8),
>         &Passed2 int
> 
> Thanks for any help.
> 
> Rick Spoth
> 
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
----------------------------------------------------------------------
Ray Ontko   rayo@ontko.com   Phone 1.765.935.4283   Fax 1.765.962.9788
Ray Ontko & Co.   Software Consulting Services   http://www.ontko.com/

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users