not getting no not session variables

I must be missing something. I thought that once you set the session variable in the file application.cfc then used cfset on the home page to set the session something, variable he remained active until you logged out/completed the session/browser closed, etc.. But mine are not carry more than one page of the form on the next page. I also need them to stay if a person leaves the folder that contains the application.cfc page. I have to use < cfset session.id = ' #form.variable # ' > on all pages or file application.cfc needs to have it somewhere in my onRequestStart function? If a person goes out of the folder containing the .cfc file and go back to the page of maintenance should not the variable session remain still active? Any help is greatly appreciated. Wendy

WAM4 wrote:
> I guess what I'm trying to understand, that's if I can keep these session
> variable if the user out of the record and maintenance of back in
> the page so that they can continue the work. If not, then how can I force to open a session
> back in. Right now the cflogin allows them to leave and return without
> rear connection.
> Thank you,
>

Yes, the session will normally persist even if you leave the
"application" for which it is defined. Of course the session timeout is
ticking. When the user is using another section of the site that
is a different or indefinite application or even completely different web
sites, the session timeout is not reset. If it expires before
they come back while the session will no longer exist.

But as long as the user returns to the application before the session
expires, the session variables will still exist. And as long as the browser
Returns the required for the session ID's they will be able to access to the
State of the previous session.

Under normal circumstances, in any case.

Tags: ColdFusion

