Cursor / rule number

Hi all, I have a new iMac in our studio, and when I drag my mouse / cursor on the screen in Indesign, I get small additional black pixels within the area of the rule - making it almost impossible to judge each mm increment

Someone at - it suggestions that will cure this "bug"?  -Very much appreciated - Danny

[Moved from the forum comments in the forum specific program... MOD]

Happy days!  -thrown on the reboot of InDesign preferences & seems to be fixed - Thx Steve!

Tags: InDesign

Similar Questions

  • Position of the cursor in number of field using firefox

    Hello

    I have a problem; When you click a field (in firefox), the cursor will initially and you cannot click anywhere else in the population field unless you use the arrow keys.

    This does not happen with safari, chrome or opera.

    This problem appeared suddenly even on pages that worked very well (and have separate css codes).

    This is one of the scripts pages where there are fields in question. (not sure if its something that I did as I said before, all the pages worked very well that do not link to the same css stylesheet).

    <? php require_once('Connections/drama_database.php');? >

    <? PHP

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION < 6) {}

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    $editFormAction = $_SERVER ['PHP_SELF'];

    If (isset {}

    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

    }

    If ((isset($_POST["MM_update"])) & & ($_POST ["MM_update"] == "profile_update")) {}

    $updateSQL = sprintf ("set a DAY to users SET username = %s, password = %s, firstname = %s, lastname = %s, email = %s, userlevel = WHERE id = %s %s",

    GetSQLValueString ($_POST ['username_field'], "text").

    GetSQLValueString ($_POST ['password_field'], "text").

    GetSQLValueString ($_POST ['firstname_field'], "text").

    GetSQLValueString ($_POST ['lastname_field'], "text").

    GetSQLValueString ($_POST ['email_field'], "text").

    GetSQLValueString ($_POST ['userlevel_field'], "int").

    GetSQLValueString ($_POST ['id'], "int"));

    @mysql_select_db ($database_drama_database, $drama_database);

    $Result1 = mysql_query ($updateSQL, $drama_database) or die (mysql_error ());

    $updateGoTo = "admin_user_management.php";

    If (isset {}

    $updateGoTo. = (strpos ($updateGoTo, '?'))? « & » : « ? » ;

    $updateGoTo. = $_SERVER ['QUERY_STRING'];

    }

    header (sprintf ("location: %s", $updateGoTo));

    }

    $colname_userprofile = "-1";

    If (isset($_GET['id'])) {}

    $colname_userprofile = $_GET ['id'];

    }

    @mysql_select_db ($database_drama_database, $drama_database);

    $query_userprofile = sprintf ("" SELECT * FROM users WHERE id = %s ", GetSQLValueString ($colname_userprofile,"int")");

    $userprofile = mysql_query ($query_userprofile, $drama_database) or die (mysql_error ());

    $row_userprofile = mysql_fetch_assoc ($userprofile);

    $totalRows_userprofile = mysql_num_rows ($userprofile);

    If (! isset {})

    session_start();

    }

    ? >

    <! doctype html >

    < html >

    <! - Favicon - >

    < link rel = "shortcut icon" type = "image/png" href = "images/icon.png" / > "

    < link href = "SpryAssets/SpryValidationSelect.css" rel = "stylesheet" type = "text/css" > "

    < script src = "SpryAssets/SpryValidationSelect.js" type = "text/javascript" > < / script > "

    < head >

    < meta charset = "utf-8" >

    < title > updated the user < /title > profile

    < style type = "text/css" >

    {body

    margin: 0px;

    background-image: url(images/theatre.jpg);

    background-position: Center;

    background-repeat: no-repeat;

    background-attachment: fixed;

    background-size: cover;

    background-color: white;

    / * Transitions * /.

    -webkit-transition: none! important;

    -moz-transition: none! important;

    -ms-transition: none! important;

    -o - transition: none! important;

    transition: none! important;

    }

    {.form_area}

    background-color: #5fa0c0;

    height: auto;

    Width: 400 PX;

    left: 50%;

    margin left:-200px;

    margin-top: 0px;

    position: absolute;

    padding-top: 20px;

    margin-bottom :-auto 1px;

    box-shadow: 0px 10px 30px 5px #000000;

    z-index: 1;

    }

    {.form_field}

    padding-top: 10px;

    padding-bottom: 10px;

    padding-right: 80px;

    padding-left: 50px;

    }

    {.form_fielddw}

    padding-top: 10px;

    padding-bottom: 10px;

    padding-right: 50px;

    padding-left: 50px;

    }

    {.info_field}

    padding-top: 10px;

    padding-bottom: 10px;

    padding-right: 50px;

    padding-left: 50px;

    do-family: "Slabo 27px", serif;

    color: white;

    }

    {.username_field}

    Width: 100%;

    height: 30px;

    do-family: "Slabo 27px", serif;

    do-size: 18px;

    padding-left: 30px;

    border: none;

    border-radius: 5px;

    background-image: url(images/icons/silhouette78.png);

    background-repeat: no-repeat;

    background-position: left top of page 5px 5px;

    }

    {.password_field}

    Width: 100%;

    height: 30px;

    do-family: "Slabo 27px", serif;

    do-size: 18px;

    padding-left: 30px;

    border: none;

    border-radius: 5px;

    background-image: url(images/icons/closed.png);

    background-repeat: no-repeat;

    background-position: left top of page 5px 5px;

    }

    {.firstname_field}

    Width: 100%;

    height: 30px;

    do-family: "Slabo 27px", serif;

    do-size: 18px;

    padding-left: 30px;

    border: none;

    border-radius: 5px;

    background-image: url(images/icons/silhouette78.png);

    background-repeat: no-repeat;

    background-position: left top of page 5px 5px;

    }

    {.lastname_field}

    Width: 100%;

    height: 30px;

    do-family: "Slabo 27px", serif;

    do-size: 18px;

    padding-left: 30px;

    border: none;

    border-radius: 5px;

    background-image: url(images/icons/silhouette78.png);

    background-repeat: no-repeat;

    background-position: left top of page 5px 5px;

    }

    {.email_field}

    Width: 100%;

    height: 30px;

    do-family: "Slabo 27px", serif;

    do-size: 18px;

    padding-left: 30px;

    border: none;

    border-radius: 5px;

    background-image: url(images/icons/close13.png);

    background-repeat: no-repeat;

    background-position: left albums 5px 6px;

    }

    {.userlevel_dwfield}

    Width: 270px;

    height: 30px;

    do-family: "Slabo 27px", serif;

    do-size: 18px;

    padding-left: 30px;

    border: none;

    border-radius: 5px;

    -webkit-appearance: none;

    -moz-appearance: none;

    background-image: url(images/icons/key162.png);

    background-repeat: no-repeat;

    background-position: left albums 5px 6px;

    cursor: pointer;

    }

    {.update_button}

    Width: 100%;

    background-color: #406c8a;

    border-left: 3px white;

    border-right: 3px white;

    border-bottom: 3px white;

    color: white;

    Police-weight: 600;

    font size: 24 PX.

    padding-top: 20px;

    padding-bottom: 20px;

    do-family: "Slabo 27px", serif;

    margin-top: 10px;

    margin-bottom:-2px;

    z-index: 5;

    -webkit-transition: all 0. 2s ease component software snap-in;

    -moz-transition: all 0. 2s ease component software snap-in;

    -o - transition: all 0. 2s ease component software snap-in;

    -ms-transition: all 0. 2s ease component software snap-in;

    transition: all 0. 2s ease component software snap-in;

    cursor: pointer;

    }

    {.update_button:hover}

    background-color: #1c2d39;

    color: white;

    -webkit-transition: all 0. 2s ease component software snap-in;

    -moz-transition: all 0. 2s ease component software snap-in;

    -o - transition: all 0. 2s ease component software snap-in;

    -ms-transition: all 0. 2s ease component software snap-in;

    transition: all 0. 2s ease component software snap-in;

    }

    {.update_button: active}

    background-color: white;

    color: #1c2d39;

    -webkit-transition: all 0s facilitated;

    -moz-transition: all 0s facilitated;

    -o - transition: all 0s facilitated;

    -ms-transition: all 0s facilitated;

    transition: all 0s facilitated;

    }

    / * ToolTip * /.

    {a.tooltips}

    position: relative;

    display: inline;

    }

    a.ToolTips span {}

    position: absolute;

    Width: 140px;

    color: #FFFFFF;

    do-family: "Slabo 27px", serif;

    background: #1C2D39;

    height: 30px;

    line-height: 30px;

    text-align: center;

    visibility: hidden;

    border-radius: 2px;

    box-shadow: 0px 0px 5px #000000;

    }

    a.ToolTips duration: after {}

    content: ";

    position: absolute;

    top: 50%;

    right: 100%;

    margin-top:-8px;

    Width: 0; height: 0;

    border-right: 8px solid #1C2D39;

    border-top: 8px solid transparent;

    border-bottom: 8px solid transparent;

    }

    a:hover.ToolTips span {}

    visibility: visible;

    opacity: 0.9;

    left: 100%;

    top: 50%;

    margin-top:-15px;

    margin left: 15px;

    z index: 999;

    }

    : - webkit - entry-placeholder {color: #666 ;}}

    : - moz - placeholder {color: #666 ;} / * firefox 19 + * /}

    : - ms - entry-placeholder {color: #666 ;} / * ie * /}

    entry: - moz - placeholder {color: #666 ;}}

    {.dwfield_icon}

    float: left;

    position: absolute;

    display: inline-block;

    padding-top: 5px;

    padding-left: 5px;

    }

    < / style >

    < link href = "stylesheets/main_stylesheet.css" rel = "stylesheet" type = "text/css" > "

    < link href = "stylesheets/header_stylesheet.css" rel = "stylesheet" type = "text/css" > "

    < link href = "SpryAssets/SpryValidationTextField.css" rel = "stylesheet" type = "text/css" > "

    < link href = "SpryAssets/SpryValidationPassword.css" rel = "stylesheet" type = "text/css" > "

    < script src = "SpryAssets/SpryValidationTextField.js" type = "text/javascript" > < / script > "

    < script src = "SpryAssets/SpryValidationPassword.js" type = "text/javascript" > < / script > "

    < / head >

    < body >

    < div class = "header_gap" >

    < div class = "header" >

    <? PHP include ("_header.php");? >

    < / div >

    < / div >

    < div class = "Heading1" >

    User profile update < / div >

    < do action = "<?" PHP echo $editFormAction;? ">" name = "profile_update" method = "POST" class = "form_area" >

    < div class = "form_field" > < span id = "sprytextfield1" >

    < label for = "username_field" > < / label >

    < a class = "tooltips" href = "#" >

    < Entry autofocus = "autofocus" type = "text" name = "username_field" id = "username_field" class = "username_field" placeholder = "Username" = value "<?" PHP echo $row_userprofile ['username'];? > "> < span > username </span > < /a >."

    < span class = "textfieldRequiredMsg" > please enter a user name </span > < / span >

    < / div >

    < div class = "form_field" > < span id = "sprypassword1" >

    < label for = "password_field" > < / label >

    < a class = "tooltips" href = "#" >

    < input type = "password" name = "password_field" id = "password_field" class = "password_field" placeholder = "Password" value = "<?" PHP echo $row_userprofile ["password"];? > "> < span > password </span > < /a >"

    < span class = "passwordRequiredMsg" > please enter a password for </span > < span class = "passwordInvalidStrengthMsg" > must contain a capital letter and a number of 4 to 20 characters long </span > < span class = "passwordMinCharsMsg" > must be 4 to 20 characters long </span > < span class = "passwordMaxCharsMsg" > must be 4 to 20 characters long </span > < / span >

    < / div >

    < div class = "form_field" >

    < span id = "sprytextfield3" >

    < label for = "firstname_field" > < / label >

    < a class = "tooltips" href = "#" >

    < input type = "text" name = "firstname_field" id = "firstname_field" class = "firstname_field" placeholder = "First name" value = "<?" PHP echo $row_userprofile ['firstname'];? > "> < span > name </span > < /a >"

    < span class = "textfieldRequiredMsg" > please enter your first name </span > < / span >

    < / div >

    < div class = "form_field" >

    < span id = "sprytextfield4" >

    < label for = "lastname_field" > < / label >

    < a class = "tooltips" href = "#" >

    < input type = "text" name = "lastname_field" id = "lastname_field" class = "lastname_field" placeholder = "Last Name" = value "<?" PHP echo $row_userprofile ["lastname"];? > "> < span > name </span > < /a >"

    < span class = "textfieldRequiredMsg" > please enter your family name </span > < / span >

    < / div >

    < div class = "form_field" >

    < span id = "sprytextfield5" >

    < label for = "email_field" > < / label >

    < a class = "tooltips" href = "#" >

    < input type = "text" name = "email_field" id = "email_field" class = "email_field" placeholder = "Email" value = "<?" PHP echo $row_userprofile ['email'];? > "> < span > e-mail </span > < /a >"

    < span class = "textfieldRequiredMsg" > please enter your email </span > < span class = "textfieldInvalidFormatMsg" > please enter a valid e-mail </span > < / span >

    < / div >

    < div class = "form_fielddw" >

    < span id = "spryselect1" >

    < label for = "userlevel_field" > < / label >

    < select name = "userlevel_field" id = "userlevel_field" class = "userlevel_dwfield" >

    < option value = "-1" > - < / option >

    < option value = "0" > user < / option >

    < option value = "1" > moderator < / option >

    < option value = "2" > Admin < / option >

    "< / select > < div class ="dwfield_icon"> < a class ="tooltips"href =" # "> < img src="images/icons/1424209630__dropdown.png "width ="20"height ="20"> < span > drop </span > < /a > < / div >

    < span class = "selectInvalidMsg" > please select the access level of the user </span > < span class = "selectRequiredMsg" > please select the access level of the user </span > < / span >

    < / div >

    < / div >

    < div class = "info_field" > ID: <? PHP echo $row_userprofile ['id'];? > < br >

    Date of Reg: <? PHP echo $row_userprofile ['regdate'];? > < br >

    < / div >

    < name of the button = "login" type = 'submit' class = "update_button" > update profile < / button >

    < input name = "id" type = "hidden" id = 'hiddenField' value = "<?" PHP echo $row_userprofile ['id'];? > ">"

    < input type = "hidden" name = "MM_update" value = "profile_update" >

    < / make >

    < script type = "text/javascript" >

    var sprytextfield1 = new Spry.Widget.ValidationTextField ("sprytextfield1", "none", {validateOn:["blur"]});})

    var sprytextfield3 = new Spry.Widget.ValidationTextField ("sprytextfield3", "none", {validateOn:["blur"]});})

    var sprytextfield4 = new Spry.Widget.ValidationTextField ("sprytextfield4", "none", {validateOn:["blur"]});})

    var sprytextfield5 = new Spry.Widget.ValidationTextField ("sprytextfield5", "email", {validateOn:["blur"]});})

    var sprypassword1 = new Spry.Widget.ValidationPassword ("sprypassword1", {validateOn: ["blur"], minUpperAlphaChars:1, minNumbers:1, minChars:4, maxChars:20});})

    var spryselect1 = new Spry.Widget.ValidationSelect ("spryselect1", {invalidValue: "-1"});

    < /script >

    < / body >

    < / html >

    <? PHP

    mysql_free_result ($UserProfile);

    ? >

    Thank you!

    So I found the problem:

    After testing and narrowing of the question, I found that the href = "#" in each entry form was the problem. I only am not sure as to why, but removing the tag href as the problem has been resolved.

  • PLS-00362: Invalid cursor return type; 'NUMBER' must be a record type

    Hello

    Having a little trouble with the following code example provided to http://www.dba-oracle.com/plsql/t_plsql_cursor_variables.htm:
      1  DECLARE
      2    TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER;
      3    c_cursor  t_ref_cursor;
      4    l_row   NUMBER;
      5  BEGIN
      6    DBMS_OUTPUT.put_line('Strongly typed REF CURSOR using SCALAR type. Expect an error!');
      7    OPEN c_cursor FOR
      8      SELECT COUNT(*) cnt
      9      FROM   cursor_variable_test;
     10    LOOP
     11      FETCH c_cursor
     12      INTO  l_row;
     13      EXIT WHEN c_cursor%NOTFOUND;
     14      DBMS_OUTPUT.put_line(l_row);
     15    END LOOP;
     16    CLOSE c_cursor;
     17* END;
     18  /
      TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER;
                           *
    ERROR at line 2:
    ORA-06550: line 2, column 24:
    PLS-00362: invalid cursor return type; 'NUMBER' must be a record type
    ORA-06550: line 2, column 3:
    PL/SQL: Item ignored
    In the code above, SELECT COUNT (*)... returns a NUMBER. I know it's an aggregation function, but it returns a single value.
    Why can't return a value in a column of a row in a NUMBER?
    How can I change the SQL code so that I can do this?

    Furthermore, I wonder about the use of FETCH with a count (*)... FETCH is supposed to fetch the next row... How it works when you select an aggregate as County?

    Thank you very much
    Jason

    >
    TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER;
    *
    ERROR on line 2:
    ORA-06550: line 2, column 24:
    PLS-00362: Invalid cursor return type; 'NUMBER' must be a record type
    ORA-06550: line 2, column 3:
    PL/SQL: Ignored Element

    In the code above, SELECT COUNT (*)... returns a NUMBER. I know it's an aggregation function, but it returns a single value.
    Why can't return a value in a column of a row in a NUMBER?
    How can I change the SQL code so that I can do this?
    >
    The exception is in line 2: your cursor statement. And the answer is in the text that you access
    >
    The return value of a strongly typed REF CURSOR must be a folder that can be defined using % TYPE % ROWTYPE attributes or record structure.
    >
    You said the CURSOR to return a NUMBER. And as the text says, he must be a 'record '.
    >
    Furthermore, I wonder about the use of FETCH with a count (*)... FETCH is supposed to fetch the next row... How it works when you select an aggregate as County?
    >
    As you said already FETCH retrieves the next line, if any. A query is a request is a request. It returns a result set. A query that uses aggregates returns a result set. A query that does not aggregate returns a result set.

    Your simple COUNT (*) SELECT query returns a result set that consists of a LINE and a line a ONE COLUMN of type NUMBER. Although there is only one column in the result set, what is returned is a RECORD or a LINE. That's why you have to report your data cursor return type a document using the % ROWTYPE or % TYPE attributes or a record structure.

  • PL/SQL: ORA-00904 invalid identifier, PLS-00225: reference of the subprogram or cursor is out of reach

    Hi gurus,

    Your help is greatly appreciated.

    Will I have a fucntion where we have the object it contains.

    The changes that I have doen are: 2 new cusrosrs, but its failure with the error below.

    Highlighted are the changes I made. his length very well before your help is greatly appreciated.

    1) PL/SQL: ORA-00904: "GET_ACQ_ID.". ' ACQ_ID ': invalid identifier.

    (2) PLS-00225: subprogram or cursor reference 'GET_ACQ_ID' is out of range

    Here is the code:

    _________________________________________________________________________

    FUNCTION GET_IP_COMM_INFO return PROD. TERMINAL_IP_COMM_INFO_TAB IS

    vTer TER.ter_id%TYPE;
    vAPPL_ID TAC.appl_id%TYPE;
    vValue TSF.vALUE%TYPE;

    IP_COMM_INFO_LIST PROD. TERMINAL_IP_COMM_INFO_TAB: = PROD. TERMINAL_IP_COMM_INFO_TAB();

    CURSOR GET_ACQ_ID IS
    SELECT ACQ_ID
    TER TAHA, MERC M, PROF
    WHERE T.MER_ID = M.MER_ID
    AND M.PROFID = P.PROF_ID
    AND T.TER_ID = vTer_id;


    CURSOR GET_INFO_CURSOR IS
    SELECT H.DESCRIPTION AS HOST_DESCRIPTION
    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI
    WHERE (AICAI. HOST_ID = H.HOST_ID) and
    (AICAI. APPL_ID = vAPPL_ID);

    CURSOR GET_ACQ_CURSOR IS
    SELECT H.DESCRIPTION AS HOST_DESCRIPTION
    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI
    WHERE (AICAI. HOST_ID = H.HOST_ID) and
    (AICAI. APPL_ID = vAPPL_ID) AND
    (ACQUIRER_ID = GET_ACQ_ID. ACQ_ID);
    BEGIN

    vTer_id: = GLOBAL_VARIABLES.gv_ref_Ter_id;

    BEGIN
    SELECT the VALUE IN vvalue OF Tsf
    WHERE TER_id = vTEr_ID AND APPL_ID is vAPPL_ID and FEATURE_ID = 861;.

    Vvalue = '04' IF THEN
    For GET_ACQ_REC IN GET_ACQ_CURSOR
    LOOP
    IP_COMM_INFO_LIST. EXTEND;
    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);
    END LOOP;
    ON THE OTHER
    FOR GET_INFO_REC IN GET_INFO_CURSOR
    LOOP
    IP_COMM_INFO_LIST. EXTEND;
    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_INFO_REC. HOST_DESCRIPTION);
    END LOOP;
    END IF;

    RETURN IP_COMM_INFO_LIST;
    EXCEPTION WHEN OTHERS THEN
    LIFT;
    END GET_IP_COMM_INFO;

    ----------------------------------------------------------

    You try to access another variable of slider within the slider...

    CURSOR GET_ACQ_CURSOR IS

    SELECT H.DESCRIPTION AS HOST_DESCRIPTION

    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI

    WHERE (AICAI. HOST_ID = H.HOST_ID) and

    (AICAI. APPL_ID = vAPPL_ID) AND

    (ACQUIRER_ID = GET_ACQ_ID. ACQ_ID );

    But you have not opened this slider, or anything like that.

    You will probably need to pass as a parameter, just like a function:

    (not sure of the type of data, so I assumed that the NUMBER)

    CURSOR GET_ACQ_CURSOR (NUMBER in_acq_id) IS

    SELECT H.DESCRIPTION AS HOST_DESCRIPTION

    PROD. HOST H, PROD. APP_IP_COMM_ACCESS_INFO AICAI, PROD. ACQUIRER_IP_COMM_ACCESS_INFO ACICAI

    WHERE (AICAI. HOST_ID = H.HOST_ID) and

    (AICAI. APPL_ID = vAPPL_ID) AND

    (ACQUIRER_ID = in_acq_id );

    When you call this type, you must pass a value... So, it seems that you first call the other cursor.

    Change this code:

    IF Vvalue = ' 04 "THEN

    FOR GET_ACQ_REC IN GET_ACQ_CURSOR

    LOOP

    IP_COMM_INFO_LIST. EXTEND;

    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);

    END LOOP;

    ON THE OTHER

    To do this:

    IF Vvalue = ' 04 "THEN

    FOR GET_ACQ_ID_REC IN GET_ACQ_ID IS

    LOOP

    FOR GET_ACQ_REC IN GET_ACQ_CURSOR (get_acq_id_rec.acq_id)

    LOOP

    IP_COMM_INFO_LIST. EXTEND;

    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);

    END LOOP;

    END LOOP;

    ON THE OTHER

    (Or something like that)

    I wasn't sure if your GET_ACQ_ID cursor returns only 1 row or not? If it returns more than 1 row, how to cope, you do not specify.

    If it's just 1 row, then you can probably simplify it a little more:

    IF Vvalue = ' 04 "THEN

    SELECT ACQ_ID

    in l_acq_id

    TER TAHA, MERC M, PROF

    WHERE T.MER_ID = M.MER_ID

    AND M.PROFID = P.PROF_ID

    AND T.TER_ID = vTer_id;

    FOR GET_ACQ_REC IN GET_ACQ_CURSOR (l_acq_id)

    LOOP

    IP_COMM_INFO_LIST. EXTEND;

    IP_COMM_INFO_LIST (IP_COMM_INFO_LIST. (COUNTY): = PROD. TERMINAL_IP_COMM_INFO_OBJ (GET_ACQ_REC. HOST_DESCRIPTION);

    END LOOP;

    ON THE OTHER

    Hope that helps.

  • Cannot create transport for storage request rule!

    Hello

    I need to hide all specific traffic from iSCSI or a specific protocol type, can any advice how to create a type of transport rule?

    I tried the below but does not:

    / var/log # esxcli kernel claimrule list storage

    Rule class class Type Plugin Matches

    ----------  -----  -------  ---------  ---------  ----------------------------------------

    Transport of runtime 0 MP transport NMP = usb

    MP 1 TIME transport transportation NMP = sata

    MP 2 PERIOD transport transport NMP = ide

    MP 3 TIME transport transportation NMP = block

    MP 4 TIME transport transportation NMP = unknown

    Duration of the MP 101 provider MASK_PATH model = DELL = Universal Xport

    MP 101 file another MASK_PATH = provider model DELL = Universal Xport

    MASK_PATH location MP 200 DURATION = vmhba33 channel adapter = 0 target = lun 0 = 0

    Adapter MASK_PATH MP 200 file location = vmhba33 channel 0 target = 0 = 0 lun =

    MP DURATION NMP provider = 65535 * model = *.

    / var/log #.

    Add the option/var/log # esxcli storage core claimrule - rule 380 - P r iscsi iqn - iqn.1998 - 01.com.vmware:esx02 - 48f816e4 - Mon 1 target t NMP

    Add the option/var/log # esxcli storage claimrule - rule - 390P NMP t core target-r iscsi iqn - iqn.1998 - 01.com.vmware:esx02 - 48f816e4 - Mon 2

    / var/log #.

    / var/log # esxcli kernel claimrule charge of storage of

    / var/log # esxcli storage claimrule core run

    A little unsure here if you try to hide all the paths of a specific provider, or if you try to hide the specific paths.

    If he's a salesman, you can do the following:

    list of esxcli storage vmfs

    Take the naa, t10. or eui. VMFS uuid

    esxcli storage device base list d 'uuid from above.

    This should then give you information such as:

    esxcli storage device base list d naa.600140541fe494bddcfcd369dd8cfdd2

    NAA.600140541fe494bddcfcd369dd8cfdd2

    Full name: SYNOLOGY iSCSI disk (naa.600140541fe494bddcfcd369dd8cfdd2)

    Definable display name: true

    Size: 854528

    Device type: Direct access

    Multichannel plugin: NMP

    Devfs Path: /vmfs/devices/disks/naa.600140541fe494bddcfcd369dd8cfdd2

    Seller: SYNOLOGY

    Model: iSCSI Storage

    Revision: 3.1

    SCSI level: 5

    Is nickname: false

    Status: on

    RDM Capable is: true

    Is Local: false

    Is removable: false

    SSD is: true

    Is Offline: false

    Is perpetually booked: false

    Size of the full sample in queue: 0

    Threshold of full queue: 0

    Thin Provisioning status: unknown

    Attached filters:

    VAAI status: unknown

    Other UID: vml.0200000000600140541fe494bddcfcd369dd8cfdd2695343534920

    Is the Local of SAS device: false

    Is Boot USB Device: false

    Not IOs in circulation with the opposite worlds: 32

    Then you could hide the path based on the vendor and model lines, the SYNOLOGY and iSCSI Storage in the example above:

    esxcli storage coreclaimrule add to the seller of the r - 101 t v - M SYNOLOGY iSCSI Storage Pei MASK_PATH

    * Above of iSCSI Storage may need to be in quotes, I didn't create the rule to test. "

    Load, run rescan.

    If I wanted to HIDE qualified iscsi, then I would do:

    list of esxcli storage base path

    Enter iqn name.

    for me it is

    Transport target details: IQN = iqn.2000 - 01.com.synology:DiskStation.Target - 1.9668f3fdb0

    Thus,.

    esxcli storage base claim rule add r - 101 - P MASK_PATH t r iscsi iqn - iqn.2000 - 01.com.synology:DiskStation.Target - 1.9668f3fdb0 - target lun x

    Load, run rescan.

    BTW, I have used 101 rule number in my examples, change this as it already exists.

    Let me know how you go.

    R

  • Oracle procedure-[wrong number or type

    can someone help me identify what Miss me here. I get the error when I run following the procedure below. I work with oracle 11g. Thank you
    [Error] PLS-00306 (43:15): PLS-00306: wrong number or types of arguments I
    CREATE TYPE string_state_table AS TABLE OF varchar2(100); 
    
    CREATE OR REPLACE PROCEDURE dbevendors1e (
       p_state                 IN     string_state_table,
       P_BUSINESSDESCRIPTION   IN     VARCHAR2,
       p_results                  OUT SYS_REFCURSOR)
    IS
       v_sql_text   VARCHAR2 (4000) := NULL;
    BEGIN
       v_sql_text :=
          'SELECT DISTINCT v.refvendor_id vendorId,
                    v.vendorname legalname,
                    v.CERTIFICATIONTYPE,
                    v.vendorshortname doingbusinessname,
                    s.naics_id naicscode,
                    (r.addressline1 ||'' ''|| r.addressline2) address,
                    r.city city,
                    o.gender gender,
                    o.officername officer,
                    v.ethnicgroup ethinic,
                    r.state state,
                    TRIM (INITCAP (g.vnlst1)) businessdesc,
                    r.zipcode zipcode,
                    r.telephonenum phone,
                    r.faxnum fax,
                    LOWER (r.email) email,
                    LOWER (v.website) website,
                    v.dbecertstatus status,
                    func_get_naics_desc (s.naics_id) naicscodedesc,
                    func_get_state_desc (r.state) statename
                                                                  
      FROM refvendor v,
           refvendor_gf g,
           refvendoraddress r,
           refvendornaics s,
           refvendorofficer o
           
     WHERE     (v.refvendor_id = r.refvendor_id)
           AND v.refvendor_id = s.refvendor_id
           AND v.refvendor_id = r.refvendor_id
           AND v.refvendor_id = o.refvendor_id(+)
           AND v.refvendor_id = g.refvendor_id(+)';
    
       IF p_state = '0' ---------------------this is where the error is
       THEN
          v_sql_text :=
                v_sql_text
             || 'AND R.STATE  IN  (SELECT COLUMN_VALUE FROM TABLE ('
             || p_state
             || ')) ';
       END IF;
    
       IF P_BUSINESSDESCRIPTION != 'ALL'
       THEN
          --v_sql_text := v_sql_text || 'AND TRIM (g.vnlst1) LIKE  % (' || P_BUSINESSDESCRIPTION  || ')';
          v_sql_text :=
                v_sql_text
             || 'AND TRIM (g.vnlst1) LIKE  '
             || ''''
             || '%'
             || P_BUSINESSDESCRIPTION
             || '''';
       END IF;
    
       v_sql_text :=
          v_sql_text
          || '  AND UPPER(v.CERTIFICATIONTYPE)=''DBE''  order by vendorId ';
    
       -- dbms_output.put_line(v_sql_text);
       OPEN p_results FOR v_sql_text;
    END;
    /

    Do not code like this a lot - difficult to read and understand. What makes it difficult to find bugs and difficult to maintain.

    The comparison is-string-in-set can be made by using a submultiset condition. Bed easier IMO. (remember to consult the execution plan so that these methods can do for execution of cursor and performance)

    The key however, is bind variable. It is a little one non-negotiable. Bind variables are essential for performance - reduce CPU overhead. It is also essential for effective use of the SQL Shared Pool (and not causing the fragmentation of memory and leading to the error of memory allocation for new SQLs).

    I wrote the following example of procedure - showing the basic approach that I would use for a problem like this.

    SQL> create or replace type TStrings as table of varchar2(4000);
      2  /
    
    Type created.
    
    SQL>
    SQL> create or replace procedure GetObjectsByType(
      2          c IN OUT sys_refcursor,                 -- cursor returned to caller for fetching rows
      3          objectTypes TStrings,                   -- list of object types to fetch (mandatory)
      4          objectOwner varchar2 default null       -- owner of the object (optional)
      5  ) is
      6          curSql  varchar2(32767);
      7  begin
      8          curSql :=
      9                  'select
     10                          object_name, object_type
     11                  from    all_objects
     12                  where   TStrings(object_type) submultiset of :0';
     13
     14          if objectOwner is not null then
     15                  curSql := curSql || ' and owner = :1';
     16          else
     17                  curSql := curSql || ' and owner = USER';
     18          end if;
     19
     20          -- how many bind parameters?
     21          case
     22                  when (instr(curSql,':0') > 0) and  (instr(curSql,':1') > 1) then
     23                          open c for curSql
     24                          using objectTypes, objectOwner;
     25
     26                  when (instr(curSql,':0') > 0) then
     27                          open c for curSql
     28                          using objectTypes;
     29          end case;
     30  end;
     31  /
    
    Procedure created.
    
    SQL>
    SQL> var c refcursor
    SQL> exec GetObjectsByType( :c, TStrings('TABLE','PROCEDURE') )
    
    PL/SQL procedure successfully completed.
    
    SQL> print c
    
    OBJECT_NAME                    OBJECT_TYPE
    ------------------------------ ------------------------------
    FOOTAB                         TABLE
    TESTTAB                        TABLE
    PROCB                          PROCEDURE
    PROCA                          PROCEDURE
    GETOBJECTSBYTYPE               PROCEDURE
    
    SQL>
    SQL> exec GetObjectsByType( :c, TStrings('EDITION','JOB CLASS'), 'SYS' )
    
    PL/SQL procedure successfully completed.
    
    SQL> print c
    
    OBJECT_NAME                    OBJECT_TYPE
    ------------------------------ ------------------------------
    ORA$BASE                       EDITION
    DEFAULT_JOB_CLASS              JOB CLASS
    DBMS_JOB$                      JOB CLASS
    

    If the dynamic part of the SQL is more dynamic in this example, I would use DBMS_SQL creates the cursor and bind the list dynamic of the bind variable. It's quite simple to do.

    With 11g one can change a reference cursor DBMS_SQL (number) in a handful of refcursor PL/SQL. Which means that after you create the cursor DBMS_SQL , the code can cast/convert that to a refcursor and move this refcursor to the appellant.

    The stakes are the use of bind variables and make the code (in spite of dynamic linking) easy to read and understand. Code that fall into this category has fewer bugs, easier to debug and much easier to maintain and modify. It must be so always try and keep things simple - while respecting the fundamental principles (such as bind variables).

  • Column position of the cursor

    Among the interesting features of Homesite is that you can in addition to dsiplaying line numbers, you can click anywhere in your code (or text file), and the lower left corner of the screen will indicate the column position of the cursor. This is useful when parsing text files and debug javascript that gives you a line number and column position of the error code. I have line numbers enabled in Dreamweaver, but is there a way to determine the column position of the cursor (the number of characters in the line)?

    Thanks, I did a feature request.

  • Urgent * fifth null passed in the sixth, nested cursor works only

    Gurus,

    I am in a bind here and have the date limit of today. I would really appreciate a second pair of eyes. When I pass NULL values for attributes1-5, the process works. If you pass NULL in attribute6, the nested cursor fails to initialize.

    Any ideas?




    PROCEDURE spl_fix_error (p_count NUMBER) IS
    cursor c1 is
    Select h.account_number, h.order_number, l.doc_header_id, l.delivery_line_num,
    item_number
    of spldat.spl_intl_doc_lines l.
    spldat.spl_intl_doc_headers h
    where l.status_flag = 'E '.
    and h.status_flag = 'E '.
    and trunc (l.creation_date) > = trunc(sysdate-250)
    and h.error_msg = "LIN Error"
    and h.doc_header_id = l.doc_header_id;
    cursor c2 (number of p_doc_header_id,
    p_part_number varchar2,
    p_attribute1 varchar2,
    p_attribute2 varchar2,
    p_attribute3 varchar2,
    p_attribute4 varchar2,
    p_attribute5 varchar2,
    VARCHAR2 p_attribute6 / *.
    p_attribute7 varchar2,
    p_attribute8 varchar2,
    p_attribute9 varchar2,
    p_attribute10 varchar2,
    p_attribute11 varchar2,
    p_attribute12 varchar2,
    p_attribute13 varchar2,
    p_attribute14 varchar2,
    VARCHAR2 p_attribute15 * /.
    ) is
    Select srh.header_id, srl.customer_number, srl.part_number, srl.attribute1, srl.attribute2, srl.attribute3, srl.attribute4, srl.attribute5, srl.attribute6.
    Srl.attribute7, srl.attribute8, srl.attribute9, srl.attribute10, srl.attribute11, srl.attribute12, srl.attribute13, srl.attribute14, srl.attribute15
    of spldat.spl_request_headers_ext srh.
    spldat.spl_request_lines_ext srl
    where srh.header_id = srl.header_id
    and srh.attribute1 in (select distinct (h.order_number)
    of spldat.spl_intl_doc_lines l.
    spldat.spl_intl_doc_headers h
    where l.doc_header_id in (select doc_header_id from the spldat.spl_intl_doc_lines where trunc (creation_date) > = trunc(sysdate-250) and status_flag = 'X')
    and l.status_flag = 'X '.
    and h.doc_header_id = l.doc_header_id
    and l.doc_header_id = p_doc_header_id)
    and srl.part_number = nvl (p_part_number, srl.part_number)
    and srl.attribute1 = nvl (p_attribute1, srl.attribute1)
    and srl.attribute2 = nvl (p_attribute2, srl.attribute2)
    and srl.attribute3 = nvl (p_attribute3, srl.attribute3)
    and srl.attribute4 = nvl (p_attribute4, srl.attribute4)
    and srl.attribute5 = nvl (p_attribute5, srl.attribute5)
    and srl.attribute6 = nvl (p_attribute6, srl.attribute6); / *
    and srl.attribute7 = nvl (p_attribute7, srl.attribute7)
    and srl.attribute8 = nvl (p_attribute8, srl.attribute8)
    and srl.attribute9 = nvl (p_attribute9, srl.attribute9)
    and srl.attribute10 = nvl (p_attribute10, srl.attribute10)
    and srl.attribute11 = nvl (p_attribute11, srl.attribute11)
    and srl.attribute12 = nvl (p_attribute12, srl.attribute12)
    and srl.attribute13 = nvl (p_attribute13, srl.attribute13)
    and srl.attribute14 = nvl (p_attribute14, srl.attribute14)
    and srl.attribute15 = nvl (p_attribute15, srl.attribute15); */
    v_cancel_line_id spldat.spl_account_map.attribute6%type;
    BEGIN
    p_count: = 0;
    v_proc_name: = 'SPL_FIX_ERROR ';
    to crec in c1
    loop

    Update spldat.spl_intl_doc_lines
    Set status_flag = 'X ',.
    msg_erreur = "Line", cancelled or removed in the RTM
    last_updated_by = 0,
    last_update_date = sysdate
    where doc_header_id = crec.doc_header_id;

    commit;

    Start
    Select attribute6
    in v_cancel_line_id
    of spldat.spl_account_map
    where cont_cd = crec.account_number;
    exception
    When no_data_found
    then
    v_cancel_line_id: = 'PART '.
    end;



    Start
    If v_cancel_line_id = "PART".
    then
    ( for crec2 in c2 (crec.doc_header_id, crec.item_number, ",", ",",",") - null, null, null, null, null), null, null, null, null, null, null, null, null, null, null)
    loop
    If crec2.part_number is not null
    then
    update of spldat.spl_intl_doc_lines sl
    Set sl.status_flag = 'n',
    last_updated_by = 0,
    last_update_date = sysdate
    where sl.status_flag = 'X '.
    and sl.item_number = crec2.part_number
    and sl.doc_header_id = crec.doc_header_id;
    p_count: = 1;
    end if;
    end loop;

    Edited by: sreese may 18, 2010 10:24

    Edited by: sreese may 18, 2010 10:25

    Hello

    Can the column srl.attribute6 contain a NULL value? If the query should read:

    AND NVL(srl.attribute6, '!?!?!') = NVL(p_attribute6, NVL(srl.attribute6, '!?!?!'))
    

    Hope that helps.

    Lee

  • Return of the ref cursor of procedure where the cursor is defined in the specification

    Hello

    Here's pseudo-code

    create or replace package test
    as
    cursor c_emp (number cv_emp_id)
    is
    Select emp_name emp where emp_id = cv_emp_id;

    type ref_c is ref cursor;

    function get_emp_name (number p_emp_id) return ref_c;
    end test;
    /


    create or replace the test physics package
    as
    ref_c function get_emp_name (number p_emp_id)
    is
    ret_val ref_c;
    Start
    Open c_emp (p_emp_id);
    ret_val: = c_emp;
    return ret_val;

    end get_emp_name;
    end test;
    /

    Returns me "PLS-00382: expression is of the wrong type. I tried to use a strongly typed Ref cursor based on the cursor, but nothing helped.

    Clearly, I understand something... and if I can't assign as ' ret_val: = c_emp "and if there is another key way it so please let me know.

    Thank you

    Ralph

    Published by: user13024707 on May 5, 2010 04:43

    user13024707 wrote:
    Clearly the point of my question is being missed.

    Or maybe the question is not been clearly asked. ;)

    I want to set the cursor in the PACKAGE SPECIFICATION, and not in the package body. The issue of the bind variable and the string is neither here nor there because I pass parameters to the cursor.

    What you ask is to use a PL/SQL cursor (defined in the specifications of the package or elsewhere) and that convert a Ref Cursor. N ° cannot be done.
    PL/SQL cursors should be used in the PL/SQL code. REF CURSOR is primary used to pass back a reference to a cursor (and all queries are cursors) to a layer of application outside of PL/SQL for example .net, java, etc.. Once you start using the ref Cursor only really, you have the choice of opening it based on a (dynamic) or a fixed query string as in the examples given. You cannot open a cursor of a PL/SQL cursor definition Ref.

    The difference is that when you do:

      CURSOR cur_mycursor IS
        SELECT ...
    

    you declare a cursor in pl/sql definition, not actually a slider itself. The cursor itself is created when you issue an OPENING or a statement FOR etc. So a Ref Cursor (reference to a slider) cannot refer to the definition of the cursor because it is only a definition, not a cursor (i.e. it has not been sent engine sql and instantiated at that time here). Instead the Ref Cursor must reference a cursor (query), itself, and that may be presented as a string or as the query itself that is issued against the sql engine and then the ref cursor points

    Thus, slider ref and PL/SQL cursors are different concepts, both designed to manage cursors in a slightly different way of programming. You cannot mix them.

  • The AR invoice line number does not Interface table

    Hello

    I have a Bill to convert with 5 lines, but the line numbers are 2, 3, 4, 5, 7. I pass the staging table line number to ra_interface_lines.line_number and I can see the data in the interface table I in the staging table. But when the car invoice is executed and the invoice lines have serialized numbers line 1,2,3,4,5. Can someone let me know why this is happening?

    Thank you.

    I don't think that you can control the target (desired) line numbers, you can control how lines are classified by mentioning a rule-based command line
    some columns, associate the collection and then rule command line batch source.
    Your condition must wear the same # s to AR and I see gaps in the sequence numbers (line), I don't think it's possible.
    See the description of column auto invoice. If the idea is to link to the desired line number, pass the number of line in a column of attributes and open a FDF so that you know
    What that line the old system it maps too. After creation of invoice, you can update by running a sql however not recommended by oracle if it is necessary you
    can do this as a last resort.

    LINE_NUMBER
    This column is used by AutoInvoice and should be left to zero. AutoInvoice know nothing
    values in this column and still the lines sequentially from numbers
    rule number 1, in the order determined by the command line.

  • View object Ref Cursor

    Hello

    I use ADF 11 g business components.

    I have a function that returns a type weak ref cursor. Number of columns is not known until the function is executed. Is there a way to create a display programmatically on this Ref Cursor object?

    Published by: Deniz Gulmez on 10.Oca.2010 23:40

    You can try with

    public AttributeDef addDynamicAttribute(java.lang.String attrName)
    // or
    public AttributeDef addDynamicAttributeWithType(java.lang.String attrName,
                                                    java.lang.String javaTypeName,
                                                    java.lang.String transientExpression)
    

    Timo

  • How to call a stored procedure with a REF CURSOR output parameter

    I'm looking forward to example calling a function/stored procedure with a REF CURSOR output parameter and get the result.
    In other words, I have a stored function/procedure that runs a SELECT statement using the OCI library and then he could get the values of each row and each column.

    I put a code snippet, it have only the main thing to call a simple stored procedure and to print the name of each column of the cursor, but I couldn t to print out values in the table that calls the stored procedure.
    I understand that the next step is to call an OCIStmtFetch.
    How to associate the slider with the OCIStmtFetch?

    If you need more information, just tell me.

    I use ANSI C with HP - UX (HP - UX C) operating system and Oracle 10 g.


    Kind regards.

    Antonio Garcia


    / * callOracleSP * /.

    #include < stdio.h >
    #include < string.h >
    #include < oci.h >
    #include < stdlib.h > to

    char * pConnectChar = "Server";
    char * pUsernameChar = "user";
    char * pPasswordChar = "passwd";
    char * sqlCharArray1 = "BEGIN SP_GETCITIES (:,: c); END; « ;
    int retval;
    UB4 parmcnt = 0;
    UB4 pos2 = 0;
    text * pcoln [20];
    UB4 namelen [20];
    char state_key [5];

    OCIStmt * pOciStatement;
    OCIStmt * pOciStatCursor;
    OCIError * pOciError;
    OCIEnv * pOciEnviron;
    OCIServer * pOciServer;
    OCISession * pOciSession;
    OCISvcCtx * pOciServiceContext;
    OCIBind * pOciBind [500];
    OCIParam * pOciParam;


    int main()
    {
    retval = OCIEnvCreate (& pOciEnviron, OCI_DEFAULT, NULL, NULL, NULL, NULL, 0, NULL);
    retval = OCIEnvInit (& pOciEnviron, OCI_DEFAULT, 0, NULL);
    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciError, OCI_HTYPE_ERROR, 0, NULL);
    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciServiceContext, OCI_HTYPE_SVCCTX, 0, NULL);
    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciStatement, OCI_HTYPE_STMT, 0, NULL);

    retval = OCILogon (pOciEnviron, pOciError, & pOciServiceContext,(unsigned char *) pUsernameChar,
    strlen (pUsernameChar), (unsigned char *) pPasswordChar, strlen (pPasswordChar).
    (unsigned char *) pConnectChar, strlen (pConnectChar));
    printf ("retval=%d\n",retval OCILogon);

    retval = OCIStmtPrepare (pOciStatement, pOciError, (unsigned char *) sqlCharArray1, strlen (sqlCharArray1),)
    OCI_NTV_SYNTAX, OCI_DEFAULT);
    printf ("StmtPrepare retval=%d\n",retval);

    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciStatCursor, OCI_HTYPE_STMT, 0, NULL);
    retval = 1 OCIBindByPos(pOciStatement,&pOciBind[0], pOciError, (ub4), (void *) & state_key,)
    ((sb4) sizeof (state_key), SQLT_STR, (void *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT (ub4));
    printf ("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);

    retval = OCIBindByPos(pOciStatement,&pOciBind[1], pOciError, (ub4) 2, (void *) & pOciStatCursor,)
    ((sb4) 0, SQLT_RSET, (void *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT (ub4));
    printf ("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);

    strcpy (state_key, 'ca');

    retval = OCIStmtExecute (pOciServiceContext, pOciStatement, pOciError, (ub4) 1, (ub4) 0,)
    (OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT (ub4));
    printf ("StmtExecute retval=%d\n",retval);

    / * How to get the values of the cursor? */

    / * Number of parameters of the cursor * /.
    OCIAttrGet ((void *) pOciStatCursor, OCI_HTYPE_STMT (ub4), (void *) & parmcnt,(ub4 *) 0,)
    (ub4) (OCI_ATTR_PARAM_COUNT, pOciError);
    printf ("\nNumber of the slider settings = %d\n",parmcnt);

    for (int pos = 1; pos < = (int) parmcnt; pos ++)
    {
    OCIAttrGet ((void *) pOciStatCursor, OCI_HTYPE_STMT (ub4), (void *) & pos2,(ub4 *) 0,)
    (ub4) (OCI_ATTR_CURRENT_POSITION, pOciError);
    retval = OCIParamGet ((void *) pOciStatCursor, OCI_HTYPE_STMT (ub4), pOciError, (void *) & pOciParam,)
    POS (ub4));
    OCIAttrGet pOciParam, (ub4) ((void*) OCI_DTYPE_PARAM,(void*) & pcoln [pos - 1],(ub4 *) & namelen [pos-1],)
    (ub4) OCI_ATTR_NAME,(OCIError *) pOciError);
    }
    for (int i = 1; i < = (int) parmcnt; i ++)
    printf ("%i\tNAME = % column. ("* s\n", i, namelen [i-1], pcoln [i-1]);

    return 0;
    }


    This is the script that create the table, insert records and create the stored procedure

    CREATE TABLE CITIES)
    STATE_CODE VARCHAR2 (2) NULL,
    CITY_CODE NUMBER (15.5) NULL,
    CITY_NAME VARCHAR2 (30) NULL
    )
    /


    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 30, 'SAN DIEGO')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 40 'SACRAMENTO')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('FL', 10, 'MIAMI')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('FL', 20, 'ORLANDO')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('NEW YORK', 10, 'NEW YORK')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('NEW YORK', 20, 'ALBANY')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 10, 'LOS ANGELES')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 20, 'SAN FRANCISCO')
    /


    CREATE or REPLACE PACKAGE globalPkg AUTHID CURRENT_USER AS
    / * The following is specific global variables T/SQL. */
    TYPE RCT1 IS REF CURSOR; / * new cursor low definition * /.
    END globalPkg;
    /



    CREATE OR REPLACE PROCEDURE SP_ADDCITY)
    P_STATE_CODE IN VARCHAR,
    P_CITY_CODE NUMBER,
    P_CITY_NAME IN VARCHAR2,
    P_RETURN IN NUMBERS)
    AS
    StoO_error INTEGER;
    StoO_selcnt INTEGER;
    StoO_rowcnt INTEGER;
    StoO_errmsg VARCHAR2 (255);

    BEGIN
    StoO_rowcnt: = 0;
    StoO_error: = 0;
    StoO_selcnt: = 0;
    P_RETURN: = 0;
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES (P_STATE_CODE, P_CITY_CODE, P_CITY_NAME);
    StoO_rowcnt: = number of LINES SQL %;
    EXCEPTION
    WHEN TOO_MANY_ROWS THEN
    StoO_rowcnt: = 2;
    WHILE OTHERS THEN
    StoO_rowcnt: = 0;
    StoO_selcnt: = 0;
    StoO_error: = SQLCODE;
    StoO_errmsg: = SQLERRM;
    IF StoO_error! = 0 THEN
    BEGIN
    P_RETURN: = 1;
    RETURN;
    END;
    END IF;
    END;
    /

    CREATE OR REPLACE PROCEDURE SP_GETCITIES)
    STATE_KEY IN VARCHAR,
    RC1 IN OUT globalPkg.RCT1)
    AS
    StoO_error INTEGER;
    StoO_selcnt INTEGER;
    StoO_rowcnt INTEGER;
    StoO_errmsg VARCHAR2 (255);
    BEGIN
    StoO_rowcnt: = 0;
    StoO_error: = 0;
    StoO_selcnt: = 0;
    OPEN FOR RC1
    SELECT STATE_CODE, CITY_CODE, FRANCISCO
    CITIES
    WHERE STATE_CODE = STATE_KEY
    ORDER BY CITY_CODE;
    StoO_rowcnt: = number of LINES SQL %;
    EXCEPTION
    WHILE OTHERS THEN
    StoO_rowcnt: = 0;
    StoO_error: = SQLCODE;
    StoO_errmsg: = SQLERRM;
    END;
    /

    Hi Antonio,.

    I see this:

    c_buf=(ub1 **)calloc(sizeof(ub1 *),3);
    
    ...
    
    rc=OCIDefineByPos(pOciStatCursor,&pdef,(OCIError *)pOciError,pos,c_buf[pos-1],size+1,(ub2)type,(dvoid *)c_indp[pos-1],(ub2 *)0,(ub2 *)0,OCI_DEFAULT);
    

    That I don't understand. You allocate space for 3 pointers ub1 but I don't see where these pointers are then initialized to point to where the data is to be stored.

    I do not read correctly?

    Sorry for posting code long, but here is an example of code that I have. It is much more 'code' for your code, but maybe that will be enough...

    NOTE: This is just the code example and not rigorous. For example, I don't check the memory, allocations etc in this code!

    Kind regards

    Mark

    #ifdef WIN32
    #define _CRT_SECURE_NO_DEPRECATE 1
    #endif
    
    #include 
    #include 
    #include 
    #include 
    
    void checkerr(sword status, OCIError *errhp);
    
    int main(int argc, char *argv[]) {
      OCIEnv      *envhp = NULL;  /* OCI Environment handle     */
      OCIError    *errhp = NULL;  /* OCI Error handle           */
      OCISvcCtx   *svchp = NULL;  /* OCI Service Context handle */
      OCIServer   *srvhp = NULL;  /* OCI Server handle          */
      OCISession  *usrhp = NULL;  /* OCI User Session handle    */
    
      OCIStmt     *stmtp = NULL;  /* OCI Statement handle       */
      OCIStmt     *cursr = NULL;  /* OCI Statement handle       */
    
      OCIParam    *prmp1 = NULL;  /* OCI Parameter handle       */
      OCIParam    *prmp2 = NULL;  /* OCI Parameter handle       */
      OCIParam    *prmp3 = NULL;  /* OCI Parameter handle       */
    
      OCIDefine   *defp1 = NULL;  /* OCI Define handle          */
      OCIDefine   *defp2 = NULL;  /* OCI Define handle          */
      OCIDefine   *defp3 = NULL;  /* OCI Define handle          */
    
      OCIBind     *bndp1 = NULL;  /* OCI Bind handle            */
      OCIBind     *bndp2 = NULL;  /* OCI Bind handle            */
      OCIBind     *bndp3 = NULL;  /* OCI Bind handle            */
    
      /* used to hold column width */
      ub2 col_width;
    
      /* used to set the prefetch count */
      ub4 prefetch_count = 32;
    
      /* will hold output from database */
      oratext *pEmpId = NULL;
      oratext *pFirstName = NULL;
      oratext *pLastName = NULL;
    
      /* the anonymous block to execute */
      /* this opens a ref cursor        */
      oratext *sqlstmt = "begin " \
                         "  open :1 for " \
                         "  select   to_char(employee_id), " \
                         "           first_name, " \
                         "           last_name " \
                         "  from     hr.employees " \
                         "  order by last_name, " \
                         "           first_name; " \
                         "end;";
    
      /* used to hold the results of each OCI call */
      sword result = 0;
    
      /* Initialize and create a default environment  */
      result = OCIEnvCreate(&envhp,
                            OCI_DEFAULT,
                            (dvoid *) 0,
                            0,
                            0,
                            0,
                            (size_t) 0,
                            (dvoid **) 0);
    
      /* allocate an error handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &errhp,
                              OCI_HTYPE_ERROR,
                              0,
                              (dvoid **) 0);
    
      /* allocate a service context handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &svchp,
                              OCI_HTYPE_SVCCTX,
                              0,
                              (dvoid **) 0);
    
      /* allocate a server handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &srvhp,
                              OCI_HTYPE_SERVER,
                              0,
                              (dvoid **) 0);
    
      /* allocate a user session handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &usrhp,
                              OCI_HTYPE_SESSION,
                              0,
                              (dvoid **) 0);
    
      /* create a server context using the "ORADEMO" database */
      result = OCIServerAttach(srvhp,
                               errhp,
                               "ORADEMO",
                               (ub4) strlen("ORADEMO"),
                               OCI_DEFAULT);
    
      /* set the server attribute in the service context handle */
      result = OCIAttrSet((dvoid *) svchp,
                          OCI_HTYPE_SVCCTX,
                          (dvoid *) srvhp,
                          (ub4) 0,
                          OCI_ATTR_SERVER,
                          errhp);
    
      /* open the session with the database */
      /* using external authentication      */
      result = OCISessionBegin(svchp,
                               errhp,
                               usrhp,
                               OCI_CRED_EXT,
                               OCI_DEFAULT);
    
      /* set the user session attribute in the service context handle */
      result = OCIAttrSet((dvoid *) svchp,
                          OCI_HTYPE_SVCCTX,
                          (dvoid *) usrhp,
                          (ub4) 0,
                          OCI_ATTR_SESSION,
                          errhp);
    
      /* allocate the statement handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &stmtp,
                              OCI_HTYPE_STMT,
                              0,
                              (dvoid **) 0);
    
      /* prepare the statement for execution */
      result = OCIStmtPrepare(stmtp,
                              errhp,
                              sqlstmt,
                              (ub4) strlen((char *) sqlstmt),
                              OCI_NTV_SYNTAX,
                              OCI_DEFAULT);
    
      /* allocate the handle for the ref cursor */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (void **) &cursr,
                              OCI_HTYPE_STMT,
                              0,
                              NULL);
    
      /* bind the ref cursor parameter */
      result = OCIBindByPos(stmtp,
                            &bndp1,
                            errhp,
                            1,
                            &cursr,
                            0,
                            SQLT_RSET,
                            NULL,
                            0,
                            NULL,
                            0,
                            0,
                            OCI_DEFAULT);
    
      /* execute the statement */
      result = OCIStmtExecute(svchp,
                              stmtp,
                              errhp,
                              1,
                              0,
                              NULL,
                              NULL,
                              OCI_DEFAULT);  
    
      /* get parameter descriptor for first column */
      result = OCIParamGet((dvoid *) cursr,
                           OCI_HTYPE_STMT,
                           errhp,
                           (dvoid **) &prmp1,
                           (ub4) 1);
    
      /* get parameter descriptor for second column */
      result = OCIParamGet((dvoid *) cursr,
                           OCI_HTYPE_STMT,
                           errhp,
                           (dvoid **) &prmp2,
                           (ub4) 2);
    
      /* get parameter descriptor for third column */
      result = OCIParamGet((dvoid *) cursr,
                           OCI_HTYPE_STMT,
                           errhp,
                           (dvoid **) &prmp3,
                           (ub4) 3);
    
      /* get the first column width in characters */
      result = OCIAttrGet((dvoid*) prmp1,
                          (ub4) OCI_DTYPE_PARAM,
                          (dvoid*) &col_width,
                          (ub4 *) 0,
                          (ub4) OCI_ATTR_DATA_SIZE,
                          errhp);
    
      /* allocate memory to hold the result */
      pEmpId = (oratext *) malloc(sizeof(oratext) * (col_width + 1));
    
      /* define the first column in the results */
      result = OCIDefineByPos(cursr,
                              &defp1,
                              errhp,
                              1,
                              (dvoid *) pEmpId,
                              (sword) col_width + 1,
                              SQLT_STR,
                              (dvoid *) NULL,
                              (ub2 *) 0,
                              (ub2 *) 0,
                              OCI_DEFAULT);
    
      /* get the second column width in characters */
      result = OCIAttrGet((dvoid*) prmp2,
                          (ub4) OCI_DTYPE_PARAM,
                          (dvoid*) &col_width,
                          (ub4 *) 0,
                          (ub4) OCI_ATTR_DATA_SIZE,
                          errhp);
    
      /* allocate memory to hold the result */
      pFirstName = (oratext *) malloc(sizeof(oratext) * (col_width + 1));
    
      /* define the second column in the results */
      result = OCIDefineByPos(cursr,
                              &defp2,
                              errhp,
                              2,
                              (dvoid *) pFirstName,
                              (sword) col_width + 1,
                              SQLT_STR,
                              (dvoid *) NULL,
                              (ub2 *) 0,
                              (ub2 *) 0,
                              OCI_DEFAULT);
    
      /* get the third column width in characters */
      result = OCIAttrGet((dvoid*) prmp3,
                          (ub4) OCI_DTYPE_PARAM,
                          (dvoid*) &col_width,
                          (ub4 *) 0,
                          (ub4) OCI_ATTR_DATA_SIZE,
                          errhp);
    
      /* allocate memory to hold the result */
      pLastName = (oratext *) malloc(sizeof(oratext) * (col_width + 1));
    
      /* define the third column in the results */
      result = OCIDefineByPos(cursr,
                              &defp3,
                              errhp,
                              3,
                              (dvoid *) pLastName,
                              (sword) col_width + 1,
                              SQLT_STR,
                              (dvoid *) NULL,
                              (ub2 *) 0,
                              (ub2 *) 0,
                              OCI_DEFAULT);
    
      /* loop through and print the results */
      while ((result = OCIStmtFetch(cursr,
                                    errhp,
                                    (ub4) 1,
                                    (ub2) OCI_FETCH_NEXT,
                                    (ub4) OCI_DEFAULT)) == OCI_SUCCESS)
      {
        printf("Employee ID: %s\n", pEmpId);
        printf(" First Name: %s\n", pFirstName);
        printf("  Last Name: %s\n\n", pLastName);
      }
    
      /* free allocated memory */
      free(pEmpId);
      free(pFirstName);
      free(pLastName);
    
      pEmpId = NULL;
      pFirstName = NULL;
      pLastName = NULL;
    
      /* terminate the session with the database */
      result = OCISessionEnd(svchp, errhp, usrhp, OCI_DEFAULT);
    
      /* detach from the server */
      result = OCIServerDetach(srvhp, errhp, OCI_DEFAULT);
    
      /* deallocate the environment handle     */
      /* OCI will deallocate the child handles */
      result = OCIHandleFree((dvoid *) envhp, OCI_HTYPE_ENV);
    
      return OCI_SUCCESS;
    }
    
    void checkerr(sword status, OCIError *errhp)
    {
      oratext errbuf[512];
      sb4 errcode = 0;
    
      switch (status) {
        case OCI_SUCCESS:
          break;
    
        case OCI_ERROR:
        case OCI_SUCCESS_WITH_INFO:
          (void) OCIErrorGet((dvoid *) errhp, (ub4) 1, (oratext *) NULL, &errcode, errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
          (void) printf("Error: %.*s\n", sizeof(errbuf), errbuf);
          break;
    
        case OCI_NEED_DATA:
          (void) printf("Error - OCI_NEED_DATA\n");
          break;
    
        case OCI_NO_DATA:
          (void) printf("Error - OCI_NO_DATA\n");
          break;
    
        case OCI_INVALID_HANDLE:
          (void) printf("Error - OCI_INVALID_HANDLE\n");
          break;
    
        case OCI_STILL_EXECUTING:
          (void) printf("Error - OCI_STILL_EXECUTING\n");
          break;
    
        case OCI_CONTINUE:
          (void) printf("Error - OCI_CONTINUE\n");
          break;
    
        default:
          break;
      }
    }
    
  • Conditions of cursor

    Hello

    cursor (a number) is a select statement;

    Now, I want to

    If a = 1 select col1, col2, col3 from table;

    on the other

    Select col4, col5 table;

    Can anyone suggest how to achieve


    Thanx

    create or replace procedure cursor_proc (in number) is
    the_cursor sys_refcursor;
    Start
    If a = 1 then
    Open the the_cursor for
    Select first_name, last_name from order by last_name;
    / * do it all using the_cursor * /.
    close the_cursor;
    elsif a = 2 then
    Open the the_cursor for
    Select first_name, last_name, Address1, city, state, zip from employed by last_name;
    / * do it all using the_cursor * /.
    close the_cursor;
    on the other
    Open the the_cursor for
    Select dept_cd, dept_name of service by dept_name order;
    / * do it all using the_cursor * /.
    close the_cursor;
    end if;
    end

    Published by: remy on October 6, 2008 07:37

    Published by: remy on October 6, 2008 07:39

  • Fast support Tec legitimate?

    I've been scammed before, I'm embarrassed to say, and I know that Cardinal rule number one of the Internet is never buy or sign up for all that has been done to you, rather than you start looking for the product. I received a phone call this morning from an outfit in area code 213, (even if ALI read 131 as Captain) saying that I had been hacked and needed to fix my network. I was directed to open Terminal on my MacBook which I could see a list of IP addresses, preceded by the prefix tcp3 and under the heading < State > reading connected or something like that after each of them. The representative on the phone worked with me for a couple of hours as it solved the (apparent) problem while in control of my computer, and in the end offered firmware that would prevent further attacks to succeed, so that provides protection against viruses, etc.. Company URL fastsupportec.com, which is also his name. Is it normal for a third person monitor network traffic on the individual computer at random (although the representative said that I was getting this service because of some other security protection that I already had) and inform them of hacking related parties? I should add that the rep was very polite and knew my details. A I really screw up, once again? Thank you and please, be gentle.

    You have been scammed again.

    # It is not normal for them to monitor network traffic. It is impossible for them to say what you do on your Mac.

    I suggest at this stage, at a minimum, you change all your passwords, call your Bank and tell them that you have been victim of a scam and need to have new credit cards issued.

    Please download and install EtreCheck from http://etrecheck.com/

    Run it and post the report here. According to EtreCheck report, we might be able to tell what junk they load on your Mac.

  • Conditional formatting based on the other content of the cell

    Hello

    I watched tutorials and read other messages of conditional formatting. What I'm trying to do doesn't seem like it should be too difficult, but I can't it to work.

    I created a spreadsheet of travel and I would that my cells spend every day to highlight when I went on the budget (budget in another table on another sheet)

    My conditional formatting looks like this

    Who works for the first cell that I put it to the top for the table. If I try to drag the rules to the bottom of the table, or highlight the entire table and and my rule number 1 shows what

    and of course, it will not highlight.

    This is an excerpt from the table, on that I try to apply highlighting

    And that is the picture that source information.

    I use a macbook pro under OS X El Capitan 10.11.1 and numbers 3.6.1 (2566)

    Thanks in advance for any help!

    Hello

    It's looks you're new to spreadsheets... you must add a dollar sign in front of "The rest of the budget per day" (your 1st image), or check the 2 boxes like this:

    To understand: http://www.notjustnumbers.co.uk/2011/05/excel-tip-dollar-sign-in-formula-fixing. html

    See you soon

    James

Maybe you are looking for

  • To a new Mac to iCloud photo library

    I bought a new Mac and you want to migrate my iCloud photo library to the new machine. Currently, I have all my photos stored on my old mac and plan to move the library of photos of the new machine. I have 650 GB of photos, so I don't want you must s

  • iPod classic "shuffle albums" does not work

    iPod classic "shuffle albums" option does not work, will be only mix songs but I put the function shuffle; allows you to restart or sync in iTunes. New 18 months ago did shuffle albums initially. Can we do anything? I used this feature much - almost

  • Calculation forever when copying

    Hey, I received 2G sansa clip, MSC mode. When I do drag & drop files into the music folder is to keep computing forever and stuck, so I cannot add files. a Win 7 64 bit.

  • View and Winamp

    I just bought a view yesterday, and I loaded the latest firmware. All my music is in FLAC, so I went to use Winamp to transcode files fly to my view. However, although I can see files in the .m4a on view in the MUSIC folder, nothing is displayed in t

  • CustomControl problem

    Hi, I created a CustomControl CPP... But whenever I try to boot into my main cpp file, I got this error the conversion of "bb::cascades:MyTextControl *" to not scalar of type "bb::cascades:MyTextControl" asked. Any thoughts on this? Thank you