[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Connecting as another user in embedded SQL
- Subject: Re: Connecting as another user in embedded SQL
- From: Gary Kearns <GKearns@ELCOR.COM>
- Date: Tue, 18 Jul 2000 08:04:46 -0500
The syntax I've used is as follows:
Begin-SQL -DB=maxprod;DSN=maxprod;UID=UserID;PWD=password
.
.
End-SQL
Hope this helps.
Gary Kearns
Elcor Corporation
PeopleSoft Technical Analyst
gkearns@elcor.com
972-851-0474
-----Original Message-----
From: Lauri H. Macha [mailto:l.h.macha@LARC.NASA.GOV]
Sent: Monday, July 17, 2000 11:17 AM
To: SQR-USERS@list.iex.net
Subject: Connecting as another user in embedded SQL
I am working in Oracle 8 and I have written an SQR program in which I have
an embedded SQL statement. It works fine with just "Begin-SQL", but now I
want the SQL statement to be executed as a particular user. I am
attempting to use the -DB argument to accomplish this. My procedure looks
like this:
Begin-SQL -DBDSN=maxprod;UID=maxprod;PWD=mypassword
<My SQL INSERT statement goes here>
end-SQL
When I attempt to run my SQR program, I get the following error:
Error on line 327:
(SQR 3730) Incorrect arguments for BEGIN-SQL:
[-Cnn] [ON-ERROR=procedure[(arg1[,argi]...)]]
Begin-SQL -DBDSN=maxprod;UID=maxprod;PWD=mypassword
I'm sure my syntax must be wrong ... can anyone either help with the syntax
or suggest another approach?
Thanks in advance,
Lauri Macha