Reading time to fetch multiple records vs. single record

Hi all

I have an application where I need to get several records, I use an SMU-5185, and basically, the problem is that it takes too long to retrieve multiple records, I did a test to measure the time it takes for the reading of the hole 32 MB of data and results.

Parameters:

Records to Fetch = 8192 (maximum 1 page = 4 KB, 8192 Records = 32 MB)

Fetch time = 1100 ms

Records to Fetch = 1

Samples to Fetch = (2 ^ 25-1500) = 32MB

Fetch time = 70 ms

So, I want to know why it takes more time to get the multiplerecords if both are reading the same amount of data? Is there something I can do to decrease the recovery time?

Thank you

Hi Rodrigo,

In fact, I think that the rate of release should be out of the equation, as in the while loop I wait until the end of the acquisition,

You're absolutely right, I apologize for this oversight.

I'm you test your code and see several times (about 930ms) Fetch when only pick a channel.  As soon as I specified two channels, the recovery time is an order of magnitude smaller (around 90ms).  Change the sampling frequency, fetch timeout and record length do not seem to affect this disparity in the order of magnitude.

So to reiterate:

In the case of single record , changing from one channel to both channels double recovery time.  It's what I expect.

In the case of multi recording , changing from one channel to both channels decreases the time of recovery by an order of magnitude.  I don't think that.

Furthermore, when I test in the example shipping niScope EX Acquisition configured standard I do not see this effect.

(1) can you confirm that, in the case of multi account for your tests, you see that the recovery time reduced when you specify two channels instead of one?

(2) can you confirm that you are not able to replicate that in the example Acquisition set up ?

I have tabled a CAR 350194 to address this behavior more with R & D, but unfortunately I can't promise a timeline for the resolution.  I recommend at this stage unless you change Acquisition is configured when you set up your code instead of starting from scratch.  Support at home OR you can call at any time to check the condition of this CAR.

To answer your question of why a use case takes more time than another, it will take more time to study according to the guidelines of this CAR.  We have already mentioned there is some overhead involved with multi-record fetch, but whether or not the time more or less long you see are good times is something that R & D will have to answer.

Please let me know if you can confirm what I see by testing.

-Andrew

Tags: NI Products

