apicp question

Post Reply
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

apicp question

Post by barry.marcus »

In our Vortex scripts we often precede calls to <sql> with calls to <apicp> to set one parameter or another for the sql call to follow. In some of those sql calls I'm now wanting to override the default database by (i.e., the one set with <db>) using

<sql db=$theNonDefaultDb ...>

Do the calls to apicp that precede this apply to the default database or to the database specified in the <sql> call? That is, is it necessary to do something like this instead:

<db=$theNonDefaultDb>
<sql ...>
<db=$theDefaultDb>

which seems just ever so lightly less elegant!

Thanks.
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

apicp question

Post by Kai »

<apicp> calls apply to whatever <sql> etc. calls follow, regardless of database (either default or <sql>-specified). So you can change databases in the <sql> call after the <apicp>, and the <apicp> will still take effect; you do not need to change DBs before the <apicp>.
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

apicp question

Post by barry.marcus »

Great! Thanks.
Post Reply