Similar Questions

  • Value of the session Variable does not get updates.

    Hello
    I have a Session variable, I am assigning it an initial value [3] during the loading of the page. But, during the drop value menu selection and the "submit" button hit, I update the value of the Session variable.
    The update is unsuccessful and the session variable is preserved the initial value. Here's the code used to assign the value to the Session variable:

    < ISdefined ("FORM.submit") cfif >
    < cfset Session.numTasksDisplayed EQ #FORM.filter # >
    < cfelse >
    < cfset Session.numTasksDisplayed EQ 3 >
    < / cfif >

    When to use cfoutput after these instruction to check the value of the Session variable, its gives me the initial value of 3. Form.Filter is the value from the drop-down list menu option selected.
    #FORM.filter # #Session.numTasksDisplayed # < cfoutput > < / cfoutput > < cfabort >

    Any help is appreciated.
    Thank you and best regards,
    Vijayvijay77.

    First of all, you cannot use EQ with CFSET comparison operator. It should result in an error. If this is done on the bottom, there will be an error and nothing is set.

    Also, are you sure that FORM. Offer exists during the validation of the form?

    -Fernis

  • Level security line with session variables, not recommended?

    Hello

    We are on the point of implement security level line in our project of BI using OBIEE, and the solution that we found more convenient to our requirement was to use session with blocks of initialization variables.

    The problem is that this method is listed as "not recommended" in the Oracle documentation.

    Administration of alternative security options - 11g Release 1 (11.1.1)

    (This appendix describes alternative security administration options included for backward compatibility with improved systems and are not considered a best practice.)

    The Session Variables management

    Session system variables get their values of initialization blocks and are used to authenticate Oracle Business Intelligence users against external sources such as LDAP servers or database tables. Each active session of BI server generates session variables and initializes them. Each instance of session variable can be initialized to a different value. For more information on the use of variables and blocks of Oracle Business Intelligence session initialization, see 'Use of Variables in Oracle's BI repository' in Oracle Fusion Middleware metadata repository Builder of Guide for Oracle Business Intelligence Enterprise Edition.

    How confused... What is the best practice then?

    Thank you for your help.

    Joao Moreira

    authentication / authorizing the part is dealing with weblogic and then initialized the variable USER and you can use it for any initblocks for safety.

    Block of init to authenticate / variable session and authorization are different, I guess that you mix the two.

  • Session Variables do not persist

    Hello everyone, I am writing an app to work where a user connects to a system and then adds and removes entries from a database via a web application. I use session variables to store the ID of the user and the permissions of this user. I get through the connection very well. After clicking on a link on the following points if the page ("a href =" link) session variables are not available on the next page. I don't understand why the session variables are not persistent throughout the site. In my application.cfm I < name cfapplication sessionmanagement = "true" sessiontimeout = "App" = "#CreateTimeSpan (0, 1, 0, 0) #" > any help with this would be greatly appreciated.

    I solved the problem. The problem was that the CFID and CFTOKEN variables have been changed from one page to another page in my site. It was because I was using http://app/... http://###.###.###.###/... and a few pages in other pages. I was using the name of the server for some intellectual property for some and FC saw these different sites and changed the CFID and CFTOKEN variables, so my session have not persisted through the site.

  • IsDefined / Session Variable / application.cfm - does not

    Greetings-

    If someone can throw a glimpse as to why the second
    scenario below does not work like the first?

    < < < < First scenario > > > > (work)

    [Main folder |-secure_access]
    [file] - login.cfm
    [file] - authenticate.cfm
    [file] - application.cfm

    [Sub folder] - secure_access/view
    [file] - first_page.cfm
    [file] - second_page.cfm

    [file] - application.cfm
    < name cfapplication = "CF_Password2."
    ClientComm = "Yes" sessionmanagement = "Yes".
    SessionTimeout = "#CreateTimeSpan (0,0,2,0)" # ""
    applicationtimeout = "#CreateTimeSpan (0,0,2,0)" # ">"

    The variable session.ual is defined on the
    Authenticate.cfm page saved in database.

    A person accesses the login.cfm file to the main folder and between appropriate username and password and the product. The login.cfm page passes on the the authenticate.cfm and is checked against a database, and if the record found, go to first_page.cfm.

    [file] - first_page.cfm
    < IsDefined ('session.ual') cfif >
    < p > < a href = "second_page.cfm" > to the second page < /a > < /p > "
    < cfelse >
    < /P > < p > access denied
    < / cfif >

    [file] - second_page.cfm
    < IsDefined ('session.ual') cfif >
    < p > This is the second page < /p >
    < cfelse >
    < /P > < p > access denied
    < / cfif >

    After a period of two minutes, if I update the first_page.cfm or try to click on the second_page.cfm file, I get the message 'access denied '.

    < < < < Second scenario > > > > (does not work)

    [Sub folder] - secure_access/view
    [file] - application.cfm
    [file] - first_page.cfm
    [file] - second_page.cfm


    [file] - cfapplication.cfm

    < IsDefined ('session.ual') cfif >

    < cfelse >

    < /P > < p > access denied

    < cfabort >

    < / cfif >

    In the second scenario, I added an application.cfm file check to see if the session.ual variable is present. If it is, then the process must continue and first_page.cfm, with subsequent to second_page.cfm and of course link display where the post.
    is not the case.

    I have the impression that placing the application.cfm in this folder and checking the session variable, covers all pages in the file rather than having to add the verification code to each page.

    What Miss me in this process? I'm sure it's something simple and I've just dealt with this too long. Perhaps a new set of eyes on the situation can enlighten us to the right way for me to accomplish my task.

    Thanks - Leonard B

    That's what I thought.

    But when a request is made for a model based in the sub folder, only the
    Application.cfm IN this FOLDER gets run. If one main folder
    NOT run. And it is the one in the main file that implements the
    parameters of the session with .

    One thing that confuses people - perhaps you, in this case - is there
    nothing particular Application.cfm or tags, in itself, in
    with regard to the persistence once they have been executed the first time (the application
    Scope is something different; who IS persistent between requests).

    So to be able to access your session variables, you must hit that
    tag * each * request *. Sessions of the people are based in part
    the CFTOKEN and CFID values sessions, but also the name of the application
    (different applications have different sets of session variables). The
    the application name must be set to each request (via a tag),
    otherwise CF don't know where the request is for the application.

    I think that all you need to do is add<>
    "model = '... / Application.cfm" > at the top of your file under "
    Application.cfm.

    Who is?

    --
    Adam

  • Values of session variables not updated according to the values in the table

    Hello

    I have a problem with one of the session variable that is based on the USER login.

    My session variable "DeptID" has all the values associated with the user. I have in my external table, the USER and its corresponding departments. My init for this variable block is something like

    Select "DeptID", dept_id of user_table where user =': USER ';

    Now I use this variable on my main dashboard prompt and I'll show the results in the command prompt based on the results of sql. Here is my SQL something like

    SELECT 'Department '. "" Department name ""SH"where"Department. "" ID Dept ' = VALUEOF (NQ_SESSION. ("" DeptID ").

    With this method, everything works well and the command prompt displays the correct values.

    But the problem arises when a new Department is added to the current user. When new departments are assigned to the user, the new values does not appear in the drop-down on the line of dashboard until and unless the cache is purged and the server is restarted.

    Thinking that the cache is the issue, I have disabled the cache also in the nqsconfig.ini file. But then as the new values is not displayed. I see that in the file nqquery.log that the old values are sent to the database, that that is the session variable does not get updated with the new values according to the external table.

    You could someone please let me know what I'm missing here?


    Thank you

    Hello

    See this thread for the answer,

    Re: OBIEE external DB security does not completely.

    Thank you
    Swami

  • I get the error Code: ORA-01008: not all variables

    Hi all

    When I try to insert data into a table through the procedure am getting following error...

    Error code: ORA-01008: not all variables.

    But if I run the same query on the outside passing the parameters it works well. When I run the Insert through the procedure statement, I don't get all the variables related error.
    I'm passing two numbers as parameters. But I don't know why I get this error.

    Could someone suggest me please.



    Thank you
    Sree

    http://lmgtfy.com/?q=ora-01008%3A+not+all+variables+bound.

    Good bye
    DPT

  • session variables does not

    Hello

    I use a cf 9.1 application and session variables do not work.  TestPage.cfm sets a variable of session.rage and has a button to access page 2 where I cfdump the session and there is no variable defined rage here.  I work with legacy where apparently this habit of working code.  Help?  CFAPPLICATION tag below:

    < CFAPPLICATION NAME = "advapp" SESSIONMANAGEMENT = "Yes" SETCLIENTCOOKIES = "Yes" ClientComm = "Yes" APPLICATIONTIMEOUT = "#CreateTimeSpan (0, 24, 0, 0) #" sessiontimeout = "#CreateTimeSpan (0, 0, 45, 0) #" >

    Sorry, they worked, I went to a different base URL that their invalidated. that is my url has been

    http://server_name/APP_NAME/dir/page.cfm

    and I was going to

    http://server_name/new_app_name/dir/page.cfm

    I think that session is only valid for the base App., if you switch to a new app a new session is created.

    Problem solved.

  • Session variables not cleared

    Hey.

    I am writing an application that uses session variables to hold information to keep my users (it's a simple little app, really). When we have hosted on our internal server, everything worked fine. When the user closes his browser, the session variables have been dumped.

    However, we have moved to a new server, and it seems that the session variables are not dumped at all. I logged in on Friday, I closed and turned off my computer and this morning I opened my browser and I was always connected; He remembered the session variables. It is a problem if it's a setting on the server, because we have more access to the CFAdmin settings or server at this point.

    Is that what I can do in my script to remove session variables when the browser is closed?

    Thank you
    David

    If you where relying on default session time outs defined in CF
    Admin, you can also define in your code with the
    tag or application. CFC this.sessionTimeOut parameter.

    For the sessions of "timeOut" when the browser is closed they must be paid
    to the "J2EE session variables using" in the memory Variables section of the
    The CF administrator. A note, this does not actually remove the variables
    memory when the browser is closed, because the server has no idea who
    that's happened. What is happening, as I understand it, is the
    cookie tokens, the browser have been given are deleted by the browser
    When it closes. So when it is opened again the new chips are generated
    who are associated with a new "session" on the CF Server

    I think what can be done with non-J2EE sessions, but there
    Explicitly set the token cookies and cookies memory no files cookies in
    the browser. I've seen technical notes on how to do it.

    A third option is with JavaScript. We can define an onUnLoad event on the
    page that accesses a CFM page that can structClear() or structDelete()
    Session variables when necessary. What's caviots JavaScript used.

  • Error in session variable does not reponcing in responses

    Hi expert,
    I don't know my session variable is unable to response in the responses, in RPD he retriving values when it comes to respond to its shows me this error, I can't understand. Can someone tell me or explain what means this error!



    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 46043] Internal error: no matching for expr xx_xyz_F_ACTUALS table. BUSINESS_UNIT_SID, fichier.\Src\SQOSPSimplifyJoin.cpp, line 118. (HY000)
    Publ. SQL: SELECT VALUEOF (NQ_SESSION.cat) saw_0, "-cat Budgets." Saw_1 budget "Finance GL' ORDER BY saw_0

    Let me know please.

    Thank you
    Chi

    The error showing a name strange table.

    xx_xyz_F_ACTUALS. BUSINESS_UNIT_SID

    East - the correct name of the table to MDB and check if you have conditions or content where clause code for any errors?

  • Cannot get the value of the session variable (using row wise initialization).

    Hi all

    I have a scenario where I'm trying to get the value of the variable session of two columns.

    Table of database consists of the name of USER, Country_Region, columns Country_SubRegion.

    For example: ChadraKanth, Americas, America West is the data.

    I wrote a Sql query in the block of session initialization:

    Select "CR", Country_Region, Country_SubRegion

    of row_wise_init

    where USERID = ": the USER"

    When I test the RPD code gives the result like this:

    CR WesternAmerica of Americas.

    In my report I have two columns, a region and an another subregion.

    When I try to filter with the session variable "CR" for the column region his error giving: session variable is not initialized with

    This is the default.

    Question:

    1. session variable is contains several values in the column?

    2. how to filter the report on columns of region and sub region?

    Please suggest me.

    Kind regards

    Chandra Khalil.

    Hello

    A session variable cannot store more than one column, 1 variable = 1 value (column 1), horizontal initialization allows to store several lines, multiple values in the same variable.

    If to a user, you have several lines with multiple values, you need horizontal initialization, but it cannot store in the variable the value of the region and subregion.

  • ORA-01008: not all variables - interactive report

    I have a report that is interactive, based on the query below. When I try to run the page, I get a ' ORA-01008: not all variables bound "error.

    By checking the session state, I can see that all the variables needed for this query are defined:
    DTP_P10_STARTDT = 28-JUN-10
    DTP_P10_ENDDT = 12-JUL-10 
    CBO_P10_PRODUCTLINE = 1
    H_P10_BASEPRODIDLIST = _-1_
    H_P10_PRODUCTIDLIST = _-1_
    H_P10_VERSIONIDLIST = _-1_
    H_P10_CUSTOMERIDLIST = _-1_
    If I run the query in SQLDeveloper, substituting values, it works perfectly. I copied all the variable names since the APEX session state information, so I know that there are any misspelling or typographical errors. Always running v3.2 btw.

    select b.customer_name,
           '<a href="f?p=&APP_ID.:20:&SESSION.::&DEBUG.:RP,20:H_P20_STARTDT,H_P20_ENDDT,H_P20_NORMSEVERITY,H_P20_PRODUCTLINE,H_P20_BASEPRODIDLIST,H_P20_CUSTOMERID,H_P20_PRODUCTIDLIST,H_P20_VERSIONIDLIST:&DTP_P10_STARTDT.,&DTP_P10_ENDDT.,1,&CBO_P10_PRODUCTLINE.,&H_P10_BASEPRODUCT.,' || b.customer_id || ',&H_P10_PRODUCTIDLIST.,&H_P20_VERSIONIDLIST.">' || sum(b.open_critical) || '</a>' as open_critical,
           '<a href="f?p=&APP_ID.:20:&SESSION.::&DEBUG.:RP,20:H_P20_STARTDT,H_P20_ENDDT,H_P20_NORMSEVERITY,H_P20_PRODUCTLINE,H_P20_BASEPRODIDLIST,H_P20_CUSTOMERID,H_P20_PRODUCTIDLIST,H_P20_VERSIONIDLIST:&DTP_P10_STARTDT.,&DTP_P10_ENDDT.,1,&CBO_P10_PRODUCTLINE.,&H_P10_BASEPRODUCT.,' || b.customer_id || ',&H_P10_PRODUCTIDLIST.,&H_P20_VERSIONIDLIST.">' || sum(b.closed_critical) || '</a>' as closed_critical,
           '<a href="f?p=&APP_ID.:20:&SESSION.::&DEBUG.:RP,20:H_P20_STARTDT,H_P20_ENDDT,H_P20_NORMSEVERITY,H_P20_PRODUCTLINE,H_P20_BASEPRODIDLIST,H_P20_CUSTOMERID,H_P20_PRODUCTIDLIST,H_P20_VERSIONIDLIST:&DTP_P10_STARTDT.,&DTP_P10_ENDDT.,1,&CBO_P10_PRODUCTLINE.,&H_P10_BASEPRODUCT.,' || b.customer_id || ',&H_P10_PRODUCTIDLIST.,&H_P20_VERSIONIDLIST.">' || sum(b.open_major) || '</a>' as open_major,
           '<a href="f?p=&APP_ID.:20:&SESSION.::&DEBUG.:RP,20:H_P20_STARTDT,H_P20_ENDDT,H_P20_NORMSEVERITY,H_P20_PRODUCTLINE,H_P20_BASEPRODIDLIST,H_P20_CUSTOMERID,H_P20_PRODUCTIDLIST,H_P20_VERSIONIDLIST:&DTP_P10_STARTDT.,&DTP_P10_ENDDT.,1,&CBO_P10_PRODUCTLINE.,&H_P10_BASEPRODUCT.,' || b.customer_id || ',&H_P10_PRODUCTIDLIST.,&H_P20_VERSIONIDLIST.">' || sum(b.closed_major) || '</a>' as closed_major,
           '<a href="f?p=&APP_ID.:20:&SESSION.::&DEBUG.:RP,20:H_P20_STARTDT,H_P20_ENDDT,H_P20_NORMSEVERITY,H_P20_PRODUCTLINE,H_P20_BASEPRODIDLIST,H_P20_CUSTOMERID,H_P20_PRODUCTIDLIST,H_P20_VERSIONIDLIST:&DTP_P10_STARTDT.,&DTP_P10_ENDDT.,1,&CBO_P10_PRODUCTLINE.,&H_P10_BASEPRODUCT.,' || b.customer_id || ',&H_P10_PRODUCTIDLIST.,&H_P20_VERSIONIDLIST.">' || sum(b.open_minor) || '</a>' as open_minor,
           '<a href="f?p=&APP_ID.:20:&SESSION.::&DEBUG.:RP,20:H_P20_STARTDT,H_P20_ENDDT,H_P20_NORMSEVERITY,H_P20_PRODUCTLINE,H_P20_BASEPRODIDLIST,H_P20_CUSTOMERID,H_P20_PRODUCTIDLIST,H_P20_VERSIONIDLIST:&DTP_P10_STARTDT.,&DTP_P10_ENDDT.,1,&CBO_P10_PRODUCTLINE.,&H_P10_BASEPRODUCT.,' || b.customer_id || ',&H_P10_PRODUCTIDLIST.,&H_P20_VERSIONIDLIST.">' || sum(b.closed_minor) || '</a>' as closed_minor, 
           1 as sortcol
      from 
    (select a.customer_name, 
            a.customer_id, 
            (select count(a.issue_id) from issue_severity where a.issue_severity_id = issue_severity.issue_severity_id and a.close_dt is null AND issue_severity.normalized_issue_severity_id = 1) as open_critical,
            (select count(a.issue_id) from issue_severity where a.issue_severity_id = issue_severity.issue_severity_id and a.close_dt is not null AND issue_severity.normalized_issue_severity_id = 1) as closed_critical,
            (select count(a.issue_id) from issue_severity where a.issue_severity_id = issue_severity.issue_severity_id and a.close_dt is null AND issue_severity.normalized_issue_severity_id = 2) as open_major,
            (select count(a.issue_id) from issue_severity where a.issue_severity_id = issue_severity.issue_severity_id and a.close_dt is not null AND issue_severity.normalized_issue_severity_id = 2) as closed_major,
            (select count(a.issue_id) from issue_severity where a.issue_severity_id = issue_severity.issue_severity_id and a.close_dt is null AND issue_severity.normalized_issue_severity_id = 4) as open_minor,
            (select count(a.issue_id) from issue_severity where a.issue_severity_id = issue_severity.issue_severity_id and a.close_dt is not null AND issue_severity.normalized_issue_severity_id = 4) as closed_minor
        from (select issue.issue_id, 
                     issue.issue_severity_id,
                     support_call.close_dt, 
                     customer.customer_name, 
                     customer.customer_id
                  From support_call, 
                       issue, 
                       configuration, 
                       base_product, 
                       code_base_class, 
                       code_base, 
                       release, 
                       customer
                where issue.support_call_id = support_call.support_call_id 
                and support_call.product_id = configuration.id 
                and configuration.product_id = base_product.id 
                and base_product.code_base_id = code_base.code_base_id 
                and code_base.code_base_class_id = code_base_class.code_base_class_id 
                and support_call.release_id = release.release_id 
                and support_call.customer_id = customer.customer_id
                and trunc(support_call.open_dt) >= : DTP_P10_STARTDT 
                and trunc(support_call.open_dt) <= :DTP_P10_ENDDT 
                and support_call.customer_id = customer.customer_id 
                and code_base_class.product_line_id = :CBO_P10_PRODUCTLINE 
                AND decode (:H_P10_BASEPRODIDLIST, '_-1_', 1, instr(:H_P10_BASEPRODIDLIST, '_' || base_product.id || '_')) > 0 
                AND decode(:H_P10_PRODUCTIDLIST, '_-1_', 1, instr(:H_P10_PRODUCTIDLIST, '_' || support_call.product_id || '_')) > 0 
                AND DECODE (:H_P10_VERSIONIDLIST, '_-1_', 1, instr( :H_P10_VERSIONIDLIST,'_' || release.version_num || '_')) > 0
                AND decode(:H_P10_CUSTOMERIDLIST, '_-1_', 1, instr(:H_P10_CUSTOMERIDLIST, '_' || support_call.customer_id || '_')) > 0
                AND customer.inactive_ind = 0
                AND customer.deleted_ind = 0) a ) b
    group by b.customer_name, b.customer_id

    You don't mention your version of Apex - as you can imagine, this is important info. 3.1.2 (and probably others have a limitation to find out when he meets '-' sometimes). Do you have a '-' comments in your SQL code that you have not indicated? Try to remove one point referees at a time until the problem goes away, or replace: H_P10_BASEPRODIDLIST with v ('H_P10_BASEPRODIDLIST') etc.

  • ORA-01008: not all variables bound... but only in an environment

    Running Oracle on Solaris 11.2.0.3.15.

    Two test environments, each with identical spfiles (give or take the database names, etc.).

    Here is my code in both cases:

    create or replace procedure HJR_TEST

    as

    v_daykey_from number (10): = 13164.

    v_text varchar2 (3000);

    Start

    Select cd.daykey. CD. CalendarDate in v_text

    from the cds.cdsday CD,

    CDS. Snapshot vsp

    where vsp.daykey = cd.daykey

    and cd.daykey > = v_daykey_from

    and rownum < 2;

    dbms_output.put_line (v_text);

    end;

    Work as an environment:

    SQL > start

    hjr_test;

    end;

    PL/SQL procedure successfully completed.

    1318001/FEB/16

    Run it in another environment:

    Error from line: 18 in the command.

    Start

    hjr_test;

    end;

    Error report-

    ORA-01008: not all variables

    ORA-06512: at the 'JRH. HJR_TEST', line 7

    ORA-06512: at line 2

    01008 00000 - "not all variables.

    * Cause:

    * Action:

    Same code; init.ora parameters; same version of the database. same o/s; different results.

    Got clues as to where I should be looking for the trouble, please?

    Concerning

    JRH

    Thought I better update the forum on this one.

    This is a bug confirmed, although the bug report is not published.

    There are cases where the optimizer calls kkpap do partition

    pruning in the compilation. Sometimes to partition pruning is done in

    subqueries running against the table. If the bind variables values

    required to operate these subqueries, so we cannot do the pruning to

    compile time.

    The fix for the bug 14458214 fixed this problem in the case where the

    subquery was used to carve at the partition level. However, it is

    possible that use us another method at the level of the partition, and then use

    pruning of subquery subpartition level; this case was not

    addressed by the fix for 14458214.

    The mentioned bug has a patch available in 11.2.0.4 and don't occur in 12 c. For some reason, I'm also made bug 17258090, but I see no content in this bug report. :-(

    Possible solutions in 11.2.0.3 is to make a alter session set "_subquery_pruning_enabled" = false; ... but since X$ KSPPI lists _subquery_pruning_enabled as a hidden parameter, I guess you can also set it instance globally, although obviously the consequences for other queries would at this time must be evaluated very carefully.


  • OracleException "ORA-01008: not all variables ' what SQL text contains both '-'and':'

    We have stumbled into what seems to be a similar bug as @user4111944 and Alex Keh - Product Manager-Oracle in ManagedDataAccess - bug in the drive when you use '-'and':' SQL text .


    We use Oracle.ManagedDataAccess v. 12.1.2400 (last NuGet package) and get an OracleException with the message


    ORA-01008: not all variables


    When we try to run the following code:


    var l_connectionString = "a connection string.

    var l_commandText = "UPDATE table_test SET col_description = '-test', col_time =: param WHERE col_id = 42 ';

    using (IDbConnection l_connection = new Oracle.ManagedDataAccess.Client.OracleConnection(l_connectionString))

    {

    l_connection. Open();

    var l_command is l_connection. CreateCommand();

    l_command.CommandText = l_commandText;

    var l_parameter is l_command. CreateParameter();

    l_parameter. ParameterName = "param";

    l_parameter. Value = DateTime.Now;

    l_command. Parameters.Add (l_parameter);

    l_command. ExecuteNonQuery());

    }

    The code runs perfectly if the omission of the '-' OR the side of a parameter value assignment (i.e. omitting ', col_time =: param').

    The stack for the OracleException trace is as follows:

    at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution (OracleConnectionImpl connectionImpl, Int32 & cursorId, bThrowArrayBindRelatedErrors Boolean, OracleException & exceptionForArrayBindDML, Boolean hasMoreRowsInDB, Boolean bFirstIterationDone)

    at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution (OracleConnectionImpl connectionImpl, Int32 & cursorId, bThrowArrayBindRelatedErrors Boolean, OracleException & exceptionForArrayBindDML, Boolean bFirstIterationDone)

    at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteNonQuery (String queryString, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, longFetchSize of Int32, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64 [] scnFromExecution, OracleParameterCollection & bindByPositionParamColl, Boolean bBindParamPresent, OracleException & exceptionForArrayBindDML, Boolean isFromEF)

    at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteNonQuery)

    UPDATE 1:

    Now, I have tested with older versions of Oracle.ManagedDataAccess.dll thus:

    • ODAC 12 c Release 4 (12.1.0.2.4 - released October 5, 2015) -fails with ORA-01008: not all variables
    • ODAC Release 3 (12.1.0.2.1 - published December 23, 2014) 12 c - fails with ORA-01008: not all variables
    • ODAC 12 c Release 2 (12.1.0.1.2 - released on December 20, 2013) - successful!

    Therefore, changes in driver management Oracle introduced between December 20, 2013 and December 23, 2014 has caused this problem.

    UPDATE 2:

    I dug some more in the question and after decompilation December 2013 and December 2014 versions, I found the piece interesting next to the code in the implementation of the ExecuteNonQuery()) method in the inner class OracleInternal.ServiceObjects.OracleCommandImpl. The code in red was added in the version of December 2014:

    ...

    else if (commandType! = CommandType.TableDirect)

    {

    OracleCommandImpl.TrimCommentsFromSQL (ref str);

    this.m_sqlStatementType = OracleCommandImpl.GetSqlStatementType (str);

    this.m_bHasReturningClause = OracleCommandImpl.HasReturningClause (str, this.m_sqlStatementType);

    }

    ...

    Take OracleCommandImpl.TrimCommentsFromSQL () method for a test ride easily reveal its weaknesses. It does not take into account the sequence '-' may appear in a quoted string, treating them as a comment and deletes the rest of the line...

    Could you please address this issue?

    Best regards

    Bernt

    Yes, the cause seems exactly the same thing as Bug 22308527. Once fix us this bug, please fix your problem as well.

  • Not all variables

    I don't know why I am getting below error.

    ORA-01008: not all variables
    "ORA-06512: at VENDORS_GRAPH_FOR_ITEMS_01 ', line 101
    ORA-06512: at line 9 level


    PROCEDURE vendors_graph_for_items_01)
    p_proposalNM IN VARCHAR2,
    p_result ON SYS_REFCURSOR)
    IS
    v_letting VARCHAR2 (40);
    v_Order VARCHAR2 (40);
    v_prop VARCHAR2 (40);
    lv_sql VARCHAR2 (32767): = NULL;
    BEGIN

    lv_sql: =.
    ' SELECT DISTINCT
    R.DESCR,
    To_char ((I.QTY * I.PRICE), "$999,999,999.00") ';

    FOR lv_rec IN (SELECT DISTINCT R.VENDOR, V.BIDTOTAL
    Of
    )


    LOOP
    lv_sql: =.
    lv_sql
    || ', TO_CHAR (MAX (DECODE (TRIM (V.VENDOR), "')))
    || TRIM (lv_rec. NAME OF THE SELLER
    || (((', B.AMOUNT)), "$999,999,999.00") AS "" ".
    || (Lv_rec.vENDOR_ TRIM
    || '  "';
    END LOOP;
    lv_sql: =.
    lv_sql
    || '

    ,
    (SELECT DISTINCT
    OFFERS. EXTENDEDAMOUNT

    OF proposalitem.

    ) Lowbid


    THE PROPOSAL P.
    PROPOSALSECTION S

    WHERE P.PROpid = S.PROPid

    AND L.LEt =: B1
    AND P.CALL =: B2

    R.ITEM GROUP,
    P.PROP,

    Order of lowbid desc';

    -DBMS_OUTPUT.put_line (lv_sql);

    P_result OPEN FOR lv_sql AID v_letting, v_Order;
    END;
    /

    Hello

    Variables with colon(:) que vous avez dans votre requête sont considérés comme deles de variables bind et vous devez fournir la valeur d'initialisation pour chacun d'eux (: b1,: b2,: b3) when using the query.)

    In your case, you initialize two of them with the help of the clause. This is the reason why the query to run successfully when you comment on one of them.

    Cheerz,

    Stako

Maybe you are looking for