the value of variable equal to the value of a recordset from database

It is for Coldfusion version 8.

I have two tables which I am inserting data in. After I insert a record in the first table, I need to use the id (auto incremented, not something I already have) to the new folder as part of the data I enter in the second table.

I'm having a hard time nailing down the syntax to get me there. I searched the documentation, any thoughts on what I should have sought under would be welcome as well.

Any help would be appreciated, thanks.

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

<!-this table contains a column id that autoincrements->

< cfquery datasource = "labdsn" name = "newLabDataRecord" > INSERT INTO LabData (savedLab, lastSavedBy) VALUES ('data data data", '555') < / cfquery >

<! - find the value of this new identifier - >

< cfquery datasource = "labdsn" name = "maxLabIDRecord" > select max (id) OF LabData < / cfquery >

<!-this generates the error. Not surprised, but don't know what it should be->

< cfset maximum = < cfoutput query = "rsMaxLabIDRecord" > #rsMaxLabIDRecord.id # < / cfoutput > >

< cfquery datasource = "labdsn" name = "newUserRecord" > INSERT INTO UsersVsLab (userID, whichLab, IDB) VALUES ('2', 1, < cfqueryparam value = "#maxID #" >) < / cfquery >

<!-it's another syntax I tried->

<!-cfquery datasource = "labdsn" name = "newUserRecord" > INSERT INTO UsersVsLab (userID, whichLab, IDB)

VALUES

('2', 1, < cfqueryparam value = < cfoutput query = "rsMaxLabIDRecord" > #rsMaxLabIDRecord.id # < / cfoutput > >) < / cfquery->

You can solve your specific error by adding an alias to the application where you get max id.  However, there are often better ways to achieve this.  The details depend on the type of db that you use.

If you need to use max (id) select, add a where clause clause in order to make sure you get the right pair.

Tags: ColdFusion

Similar Questions

  • [JDev12c, ADF] How to get the value of a field from the selected line in af:table and...

    Hallo,

    I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.

    I need to go to the second page the value of a field on the line that is selected on the first page.

    How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?

    Thank you

    F.

    Why would user, you need to pass a value of the line to the shape?

    The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.

    Timo

    Post edited by: Timo Hahn
    And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf

  • Unit test: calculation of the length of the different columns in recordsets provided and received led to false a test failure

    Dear team of SQL Developer,

    It seems that the calculation of the length of the column in the expected and received recordsets behaves differently in some cases (when stored proc variables are used in the generation of the REF CURSOR, despite the explicit definition of the type of record): the length of the header and the length of the value in the set of records received are truncated to arbitrary length based on the returned value which leads to a false failure of a unit test. I.e. registries are the same in both sets of records, but the test run fails to the comparison of the recordsets because of different length. Please see the screenshot below:

    Expected_and_Received_RecordSets.jpg

    Here's the test case if you need to reproduce the problem/bug in your environment:

    1. use the default schema of HR of the Oracle examples package that comes with an 11 g database.

    2. change the HR. Table EMPLOYEES with the addition of a new column VARCHAR2 (4000) LONG_LAST_NAME:

    ALTER TABLE HR. EMPLOYEES

    ADD (LONG_LAST_NAME VARCHAR2 (4000));

    Update hr.employees set long_last_name = last_name;

    commit;

    3. create a PKG_TEST2 package with the source code below in the HR schema:

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

    create or replace PACKAGE PKG_TEST2 AS

    TYPE EmployeeInfoRec IS RECORD

    (

    long_last_name employees.long_last_name%TYPE,

    first name employees.first_name%TYPE,

    E-mail employees.email%TYPE

    );

    TYPE EmployeeInfoRecCur IS REF CURSOR RETURN EmployeeInfoRec;

    FUNCTION getEmployeeInfo (p_Emp_Id employees.employee_id%TYPE)

    RETURN EmployeeInfoRecCur;

    END PKG_TEST2;

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

    CREATE OR REPLACE PACKAGE BODY PKG_TEST2 AS

    FUNCTION getEmployeeInfo (p_Emp_Id employees.employee_id%TYPE)

    RETURN EmployeeInfoRecCur AS

    v_EmployeeInfoRecCur EmployeeInfoRecCur;

    v_LongLastName varchar2 (4000);

    BEGIN

    Select long_last_name from v_LongLastName

    employees

    where employee_id = p_Emp_Id;

    --

    OPEN FOR V_EmployeeInfoRecCur

    V_LongLastName SELECT long_last_name,

    first name,

    E-mail

    This_is_very_long_table_alias employees

    WHERE employee_id = p_Emp_Id

    order by 1 CSA;

    --

    RETURN v_EmployeeInfoRecCur;

    EXCEPTION

    WHILE OTHERS THEN

    LIFT;

    END getEmployeeInfo;

    END PKG_TEST2;


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

    4. create a unit test for the PKG_TEST2.getEmployeeInfo stored procedure: (click the command create Test, select the stored procedure, click Ok for the pop-up message, click Next, click Finish).

    5. update the default value of dynamic query of value with the one below and save/post changes.

    Select the cursor)

    SELECT long_last_name,

    first name,

    E-mail

    Employees

    WHERE employee_id = idqry.employee_id

    order of the 1 CAD

    ) RETURNS $,.

    idqry.employee_id as P_EMP_ID

    from (select employee_id

    employees

    where rownum < = 5) idqry

    6. run the unit test newly created in the debug mode to display the shot.

    Thus, the record type 'EmployeeInfoRec' in the package clearly defines the LONG_LAST_NAME as VARCHAR2 (4000) through reference for the data type of column in the referenced table.

    But for some reason, the SQL Developer does not calculate correctly its length in the recordset "Receipts" If a variable is used (could be one as variable simple varchar2 in this reproducible test or complex variable of type of the object).

    Any ideas on that? Looks like another bug...

    Thank you

    Val

    The bug has been reproduced by the SRB and documented within the system of Support of Oracle SQL Developer team to pick it up:

    Bug 19943948 - TEST UNIT RETURNS EXPECTED ERROR: [LONG_LAST_NAME

    Hope the bug name can later be changed to something more descriptive, but it is not really... my only concern is the speed at which the known bugs would be fixed...

    Thank you

    Val

  • The application requires more privileges in database you currently have

    Hello
    in 10g R2, no one can connect to the network DB control (not sys, no sysman or system). We get the following:

    The application requires more privileges to database that you got currently. Click Help for more version specific information.

    We are sure to password.
    I saw and applied notes metalink 330682.1 and 363065.1 who said:

    grant SELECT_CATALOG_ROLE to the user;

    grant select any dictionary for < user >;

    but no result.

    Any help?
    Thank you.

    1. what operating system.
    2. what version of Oracle (10 g 2 is a marketing label not a version number... provide all decimals)
    3. What are the values of the environment variables ORACLE_HOME and ORACLE_SID?

  • I would use Yuanti SC police for my web development project. However, my developer is not able to use the file .ttc I extracted from the library of fonts, and .ttf, .otf .woff formats not available anywhere on the web.

    I would use Yuanti SC police for my web development project. However, my developer is not able to use the file .ttc I extracted from the library of fonts, and .ttf, .otf .woff formats not available anywhere on the web. Please, let me know how can I use this font for my project.

    Thank you

    Anton

    Unless the site you develop is for the Asian market, I don't know why you want to use that particular font. The Basic, standard and digital alphabet punctuation glyphs has sans serif, Roman characters, but the rest is thousands of Kanji characters. While you can use the font .ttf and .otf and web fonts, it would be very unusual to use one so great. Pages should load quickly and 78 MB, with a value of faces to download for those who have connections slow Internet is not fast.

    I would take a different font without serifs. There are literally thousands who look identical or virtually identical to Yuanti.

    131 free and high quality without font serif to choose here. I'm sure you can find a desired.

  • How can I enable the Task Manager after recovering from an attack of Win32.GEMA

    Hello

    I am running Windows XP SP3.

    I have recently had an attack of the Win32.GEMA Trojan horse. Details of it are here: http://www.microsoft.com/security/portal/Threat/Encyclopedia/Entry.aspx?Name=Trojan%3AWin32%2FRansirac.G

    I recovered my system using:

    AVG Rescue Disk

    Kaspersky Rescue Disk

    BitDefender Rescue Disk

    Scan of MalwareBytes

    McAffee analysis

    Hitman Pro Scan

    Spybot scan

    Eusing Registry Cleaner

    CCleaner

    Overkill maybe? But it worked... Up to now

    Apparently, the Trojan horse disables the Task Manager and that is I'm having bad to restore.

    I followed the advice in this article from Microsoft - http://support.microsoft.com/kb/913623/ - but when I followed this part

    To set the DisableTaskMgr registry entry to 0 for a specific user, follow these steps:

    1. Shut down the computer.
    2. Log the computer by using a user account with administrator permissions.
    3. Click Start, click run, type regedit in the Open box, and then click OK.
    4. In the left pane, click the following registry subkey:
      HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
    5. In the right pane, double-click DisableTaskMgr.
    6. In the value data box, type 0, and then click OK.
    7. On the file menu, click exit.
    8. Restart the computer.

    N ° 5 says that disable TaskMgr should appear in the right pane, but there is no entry to disable TaskMgr. All it is an icon of the small 'ab' (the default) beside it, then, REG_SZ.

    Then I tried to follow this part of the article from Microsoft

    To set the DisableTaskMgr registry entry to 0 for all users, follow these steps:

    1. Shut down the computer.
    2. Log the computer by using a user account with administrator permissions.
    3. Click Start, click run, type regedit in the Open box, and then click OK.
    4. In the left pane, click the following registry subkey:
      HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem\\\
    5. In the right pane, double-click DisableTaskMgr.
    6. In the value data box, type 0, and then click OK.
    7. On the file menu, click exit.
    8. Restart the computer.

    This time off TaskMgr was in the right pane - this time with a little "ohho? icon followed REG_DWORD

    I tried to create a new entry for the current user by copying one for all users, but not joy.

    Any suggestions?

    CTRL + Alt + Del does not receive any reaction whatsoever, no Ctrl + Shift + Esc or click with the right button on the barv task and selecting the Task Manager

    Thank you in anticipation

    These KB articles are for a different problem when you receive these messages when you run the Task Manager...

    Some malicious software is aware of the methods you're most likely to use to find and remove it (Task Manager, System Restore, command prompt, Internet, Google, etc.)

    The malware does not allows you to use things like the Task Manager to find and remove, so it prevents them from becoming a process running on the system and the process will not start or the process will be completed as soon as it is launched.

    The malware is happier when he let you think you need to use system restore, a repair install or reinstall your XP from scratch to fix your system when none of this is necessary.

    You can fool the malware (and then fix it).

    Assuming that your Windows is installed on your drive C, using Windows Explorer, navigate to the folder c:\windows\system32 and locate taskmgr.exe.

    Copy the taskmgr.exe file and rename the copy something malicious software will not recognize.  I like to call the copy:

    c:\windows\system32\jose.exe

    Double-click on jose.exe and see if the Windows Task Manager window opens now.

    The problem is the malware won't let the taskmgr.exe a running process, but he does not know jose.exe as a running process in order to thwart you all (I have a feeling that he will well a day on jose.exe).

    Will not 'fix' your task manager, but at least you will know whether or not the Task Manager mechanism works (taskmgr.exe still not start properly).  If you try to remove some malware and the need to use the Task Manager, you can simply launch jose.exe (double-click) instead, but will be still infected your system.

  • Switches to color when you restart the computer profile or wakes from sleep

    I bought a Dell Inspiron 1470 with Windows 7 at home as a backup of my MacBook Pro.  I used the Spyder2Express to calibrate my screen that works well.  After that I restarted my PC the color profile has been enabled for a few short seconds, but then returned to the default setting, which is horribly blue and too bright.

    I then removed the color profile created by my Spyder2Express and used Windows' built in the calibration of the monitor.  Yet once, it worked until I rebooted the computer, or he woke from sleep mode.

    I then wen to the control panel-->--> the color management advanced and assured the new profile is the default value of the system.  The problem still remained after the computer is restarted.

    The only solution I have found so far is if after I restarted my pc I go to Panel of--> of color management and select and clear the checkbox "use my settings for this device."  My profile will then return until I restart the next time.

    As a pro photographer, it is a question that is extremely disappointing.  I searched forums, web, called Dell directly and none of this was of no help.  Any thoughts?

    Hi Mike,.

    It seems that software Spyder2Express adds color profile after each reboot. We can check if really Spyder2Express is the origin of the problem

    Method 1:

    Uninstall Spyder 2 express and check if the return of the issue after each reboot.

    Method 2:

    Configure the computer to boot and then refine the boot entry that is causing the problem

    Step 1: Perform a clean boot:

    Note If the computer is connected to a network, network policy settings may prevent you from following these steps. We recommend strongly that you do not use System Configuration utility to change startup options on the computer, unless a support engineer Microsoft directs you to do so. This can make the computer unusable.
    a. log in the computer using an account with administrator rights.
    b. Click Start, type msconfig.exe in the start search box and press ENTER to start the System Configuration utility.
    c. If you are prompted for an administrator password or for confirmation, type your password, or click on continue.
    d. under the general tab, click Selective startup, and then clear the check box load startup items. (The check box use the file Boot is not available.)
    e. on the Services tab, click to select the skin all the Microsoft services check box, and then click Disable all.
    Note following this step lets Microsoft services continue to operate. These services include networking, Plug-and-Play, record of events, error reporting, and other services. If you disable these services, you can permanently delete all restore points. Do not do this if you want to use to restore the system with the existing restore points.
    f. click OK and then click on restart.

    Step 2: Enable half the services

    a. click on the Services tab and then click to select the skin all the Microsoft services checkbox.
    b. Click to select half of the check boxes in the Service list.
    c. click OK and then click on restart.
     
    Solve the problem:
    After you determine the startup item or the service that is causing the problem, contact the manufacturer of the program to determine if the problem can be solved. Or, run the System Configuration utility, and then click to clear the check box of the element of the problem.

    Reset the computer to start as usual:
    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
    a. Click Start, type msconfig.exe in the start search box and press ENTER.
    If you are prompted for an administrator password or for confirmation, type your password, or click on continue.
    On the general tab, click the Normal startup option, and then click OK.
    When you are prompted to restart the computer, click on restart.

    All the steps above to perform the clean boot is mentioned in the following article
    http://support.Microsoft.com/kb/929135

    Hope this helps,
    A Mir.

  • Draw lines based on values from database

    I want to draw the line based on the data from database.

    Number of lines will be the number of records in the query.

    line length will be based on the value of the column in centimetres.

    by example, if the query selects 3 folders 3 lines will be drawn.

    If the first record column value is 5 then 5 cm line will be drawn.

    Thank you.

    Please find the sample report and xml.

    Kaya.

  • Change the menu language to English from German

    How can I change the setting in Adobe reader for my menu is in English, not German?

    Hello users,

    Follow the steps below to change the language of the application: -.

    • Open Adobe Reader
    • Navigate to the edition menu, select Preferences from the menu drop down.
    • Select 'Language' in categories.
    • The value "Application Language" "English".
    • Click OK to confirm the changes.

    Let me know if you encounter any problem.

    Kind regards

    Nicos

  • How to use the OEM grid control to find databases, not in archivelog mode?

    Hello

    We have currently 130 databases, say, if I want to come off as any database currently NOT in archivelog mode, is there a quick way to find out?

    using the OEM grid control

    or

    a similar trick,

    but really do not need to manually check each database.

    Thank you very much!

    This query works in 12 c - please run as SYSMAN.
    It is based on undocumented assumptions well + (AND key_value = "NOARCHIVELOG") +.

      SELECT *
      FROM SYSMAN.MGMT$GROUP_DERIVED_MEMBERSHIPS O ,
        SYSMAN.MGMT$TARGET T ,
        sysman.MGMT$AVAILABILITY_CURRENT st
      WHERE
      o.member_target_type     IN ('oracle_database', 'rac_database')
      AND ( t.target_type           ='rac_database'
      OR (t.target_type             ='oracle_database'
      AND t.type_qualifier3        != 'RACINST'))
      AND o. member_target_guid     = t.target_guid
      AND t.target_guid             = st.target_guid
      AND st.availability_status    = 'Target Up'
      AND ( EXISTS
        (SELECT *
        FROM sysman.mgmt$metric_current i
        WHERE I.TARGET_GUID = O.MEMBER_TARGET_GUID
        AND metric_name     = 'archFull'
        AND Metric_Column   = 'archTotal'
        AND metric_label    = 'Archive Area'
        AND column_label    = 'Total Archive Area (KB)'
        AND key_value       = 'NOARCHIVELOG'
        ));
    

    Another way to achieve the goal is to push the extended parameters (SELECT LOG_MODE FROM V$ DATABASE) on each DB and monitor the values they return to the repository. This is an example for a (slightly) different problem - http://iiotzov.wordpress.com/2012/08/08/how-to-use-the-new-oem-12c-metric-extensions-to-enforce-enterprise-wide-custom-policies.

    OEM repository has many other uses grand-http://iiotzov.files.wordpress.com/2012/05/oem-repository-a-second-look.doc, http://iiotzov.files.wordpress.com/2011/08/iotzov_oem_repository.pdf

    Lordane Iotzov
    http://iiotzov.WordPress.com/

  • Unable to update the payload by managed program from Bean data

    Hello

    BPM 11.1.1.5 + Extensions Pack features, Feature Pack, JDeveloper 11.1.1.5 model: ADF BC

    How to access the BPM 11 g load useful or process varibles in the workflow of ADF
    The task of reading by program details

    I followed the 2 wires above to read the value according to the payload data.
    So I'm able to read existing values according to the payload data.

    Managed code of bean to get the current payload data (copied from the links above) - tried the call of setOperation and invokeOperation
    SerializableAttribute public class MyBean extends InvokeActionBean
    {
    public String setOperation (ActionEvent actionEvent)
    {
    FacesContext context = FacesContext.getCurrentInstance ();
    String tskId = (String) context.getApplication () .evaluateExpressionGet (context, "#{pageFlowScope.bpmWorklistTaskId}", String.class);
    IWorkflowServiceClient workflowSvcClient = (WorkflowServiceClientFactory.REMOTE_CLIENT) WorkflowServiceClientFactory.getWorkflowServiceClient;
    ITaskService taskSvc = workflowSvcClient. getTaskService().
    ITaskQueryService wfQueryService = workflowSvcClient.getTaskQueryService ();
    IWorkflowContext wfContext = WorklistUtil.getWorkflowContextForASelectedTask ();
    Task myTask = wfQueryService.getTaskDetailsById (wfContext, tskId);
    Element payloadElem = myTask.getPayloadAsElement ();
    NodeList payloadNodeList = payloadElem.getElementsByTagName (("MyApproval"));
    Node fstnode = payloadNodeList.item (0);
    Element fstElmnt = fstnode (element);
    NodeList tstNmElmntLst = fstElmnt.getElementsByTagName ("approvalRequired"); getting node approvalRequired
    Element tstNmElmnt = tstNmElmntLst.item (0) (element);
    _logger.severe ("node Value:" + tstNmElmnt. getNodeValue() "');
    ...
    the above newspaper printed the existing value correctly in newspapers

    So far so good.

    But my requirement is to update the payload data before sending it to the next task.
    These payload data process will decide which path to choose (exclusive gateway).

    So I tried to update the following payload data.

    tstNmElmnt.setNodeValue ("yes"); (actually it comes to dynamic value returned from a java method)
    Return super.setOperation (actionEvent);
    }

    The statement above doesn't seem to work.
    There was no exception as well.
    I checked the data payload of the Oracle Enterprise Manager of verification of process instance console, but it doesn't seem to affect the new value ("yes")

    Can someone check and let me know if I missed something?

    Thanks for any help.
    Concerning
    Sameer

    Next post helped me.
    Assign the role, the Group initiated human when task

    We need to call the following method to update the data payload instead of setNodeValue

    tstNmElmnt.setTextContent ("yes");
    myTask.setPayloadAsElement (payloadElem);
    taskSvc.updateTask (wfContext, myTask);

    Thanks and greetings
    Sameer

  • How cffileupload and store the paths of files in a database?

    I use CF 9 and work download multi-fichiers. I need help is a help desk page that displays the names of files with links to the files that are uploaded with the form that a user submits. When I view a page admin, I need to see the form results to email with a list of downloaded files and links to where they are.

    Any ideas on how I can get an admin page to show only the files associated with each form submission? I guess I have to find a method for stroring each path of file uploaded to a database, but I don't know how to do this. Any help would be appreciated. Thank you

    You can do the following:

    (1) create a database table named uploadedFile. Columns can be, for example,

    upload_id: INT, autoincrement, primary key

    DateTimeCreated: DATETIME

    ServerFile: varchar (50)

    serverdirectory: varchar (30)

    (2) make your multi-upload, for example,

    myMultiUploader.cfm

    myUploadFiles.cfm

    Insert in uploadedfile (datetimecreated, serverdirectory serverfile)

    ("values (#cffile.timecreated #,"#replace(cffile.serverdirectory,"\","/","all") # "," #cffile.serverfile # ")

  • Received the error when transferring data from the database file

    Hello...

    I have my using SOA 10.1.3.1.0. I am trying to transfer the data from the CSV of the oracle database.

    The settings of connection in file xml oc4j DBA adapter file in the path C:\product\10.1.3.1\OracleAS_1\j2ee\oc4j_soa\application-deployments\default\DbAdapter is shown below.

    < location connector-factory = name of the connector "ist/DB/DBConnection1" = "Adapter database" >
    < config-property name = "xADataSourceName" value = "jdbc/DBConnection1DataSource" / >
    < config-property name = "dataSourceName" value = "loc/DBConnection1DataSource" / >
    < config-property name = "platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/ >
    < config-property name = "usesNativeSequencing" value = "true" / >
    < config-property name = "sequencePreallocationSize" value = "50" / >
    < config-property name = "defaultNChar" value = "false" / >
    < config-property name = "usesBatchWriting" value = "true" / >
    < connection pooling using 'none' = >
    < / connection pooling >
    < use security-config 'none' = >
    < / security-config >
    < / connector-factory >


    I get the following error:

    < name of part = "summary" >
    < Summary >
    file:/C:/product/10.1.3.1/OracleAS_1/BPEL/domains/default/tmp/.bpel_FileToDb_v1.0_188277739ed1e0b720c1fefd0275d1c0.tmp/FileToAdapterService.WSDL [FileToAdapterService_ptt::insert (FiletodbCollection)] - SISM JCA Execute of operation "insert" has no reason to: could not create/access the TopLink Session.
    This session is used to connect to the data store. Caused by: loc/DBConnection1DataSource not found
    ; nested exception is:
    ORABPEL-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the data store. [Caused by: loc/DBConnection1DataSource not found]
    See the first exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml), and then restart the server. Caused by the Exception TOPLINK-7060 (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.ValidationException

    Description of the exception: could not acquire data source loc/DBConnection1DataSource

    Inner exception: javax.naming.NameNotFoundException: loc/DBConnection1DataSource not found.
    < / Summary >
    < / part >


    What is the error in the loc/DBConnection1DataSource line? Guys thank you in advance...


    Thank you...

    Published by: userus007 on January 2, 2010 17:16

    Published by: userus007 on January 2, 2010 17:18

    Visit similar thread oc4j - RA.xml and data - sources.xml

  • Change the characters of WE8ISO8859P1 to AL32UTF8 database

    We want to change our database characterset to AL32UTF8 of WE8ISO859P1.
    When executing the csscan of WE8ISO859P1 to WE8ISO859P1 in the same character set, we see data with loss. It appears in the attachment.
    When executing csscan to WE8MSWIN1252, we get data with loss.
    When running with AL32UTF8 csscan, we get even amount of data with losses.

    Report of the WE8ISO859P1 to the WE8ISO859P1

    [Application summary of data Conversion]

    Immutable data type Convertible truncation with loss
    --------------------- ---------------- ---------------- ---------------- ----------------
    VARCHAR2 0 0 38 865 2,544,258,408
    CHAR 138 377 0 0 0
    LONG 10,418,973 0 0 76
    CLOB 0 0 0 0
    VARRAY 0 0 0 0
    --------------------- ---------------- ---------------- ---------------- ----------------
    Total 0 0 38 941 2,554,815,758
    Total percentage 99.998% 0.000 0.000% 0.002%



    Of WE8ISO8859P1 to WE8MSWIN1252.

    [Application summary of data Conversion]

    Immutable data type Convertible truncation with loss
    --------------------- ---------------- ---------------- ---------------- ----------------
    VARCHAR2 0 0 38 865 2,544,258,408
    CHAR 138 377 0 0 0
    LONG 10,418,973 0 0 76
    CLOB 0 0 0 0
    VARRAY 0 0 0 0
    --------------------- ---------------- ---------------- ---------------- ----------------
    Total 0 0 38 941 2,554,815,758
    Total percentage 99.998% 0.000 0.000% 0.002%



    Of WE8ISO8859P1 to AL32UTF8,.

    [Application summary of data Conversion]

    Immutable data type Convertible truncation with loss
    --------------------- ---------------- ---------------- ---------------- ----------------
    VARCHAR2 2,525,222,555 18 717 38 865 19,017,193
    CHAR 138 377 0 0 0
    LONG 120 132 0 76 10,298,841
    CLOB 0 0 0 0
    VARRAY 0 0 0 0
    --------------------- ---------------- ---------------- ---------------- ----------------
    2,535,659,773 19,137,325 Total 18 717 38 941
    Total percentage 99.249 0,749% 0.001 0.002%



    Now the problem is on with data loss. As we see same amount of loss of WE8ISO859P1 to WE8ISO859P1 and WE8ISO8859P1 to AL32UTF8.

    But I think I'm confused everytime I open the scan.err file, I never see any character replacement.

    What would be my next step for character set migration. If we need to take care of the data with loss? Go directly to AL32UTF8? If csscan show many with loss of data, but while opening scan.err, we see no character replacement. What should we do now to go to AL32UTF8?

    Any suggestion is really welcome.

    Thank you.

    When you open the scan.err file, you will not see the wildcard, but source codes. You should look for Windows characters since the code 0 x 80-0x9f range. Scan.err also, shows only a prefix of each data, even if a given value does not show any problem codes, codes may be in the end substring of the value.

    You should basically do the following: for each column of data with losses reported in the analyse.txt you look at the column and try to identify its content. More likely that you will see is Western European text Windows (WE8MSWIN1252). It comes to WE8ISO8859P1 more Windows specific codes in the range of 0 x 80-0x9f (quotes, the Euro symbol, etc.). According to the database, other possibilities are:

    1 binary, for example the results of encrypting procedures DBMS_OBFUSCATION_TOOLKIT, images, etc.
    2 Western Europe data page in the code UTF-8 Unicode or MS-DOS 437 or 850 (registered in garbage - in the scenario of garbage-out, when NLS_LANG is incorrectly on the DB character set).
    3. data in other languages.

    The measures depends on the identified data. If only WE8MSWIN1252 is identified, the solution is to analyze the DB with fromchar and tochar WE8MSWIN1252 value. This should report no loss of data and you can run csalter.plb to migrate the characters of WE8ISO8859P1 in WE8MSWIN1252 database. Then you can proceed to WE8MSWIN1252 migration to Unicode.

    IMPORTANT: It is insufficient to simply scan with fromchar and tochar value WE8MSWIN1252. This combination of settings tends to never share data with loss! You need to visually inspect the data to see if it is readable in Western Europe. The scan is just a sine qua non for csalter.plb.

    If you identify binary data, you must update your application first to use a type of binary data (RAW, LONG RAW, BLOB). Once the column is binary, you can continue with the migration.

    If you identify Western European data in other character sets, you must run the UPDATE with the CONVERT function to convert the data in WE8ISO8859P1 or WE8MSWIN1252 before migration to Unicode.

    If you identify data in other languages, you should unload the data in external text files (with NLS_LANG value. WE8ISO8859P1 avoid conversion), divided by language. Then, after the conversion to Unicode format, you should load the data into the database using SQL * Loader, defining the character set appropriate data in control files.

    IMPORTANT: With data attachment in the database, you must generally take a look at who put these data in the database or applications that use the data. These applications can have configuration changes to make sure that they do not store incorrect data more and to ensure that they can properly read the now cleaned data.

    -Sergiusz

  • SoftMotion cRIO - how to read the position of a host from a sample of the expedition?

    When you open the examples provided with NI SoftMotion, generally there are two loops. The main loop and a loop that contains the following message:

    "The position of reading and tracing normally would be on the host by reading data from the target.  This is done in this example for simplicity. »

    Then, we advise on the Panel before you go to ni.com/info/f/ and enter the info code nismex for more information on the use of this example in a system of real movement.

    My question may seem obvious, but how "read the position on the host by reading data from the target?

    I tried to use the block function NOR SoftMotion read inside a VI on the host, of course, it does not, because the resource is on target.

    Should I leave the second loop inside the VI running system cRIO and just no conspiracy, but subscribe to a shared variable? I see that you can do a right click on the function block and select if you want output to be a shared variable. Or this second loop is supposed to be removed from the VI running on the target RT? How reads the position then?

    To see an example of what I mean, open this example: C:\Program NIUninstaller Instruments\LabVIEW 2009\examples\Motion\FunctionBlocks\Axis Straight Line Move\Axis right Line.lvproj

    Thank you

    Fabiola

    Concerning priority and when you call the motion function blocks:

    The NI SoftMotion engine for cRIO uses a background 'pilot' that runs in phase of analysis on the CompactRIO system engine.  This provides the required sync and sync for motion runs correctly.  This 'pilot' motion function blocks, simply send asynchronous commands.  You can consider them as an API to the engine of control of movement control.  You are not required to synchronize the function of movement of the scanning engine blocks or even to perform at a highest priority.  However, you will probably choose to run these a higher priority or in a loop timed for reasons of prioritization of execution.  For more details on the NI SoftMotion architecture and recommendations on how to build movement on CompactRIO systems discover the CompactRIO (http://www.ni.com/compactriodevguide/) Developer Guide.  It has been updated in December 2009 and Chapter 5 now has much on the order of movement on CompactRIO complete with examples of projects.

Maybe you are looking for