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

Re: SQL server vs SQR



Hi Philippe,

What I think you need is the -C option.... it keeps the connection
alive. Here's an example:

begin-setup
begin-sql -C1
  create table ##test (col1, col2)
end-sql
end-setup

begin-procedure something
begin-select -C1

t.col1   &col1
t.col2   &col2

   etcetera

from ##test t
where etc.....

end-select


I've used this in some scripts, took me sometime to figure out why the
#table was not recognised... same problem you've got I suppose.

Hope this helps....

Arjan



--- Philippe Godin <philippe.godin@VIDEOTRON.CA> wrote:
> Good day,
>
>     Thanks for all your replies, I've tried it all and nothing is
> working
> out yet. BUT I found an hint. Perhaps someone can help me with this.
> During all the tests I've made, I wasn't able to access my temporary
> table
> named #mytable. This is what I noticed.
>
> It seems like SQR is opening a new connection to the database each
> and every
> time you have a Begin-sql statement. It closes the session when it
> arrives
> to the End-sql statement.
>
> The temporary table I've created in SQL Server is made to drop
> automaticly
> when the connection is closed. The advantage of this is that the user
> doesn't needs any privileges in order to achieve this so there's no
> need to
> disturb the DBA.
>
> Here's my question: does anyone have a clue on how to bypass this
> opening
> and closing session with the Begin and end-sql statements?
>
> Philippe Godin


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/