Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Consequences of using DBMS_APPLICATION_INFO.SET_CLIENT_INFO ???

Re: Consequences of using DBMS_APPLICATION_INFO.SET_CLIENT_INFO ???

From: April <PrivateBenjamin_at_hushmail.com>
Date: 16 Oct 2002 07:14:01 -0700
Message-ID: <54df0379.0210160614.539d9f0f@posting.google.com>


Thomas Kyte <tkyte_at_oracle.com> wrote in message news:<aohoor0jdf_at_drn.newsguy.com>...
> In article <54df0379.0210151032.238d6530_at_posting.google.com>,
> PrivateBenjamin_at_hushmail.com says...
> >
> >Are there any multiuser issues regarding creating dynamic views using
> >DBMS_APPLICATION_INFO.SET_CLIENT_INFO in the manner as below
> >
> >CREATE OR REPLACE VIEW VW_MYINVESTMENTS ( DRIVER,
> >INV#, DESCRIPTION, USERID ) AS SELECT
> > vw_TBLINVESTMENTS.INV_DRIVER# AS Driver,
> > vw_TBLINVESTMENTS.INVESTMENT# AS "Inv#",
> > vw_TBLINVESTMENTS.INVESTMENT_DESCRIPTION AS Description,
> > VW_TBLEMPLOYEE.USERID
> >FROM
> > VW_TBLINVESTMENTS,
> > VW_TBLEMPLOYEE
> >WHERE
> > VW_TBLINVESTMENTS.Employee# = vw_TBLEmployee.Employee# and
> > VW_TBLEMPLOYEE.userid = userenv('client_info')
> >
> >then -------
> >
> >"BEGIN DBMS_APPLICATION_INFO.SET_CLIENT_INFO ( & '" & param & "')" &
> >"; END;"
> >
> >For example, when multiple users are setting the environment variable
> >will that affect the other users?
> >
> >
> >Thanks
> >April
>
>
> client info is session "safe", each session has their own.
>
> this is a common technique -- but -- USE BIND VARIABLES when calling dbms_app
> info -- don't concatenate like you show above -- looks like VB or Java -- so use
> a ?
>
> "begin dbms_application_info.set_client_info(?); end;"
>
> and bind in param

Thanks Tom,

yes it is VB, actually VBA.

dumb question I know, but how do I then Bind in the parameter?

I send the statement "begin dbms_application_info.set_client_info(?); end;" to the server wrapped in an Access querydef in the form below.

With qdf

    .connect = strConnect
    .ReturnsRecords = False
    .sql = "BEGIN DBMS_APPLICATION_INFO.SET_CLIENT_INFO (?); END;"
    .Execute dbFailOnError

End With

Secondly, just want to make sure..., there is only one Oracle user and multiple pcs are connecting using that user. So each connection is a separate session and therefore won't conflict?

Thanks again for your help,
April Received on Wed Oct 16 2002 - 09:14:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US