Similar Questions

  • fetch multiple records form

    How to write a fetch statement that retrieves multiple records and allow users scroll record 1/3,2/3, 3/3... in the form? I'm not using built in the declaration of add\update\fetch

    example: table seller

    number of seq_no (PK);
    vendor_id number;
    date of call_date;
    issue_asked varchar2 (50);

    When I type in the vendor_id, I want to implement the documents associated to the id in the form. I think I might just need a few meter and loop to increase select it in the statement, but I'm not sure how yet or are there any built in can I use under apex? can u help?

    Munshar

    Do you need to be able to update the tables or only the subtable? If it is only the 'CALLS' table you might create a normal report for sellers and a tabular presentation of the calls. Add a link to the seller's report to display the form as a table for this provider.

  • Lower cost of query sql... but more time to fetch the records...

    Hello
    I have a 'strange' with a db view situation facing costly.
    I tried to reduce the cost of the overview
    specifically for 223 records fetched{the cost from 149 reduced to 74,
                                                           the recursive calls from 796 reduced to 224,
                                                           the consistent gets from 311516 reduced to 310341,
                                                            the physical reads from 7 reduced to 0}
    but the amount of time needed to fetch the results is greater than the old version of the db view....{it may be the double...}
    Have you any idea about this...????

    Note: I have got fresh statistics...
             I use db 10g v.2


    Thanks,
    Sim

    Try to trace the query and see what tkprofs shows you.
    ALTER session set events 10046 trace context name forever, level 12';
    Run the query
    "ALTER session set events ' trace 10046 name context off."

    Then, run tkprofs on the file path to see where the database devoted his time and effort. Do the same for the baseline query in a different session (so you will generate a different trace file).

    If that does not produce something useful, try to use
    "ALTER session set events ' trace 10053 name context forever."
    Run the query
    "ALTER session set events ' trace 10053 name context off."

    Then examine the trace file to see if you can learn anything.

    Given that you have given us something more to go, it's all the help I can give...

  • How to concatenate multiple records in a single

    Hello world:

    I want to know if is a way to concat multiple records into one without the help of the sliders. For example, I have a table named "Authors" like this:

    LAN | Author
    -----------------
    English | Ernest Hemingway
    Spanish | Octavio Paz
    Spanish | Mario Vargas Llosa
    English | Sinclair Lewis
    Spanish | Gabriel García Márquez


    And I want to get this:

    Author
    -----------------
    Octavio Paz, Mario Vargas Llosa, Gabriel García Márquez

    I have worked with SQL Server and I can do something like this:

    CREATE FUNCTION dbo. MyConcat (@lan varchar (10))
    RETURNS varchar (5000) AS
    BEGIN
    declare @retvalue varchar (5000)
    Set @retvalue = "
    Select @retvalue = @retvalue + author + ',' authors where lan = @lan
    return substring (@retvalue, 1, len (@retvalue)-1)
    END

    That is to say, do not use cursors to concatenate records. However, with ORACLE, I do something like that.

    FUNCTION MyConcat(P_Lan IN VARCHAR2) VARCHAR2 IS BACK
    v_ret VARCHAR2 (4000);
    v_element VARCHAR2 (4000);
    v_cursor sys_refcursor;
    BEGIN
    OPEN to SELECT V_cursor author of authors where Lan = P_Lan
    LOOP
    SEEK v_cursor INTO v_elemento;
    OUTPUT WHEN v_cursor % NOTFOUND;
    IF v_ret IS NULL THEN
    v_ret: = v_element;
    ON THE OTHER
    v_ret: = v_ret | ', ' || v_element;
    END IF;
    END LOOP;
    RETURN v_ret;
    END;

    There is another way to to do?

    Best regards
    Jack

    You can find plenty of examples here:

    http://www.Oracle-base.com/articles/Misc/StringAggregationTechniques.php

    and also here:

    http://www.sqlsnippets.com/en/topic-11787.html

    Published by: hoek on October 21, 2010 17:50

  • 5152. multiple record acquisition forever

    Is it possible to do a multiple record acquisition on the 5152, which itself will be automatically retrigger forever?

    I have currently a multiple record acquisition implemented to acquire 256 records, but the external triggers (using the TRIG BNC of input) are so close together that the software cannot rearm the coverage in time for the next acquisition, and some triggers are missed.

    For example, we are capture 8000 samples to 2 MS/s, if every record is 4 ms in duration. The external trigger occurs at the beginning of all of the records, with a period of 4 ms, so I essentially continuous. Each 256 files (about once per second), the LabVIEW VI transfers data in memory, he wrote on the disk, it displays on the front panel, etc, then re - the scope for the next acquisition of weapons. It would be ideal that the scope can be configured for the immediate release of an another multiple record acquisition (preferably in hardware), so that it could acquire in parallel with LabVIEW treatment files and write data to the disk.

    Any thoughts on how I might accomplish this?

    Hi Schrockwell,

    There is no way to make a Multi-Multi Record Acquisition.

    What you want to do, the short answer is Yes - there is a way to introduce within the finished construction of the API OR-SCOPE, but you should make sure that

    1. you must enable more Records than available memory

    2. you must set the number of records in very huge.  Since this value is an Int32, theoretically, the more important you can set avalue of about 2.15 billion (2 ^ 31-1).   After that, you must stop and restart your acquisition.

    The total time that the acquisition will continue for is:

    = Total number of records [#] acquisition [s] Total time / Trigger rate [Hz]

    3. Finally, you should make sure that you can endure the flow in your PXI/PCI bus, and you have designed your code effectively to support this.

    Two important things I noticed is that you decide to display data on a chart, and you write on a disc.  View data in a graph will lead your program last much longer the complete loop iteration - instead, try rΘcupΦre without display data.  Secondly - if you write to a disc, you must use queuesto do.

    If you already do this, then the question of highest level, it's whether or not you are supplying data on your digitizer.  If so, you must work around this problem so that there is no backlog of data.  The extraction flow (data transferred in your program using the Fetch function) must be equal to your Flow of Acquisition:

    Acquisition flow [B/s]

    = Number of samples per registration type [Sa/REC/WAV] * rate [Hz] * resolution digitizer [bytes / his]

    (Since the 5152 is a 8-bit digitizer, the resolution of your digitizer is 1 b/sample).

    If you can compare your speed of recoveryand who then subtract the acquisition flowcalculation, then you should see a number (in B/s) which reflects the speed at which you are supplying data.  For an acquisition to keep forever, this number must be virtually zero.

    I hope this helps,

    -Andrew

  • Update multiple records at once

    First, thank you very much the people who have helped me out several times now. I put things together and came across another issue of 'beauty' begin as follows. In the previous topics, I had a way to get to an array of automated classification based on the inputs of a fixtures table and some simple calculations. Now, which has been accomplished which resulted in me having to update all the teams by simply clicking a button.

    As you can see in the code below, using a table with every row a form, at the end of the line, there is a button called 'OK' I have to push to update the record according to. A repeat region for all teams in this query shows the ranking of 'new', but is not yet inserted in the League table. Is it possible to have this repeat region without having to push 18 or 20 times a button update? At the end of the table, one (1) button update all records? The primary key is composed like this ' 0000 - u00a "(4 numéros un tiret puis un «u» 1 ou 2 numéros et 1 ou 2 lettres à nouveau)."

    <?php require_once('Connections/connection.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
      $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 "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    }

    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }

    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "klassement")) {
      $updateSQL = sprintf("UPDATE klassement SET wedstrijden=%s, overwinning=%s, verlies=%s, gelijkspel=%s, goalsvoor=%s, goalstegen=%s, goalverschil=%s, punten=%s WHERE ploegid=%s",
                           GetSQLValueString($_POST['wedstrijden'], "int"),
                           GetSQLValueString($_POST['overwinning'], "int"),
                           GetSQLValueString($_POST['verlies'], "int"),
                           GetSQLValueString($_POST['gelijkspel'], "int"),
                           GetSQLValueString($_POST['goalsvoor'], "int"),
                           GetSQLValueString($_POST['goalstegen'], "int"),
                           GetSQLValueString($_POST['goalverschil'], "int"),
                           GetSQLValueString($_POST['punten'], "int"),
                           GetSQLValueString($_POST['ploegid'], "text"));

      mysql_select_db($database_koscw, $koscw);
      $Result1 = mysql_query($updateSQL, $koscw) or die(mysql_error());

      $updateGoTo = "klassement-ploegen.php?reeksid=" . $row_klassement['reeksid'] . "";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      }
      header(sprintf("Location: %s", $updateGoTo));
    }

    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
      if (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 "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }
    }

    $reeks_klassement = "-1";
    if (isset($_GET['reeksid'])) {
      $reeks_klassement = $_GET['reeksid'];
    }
    mysql_select_db($database_koscw, $koscw);
    $query_klassement = sprintf("select * from klassement where reeksid = %s order by status asc, punten desc, overwinning desc, goalverschil desc", GetSQLValueString($reeks_klassement, "text"));
    $klassement = mysql_query($query_klassement, $koscw) or die(mysql_error());
    $row_klassement = mysql_fetch_assoc($klassement);
    $totalRows_klassement = mysql_num_rows($klassement);

    $id_reeks = "-1";
    if (isset($_GET['reeksid'])) {
      $id_reeks = $_GET['reeksid'];
    }
    mysql_select_db($database_koscw, $koscw);
    $query_reeks = sprintf("select reeksnaam from reeksen where reeksid = %s", GetSQLValueString($id_reeks, "text"));
    $reeks = mysql_query($query_reeks, $koscw) or die(mysql_error());
    $row_reeks = mysql_fetch_assoc($reeks);
    $totalRows_reeks = mysql_num_rows($reeks);

    mysql_select_db($database_koscw, $koscw);
    $query_seizoen = "select * from seizoen";
    $seizoen = mysql_query($query_seizoen, $koscw) or die(mysql_error());
    $row_seizoen = mysql_fetch_assoc($seizoen);
    $totalRows_seizoen = mysql_num_rows($seizoen);

    $huidig=$row_seizoen['huidigseizoen'];
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="text/css" media="all" href="../_styles/koscw-admin.css" />
    <title>Klassement <?php echo $row_reeks['reeksnaam']; ?> | Beheerpaneel | 1349</title>
    </head>
    <body>
    <div id="container">
    <h1 class="overzichth1">Klassement <?php echo $row_reeks['reeksnaam']; ?></h1>
    <?php if ($totalRows_klassement > 0) { // Show if recordset not empty ?>
    <table cellpadding="5" cellspacing="0" border="0" id="klassement">
    <tr>
      <td class="klassementsmall bgccc bold"></td>
           <td class="klassementteam bgccc bold">Ploegnaam</td>
           <td class="klassementsmall bgccc bold">+</td>
           <td class="klassementsmall bgccc bold">-</td>
           <td class="klassementsmall bgccc bold">=</td>
          <td class="klassementsmall bgccc bold">#</td>
           <td class="klassementsmall bgccc bold"><img src="../_img/goalsmade.png" alt="Goals +" /></td>
           <td class="klassementsmall bgccc bold"><img src="../_img/goalsagainst.png" alt="Goals -" /></td>
           <td class="klassementsmall bgccc bold"><img src="../_img/goalsdifference.png" alt="Goals &asymp;" /></td>
           <td class="klassementsmall bgccc bold">PTN</td>
          <td class="klassementsmall bgccc"> </td>
    </tr>
    <?php
    $i=0;
    do {
    $i++;
    if($i % 2) { //this means if there is a remainder
         echo "<tr class=\"calendareven\">";
    } else { //if there isn't a remainder we will do the else
         echo "<tr class=\"calendarodd\">";
    }
    ?>
    <td>
    <?php
    $rank += 1;
    echo $rank;
    ?>      </td>
           <td class="klassementteam">
              <?php
            $thuisploeg=$row_klassement ['ploegid'];
              $sql_select_thuisploeg="select ploegnaam from ploegen where ploegid = ('$thuisploeg')";
              $resultset_thuisploeg=mysql_query($sql_select_thuisploeg);
              while ($data_thuisploeg=mysql_fetch_array($resultset_thuisploeg))
              {echo $data_thuisploeg['ploegnaam'] . " ";}?></td>
           <form action="<?php echo $editFormAction; ?>" method="POST" name="klassement">
          <input type="hidden" name="ploegid" value="<?php echo $row_klassement ['ploegid']; ?>" />
           <td>
          <?php
           $tw=$row_klassement['ploegid'];
           $sql_select_tw="SELECT COUNT( * ) AS twin FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND thuisploegid = '$tw' AND thuisploeggoals > bezoekersgoals";
           $resultset_tw=mysql_query($sql_select_tw);
           $data_tw=mysql_fetch_array($resultset_tw);
           $data_tw['twin'];
          
           $uitwin=$row_klassement['ploegid'];
           $sql_select_uitwin="SELECT COUNT( * ) AS awin FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND bezoekersid = '$uitwin' AND thuisploeggoals < bezoekersgoals";
           $resultset_uitwin=mysql_query($sql_select_uitwin);
           $data_uitwin=mysql_fetch_array($resultset_uitwin);
           $data_uitwin['awin'];
          
           $win=($data_tw['twin'])+($data_uitwin['awin']);
           ?>
          <input type="text" name="overwinning" value="<?php echo $win; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
          <?php
           $tv=$row_klassement['ploegid'];
           $sql_select_tv="SELECT COUNT( * ) AS tver FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND thuisploegid = '$tv' AND thuisploeggoals < bezoekersgoals";
           $resultset_tv=mysql_query($sql_select_tv);
           $data_tv=mysql_fetch_array($resultset_tv);
           $data_tv['tver'];
          
           $uitverlies=$row_klassement['ploegid'];
           $sql_select_uitverlies="SELECT COUNT( * ) AS aver FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND bezoekersid = '$uitverlies' AND thuisploeggoals > bezoekersgoals";
           $resultset_uitverlies=mysql_query($sql_select_uitverlies);
           $data_uitverlies=mysql_fetch_array($resultset_uitverlies);
           $data_uitverlies['aver'];
          
           $ver=($data_tv['tver'])+($data_uitverlies['aver']);
           ?>
          <input type="text" name="verlies" value="<?php echo $ver; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
          <?php
           $thuisdraw=$row_klassement['ploegid'];
           $sql_select_thuisdraw="SELECT COUNT( * ) AS tdraw FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND thuisploegid = '$thuisdraw' AND thuisploeggoals = bezoekersgoals";
           $resultset_thuisdraw=mysql_query($sql_select_thuisdraw);
           $data_thuisdraw=mysql_fetch_array($resultset_thuisdraw);
           $data_thuisdraw['tdraw'];
          
           $awaydraw=$row_klassement['ploegid'];
           $sql_select_awaydraw="SELECT COUNT( * ) AS adraw FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND bezoekersid = '$awaydraw' AND thuisploeggoals = bezoekersgoals";
           $resultset_awaydraw=mysql_query($sql_select_awaydraw);
           $data_awaydraw=mysql_fetch_array($resultset_awaydraw);
           $data_awaydraw['adraw'];
          
           $draw=($data_thuisdraw['tdraw'])+($data_awaydraw['adraw']);
           ?>
          <input type="text" name="gelijkspel" value="<?php echo $draw ?>" class="inputscore" readonly="readonly" />
          </td>
          <td>
          <?php $wedstrijden=$win+$ver+$draw; ?>
          <input type="text" name="wedstrijden" value="<?php echo $wedstrijden; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
           <?php
          $tgv=$row_klassement ['ploegid'];
           $sql_select_tgv="SELECT SUM( thuisploeggoals ) AS tgv1 FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND thuisploegid = '$tgv'";
           $resultset_tgv=mysql_query($sql_select_tgv);
           $data_tgv=mysql_fetch_array($resultset_tgv);
           $data_tgv['tgv1'];

          $ugv=$row_klassement ['ploegid'];
           $sql_select_ugv="SELECT SUM( bezoekersgoals ) AS ugv1 FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND bezoekersid = '$ugv'";
           $resultset_ugv=mysql_query($sql_select_ugv);
           $data_ugv=mysql_fetch_array($resultset_ugv);
           $data_ugv['ugv1'];

           $gv=($data_tgv['tgv1'])+($data_ugv['ugv1']);
           ?>
          <input type="text" name="goalsvoor" value="<?php echo $gv; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
           <?php
          $tgt=$row_klassement ['ploegid'];
           $sql_select_tgt="SELECT SUM( thuisploeggoals ) AS tgt1 FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND bezoekersid = '$tgv'";
           $resultset_tgt=mysql_query($sql_select_tgt);
           $data_tgt=mysql_fetch_array($resultset_tgt);
           $data_tgt['tgt1'];

          $ugt=$row_klassement ['ploegid'];
           $sql_select_ugt="SELECT SUM( bezoekersgoals ) AS ugt1 FROM kalender WHERE seizoen = '$huidig' AND speeldag !=0 AND thuisploegid = '$ugv'";
           $resultset_ugt=mysql_query($sql_select_ugt);
           $data_ugt=mysql_fetch_array($resultset_ugt);
           $data_ugt['ugt1'];

           $gt=($data_tgt['tgt1'])+($data_ugt['ugt1']);
           ?>     
          <input type="text" name="goalstegen" value="<?php echo $gt; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
           <?php $goals=$gv-$gt; ?>
          <input type="text" name="goalverschil" value="<?php echo $goals; ?>" class="inputscore" readonly="readonly" />
          </td>
           <td>
           <?php $punten=($win*3)+($draw*1); ?>
          <input type="text" name="punten" value="<?php echo $punten; ?>" class="inputscore" readonly="readonly" />
          </td>
          <td>
          <input type="submit" value="OK" />
          </td>
          <input type="hidden" name="MM_update" value="klassement" />
           </form>
      </tr>
      <?php } while ($row_klassement = mysql_fetch_assoc($klassement)); ?>
    </table>
    <?php } // Show if recordset not empty ?>

    </div>
    </body>
    </html>
    <?php
    mysql_free_result($klassement);

    mysql_free_result($reeks);

    mysql_free_result($seizoen);
    ?>

    Each record is separated, as well as a record can be updated at once, unless you want that all records have the same value.

    To update multiple records in a single operation, you must send the form tabular data. You do this by adding an empty pair of brackets at the end of the name attribute of each entry on the form like this:

     
    

    This translates by $_POST ['ploegid'] which contains a table of all IDS: $_POST ['ploegid'] [0], $_POST ['ploegid'] [1], $_POST ['ploegid'] [2] and so on. All the attributes of the repeat region name need to have added hooks. The following hidden field should be outside of the repeat region and may not have the brackets:

    
    

    You can then use a loop for updating the values like this:

    for ($j = 0, $len = count($_POST['ploegid']); $j < $len; $j++) {  $updateSQL = sprintf("UPDATE klassement SET wedstrijden=%s, overwinning=%s,   verlies=%s, gelijkspel=%s, goalsvoor=%s, goalstegen=%s, goalverschil=%s,   punten=%s WHERE ploegid=%s",                       GetSQLValueString($_POST['wedstrijden'][$j], "int"),                       GetSQLValueString($_POST['overwinning'][$j], "int"),                       GetSQLValueString($_POST['verlies'][$j], "int"),                       GetSQLValueString($_POST['gelijkspel'][$j], "int"),                       GetSQLValueString($_POST['goalsvoor'][$j], "int"),                       GetSQLValueString($_POST['goalstegen'][$j], "int"),                       GetSQLValueString($_POST['goalverschil'][$j], "int"),                       GetSQLValueString($_POST['punten'][$j], "int"),                       GetSQLValueString($_POST['ploegid'][$j], "text"));
    
      mysql_select_db($database_koscw, $koscw);  $Result1 = mysql_query($updateSQL, $koscw) or die(mysql_error());}
    
  • Several box insert as multiple records

    I'm relatively new to ColdFusion. It's the simplicity, as well as Dreamweaver insert/update/delete assistants, have helped build clean enough applications for database insertion, recovery and deletion and display.

    However, I have to be able to insert several selections of boxes as multiple records in a table, and I am running into problems. I guess this sort of thing is the premise of virtually any shopping cart out there, but I can't seem to find any good information on in my 'develop with CFMX manual' or my "Kit of Construction CFMX Web App" book or on the web also. (The only examples for the page of the form or the action page are a static box!)

    The basic premise of what I'm trying to achieve:

    The user is able to select different items in several boxes. (ITEM_ID)
    This selection is associated with the user. (CUSTOMER_ID)
    The selection is associated with a point in time as a year. (INSTANCE_ID)
    These identification numbers that must all be inserted in a 3 column table expecting integers for ITEM_ID CUSTOMER_ID and INSTANCE_ID

    Example of FORM values that would be passed: (147,148,149, 23445, 4) = (3 ITEM_IDs, CUSTOMER_ID and INSTANCE_ID)

    Typical error on presentation to insert action page: Number of columns in reading / writing does not equal the number of values (which is normal, I am gathering several values via checkboxes).

    How can I insert each box is selected as a separate record in the table?

    Such as:
    (147, 23445, 4)
    (148, 23445, 4)
    (149, 23445, 4)

    My Code:

    Form:

    < are method = "post" name = "form2" action = "process_form_action_page.cfm" >

    < table >

    < cfoutput query = "Stored_Procedure1" >

    < b >
    < td > < input type = "checkbox" name = "ITEM_ID" value = "#Stored_Procedure1.ITEM_ID #" > < table >
    #Stored_Procedure1.ITEM_TITLE # < td > < table >
    < /tr >

    < / cfoutput >

    < /table >

    < input type = "hidden" name = 'CUSTOMER_ID' value = '#CUSTOMERS. CUSTOMER_ID #">"
    < input type = "hidden" name = "INSTANCE_ID' value = '#INSTANCE. INSTANCE_ID #">"
    < input type = "submit" value = "Insert record" >

    < / make >


    «"" "Action page:»»"»


    < cfquery datasource = "ORDERS" >

    INSERT INTO PRODUCT_CUSTOMER (ITEM_ID, CUSTOMER_ID, INSTANCE_ID) VALUES)
    < cfif IsDefined "(FORM. ITEM_ID") AND #FORM. NEQ ITEM_ID # "" > "".
    #FORM. ITEM_ID #.
    < cfelse >
    NULL VALUE
    < / cfif >
    ,
    < cfif IsDefined "(FORM. CUSTOMER_ID') AND #FORM. NEQ CUSTOMER_ID # "" > "".
    #FORM. CUSTOMER_ID #.
    < cfelse >
    NULL VALUE
    < / cfif >
    ,
    < cfif IsDefined "(FORM. INSTANCE_ID") AND #FORM. QNE INSTANCE_ID # "" > "".
    #FORM. INSTANCE_ID #.
    < cfelse >
    NULL VALUE
    < / cfif >
    )

    < / cfquery >
    < / cfif >

    Thank you!

    I'm not not to take good advice. If I was a bit too "hard", I'm sorry... but at least I finally got a good response.

    I realized what I wanted anyway. (Sabaidee, yours was the closest answer you to what I later came up with.) Thanks for the effort, I appreciate it. I will certainly implement your logic of to check if the box is checked).

    What I came up with a solution:





    147
    148
    149



    INSERT INTO MyTABLE (CUSTOMER_ID, ITEM_ID, INSTANCE_ID)
    VALUES (' #Form.CUSTOMER_ID # "," #Form.INSTANCE_ID # "," #Checked_ITEM # ")

    If all of the check boxes are selected, the data is inserted as:

    147, 23445, 4
    148, 23445, 4
    149, 23445, 4

    (I realize that there is much more that can be embellished in the form page and the page of the processor).

  • How can I get my laptop Dell Latitude D830 to read my HHB Professional Minidisc recorder CDM 500?

    Original title: my computer does not read my minidisc recorder

    How can I get my laptop Dell Latitude D830 running Microsoft Windows XP to read my HHB Professional Minidisc recorder CDM 500?

    Hi EnverBrowne,

    Thanks for posting in the Microsoft Community.

    I'm sorry to know that you are facing a problem to use HHB Professional Minidisc recorder CDM 500.

    It would be useful that you can answer these questions to help you further.

    1. what exactly happens when you try to use the recorder? You receive messages or error codes?

    2. using the recorder for the first time?

    3. have you made a recent software or hardware changes to the system?

    You can try to start the computer and peripheral equipment Fixit from link and check if it helps:

    Hardware devices do not work or are not detected in Windows

    If you need further assistance, please answer and we will be happy to help you.

  • Add multiple records using the UTL file

    Hi, I have rarely treat PLSQL so any help would be greatly appreciated.

    I need to run a query that selects all instances where the status of a column table

    is equal to true and then write this to a file on the operating system. It is fine if there is only a single disc, but often, there will be multiple records.

    My script file UTL to process 1 plug is as below:


    DECLARE
    L_HANDLER UTL_FILE. TYPE_DE_FICHIER;
    vData VARCHAR2 (85);

    BEGIN


    SELECT THE STATE
    IN vDATA
    Of error_table;
    L_HANDLER: = UTL_FILE. FOPEN ('MYDIR', 'error.txt', 'W');
    UTL_FILE. PUTF (L_HANDLER, VDATA);
    UTL_FILE. FCLOSE (L_HANDLER);
    END;


    Thank you very much

    Adam

    Hi, Adam.

    One way is like this:

    DECLARE

    L_HANDLER UTL_FILE. TYPE_DE_FICHIER;

    BEGIN

    L_HANDLER: = UTL_FILE. FOPEN ("MYDIR", "error.txt', 'W');

    FOR (IN) r

    SELECT THE STATE

    Of error_table

    )

    LOOP

    UTL_FILE. PUTF (L_HANDLER, r.status);

    END LOOP;

    UTL_FILE. FCLOSE (L_HANDLER);

    END;

    There are more effective ways, but they are much more complicated.

  • Question to merge data from multiple records

    Hi all, could really use some help here, I tried to fix this for hours now:

    Make 3 different models for labels that I print on the basis of models of labels Avery for InDesign. When I come to my fusion of data on any of them, I select "Multiple records" in the title records per Document Page, but the preview and the actual creation just spits out a single unique label on each new page. For example, I use 2 x 4 "labels on 2 of them, so it should print 10 per page, but instead to put 10 unique labels on a page, it puts each new label on a new page. Therefore, instead of 100 pages for the 1 000 labels that I print, I find myself with 1,000 pages.

    I know a double check of size constraints on the text box and make sure it suits you when duplicated, and to my knowledge, who is seeking as it's nice. I'm also fairly certain that CSV files that I use are in the right format, too. I am quite stuck at this stage as to what I have to do to solve this problem, no guidance would be great. Here are the screenshots of what I'm looking, please let me know if there is anything else I can give you to help diagnose the problem.

    Screen Shot 2012-09-24 at 10.52.08 AM.png

    Screen Shot 2012-09-24 at 10.52.28 AM.png

    Screen Shot 2012-09-24 at 10.52.37 AM.png

    Screen Shot 2012-09-24 at 10.53.17 AM.png

    Screen Shot 2012-09-24 at 10.53.33 AM.png

    I thinnk the best way to deal with this would be to ensure that all the Avery template information on the master page. Let him be active while you do the layout in the upper left position on THE DOCUMENT PAGE, and then assign the master let anything showing that your placholders and art added none.

    Reassign the master model after the merger.

  • Insert multiple records in a database using the DB adapter and stored procedure

    Hi all

    I want to insert multiple records in a database using a stored procedure. I wanted to insert these records using a data adapter and data adapter must be called by a mediator.

    Can anyone suggest me some ideas if it's possible with capabtilities OOB in SOA suite or not?

    Thank you for your help in advance.

    Thank you
    Shiv

    The trick is in the stored procedure. You must use a data type that will handle multiple records I use varray. An example can be found in this post.

    Re: Mutiple calls to AppsAdapter (pl/sql) when the payload has multiple records

    When you read the procedure stored in the db adapter wizard looks and xsd / xml if you have maps accordingly.

    see you soon
    James

  • Data merge multiple records do not work

    Hi all

    When you try to merge multiple records, the result is the same if I selected just a recording.

    Here's the situation:

    Source file:

    • Excel file with several records, saved as a csv and txt

    The target file:

    • InDesign CS4 file with a single page.
    • framework of a text on the page,
    • a table with the header line and a line of body
    • every cell of body line contains a data field

    I went through all the necessary steps:

    • Choose the data source file (tried with csv and txt, the results are the same) and insert the fields in the table
    • chose "All records" to merge
    • to merge records: selected multiple records

    After choosing "Preview", I see only one record per page, and the new pages are created automatically for EACH record! This is not what I want.

    What I want is for as many records if poster in the table as possible and then to InDesign to create additional if necessary pages.

    What I am doing wrong, or isn't it possible?

    Thank you for all your comments!

    Several records, ID to duplicate everything on the page, so unless there is enough space for all of this, you will get several records.

    Think of it as a frame around all your items, group, then using the step and repeat, except merge data won't allow any element to extend beyond the edge of the drawing page.

  • Insert multiple records in a form with checkboxes

    Hello

    I need to insert multiple records in a database of a form using Coldfusion and am stuck - it works correctly when inserting one record at a time. Basically, the user will choose their name of the employee (EmployeeID) in a dynamic list, then several session (open) numbers that represent classes of training.

    When I try and select several check boxes, I get this error:
    "The number of query values and destination fields is not the same."

    The boxes of the open field are not dynamic, as you can see-how use CFLOOP or any other method to allow several checkboxes be selected, and all open documents is entered into the database on a form?

    I used server behaviors Dreamweaver 8 to create the form - which is limiting I know but I'm not a coder. I hope I can add code here to do things correctly function.



    ----APPLICATION CODE------------------------------------------------------------------

    <!-get employee names->
    < cfquery name = "rsDisplayEmployee" datasource = "FormationRH" >
    SELECT *.
    OF tblEmployees
    ORDER BY LastName ASC < / cfquery >
    <!-->-->
    <! - insert Records - >
    < cfset CurrentPage = GetFileFromPath (GetTemplatePath ()) >
    < cfif IsDefined "(FORM. MM_InsertRecord") AND the FORM. MM_InsertRecord EQ 'form1' >
    < cfquery datasource = "FormationRH" >
    INSERT INTO tblEnrollments (open, EmployeeID)
    VALUES)
    < cfif IsDefined "(FORM. Open") AND #FORM. Open # NEQ "" > "".
    #FORM. Open #.
    < cfelse >
    NULL VALUE
    < / cfif >
    ,
    < cfif IsDefined "(FORM. EmployeeID") AND #FORM. EmployeeID # NEQ "" > "".
    #FORM. EmployeeID #.
    < cfelse >
    NULL VALUE
    < / cfif >
    ) < / cfquery >
    < cflocation url = "2.cfm" >
    < / cfif >
    <!-->-->

    --------FORM CODE-----------------------------------------------------------------------

    < form action = "" < cfoutput > #CurrentPage # < / cfoutput > "id = 'form' name ="form"method ="POST">"
    < table width = "100%" border = "0" cellspacing = "0" cellpadding = "4" >
    < b >
    < td width = "100%" > < h2 > < strong > select an employee name < facilities > < / h2 > < table >
    < /tr >
    < b >
    < td > < select name = "EmployeeID" >
    < cfoutput query = "rsDisplayEmployee" >
    < option value = "#rsDisplayEmployee.EmployeeID #" > #rsDisplayEmployee.LastName #, #rsDisplayEmployee.FirstName # < / option >
    < / cfoutput >
    < / select > < table >
    < /tr >
    < /table >
    < h2 > < strong > select training class < facilities > < / h2 >
    < table width = "600" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td width = "227" valign = "top" > class < table >
    < td width = "373" valign = "top" > < input name = "Open" type = "checkbox" value = "937" / >
    Date < table >
    < /tr >
    < b >
    < td valign = "top" > class < table >
    < td valign = "top" > < label >
    < input name = "Open" type = "checkbox" value = "936" / >
    < / label >
    Date < table >
    < /tr >
    < /table >
    < br / >
    < input type = "submit" name = "Submit" value = 'Sign Up!' / >
    < input type = "hidden" name = "MM_InsertRecord" value = "form" >
    < / make >

    "Add a line" I want to say that, for each of the checkboxes selected in your form, the code will be to insert a new record in the database table. Sorry I probably didn't phrase it very well.

    so, no, the code does not need to wrap around each element. Instead the code examines the form.fieldnames variable (form.fieldnames, which is a list separated by commas of all fields defined in the form, is automatically submitted to each form submission - you don't have to define yourself somehow) and for each selected checkbox will insert a new record in your table with the check box selected and selected value the value of the id of the employee.

  • Insert multiple records in a query from a loop

    Hello

    Im am seriously struggling with something here...


    PROBLEM:
    I want to insert multiple records of checkbox in my db...
    A simple insert statement inserts the 1 record...

    How can I insert all records?

    For example: 10 family names must be inserted at the same time...

    Check my code...


    PLEEEASE, im really craving for help!

    Thank you. Worked perfectly!

  • Output 2 length of time different voltages while recording the current of one of the outputs

    I create a vi that generates output 2 waveforms of voltage different (AO1 and AO2). These signals is different in duration and number of times it will be produced. AO1 must take place several times while AO2 is running her first time. I also record the entry of AI1 output in AO1. I have attached a vi that I thought it would work. I thought it would be good to have the AI/StartTrigger initialize the acquisition and the output voltage. However, this arrangement results in an error. The error I get is-200802. Am I going about this all wrong? Any ideas?

    At first glance, I see some problems with your code:

    -You arecalling DAQmx writing before calling DAQmx Start. The departure must be called before writing.

    -You have two tasks of analog output. Only analog output task is allowed per unit. If both of your analog output channels are on the same card, they must be in the same spot.

    Here is a great resource for getting started with DAQmx programming.

Maybe you are looking for