I want to insert 2d array (XY position)t​o XY graph and can delete the data from the array too.

Firstly, I receive the data of X and Y position one by one seperately and then I add this two value (numeric double) to array two column (XY). After I press ok button the new data for X and Y will come and be added to the last row of my data. Then I use this data to plot in XY graph. All of this I did it already, but I want more additional function.
My additional function is I want to add or delete a pair of data XY from the array at the row that I defined. This one I can not do it.....

You use the Insert Into Array and Delete From Array functions on the Array palette. Here's a simple example in 6.0 that shows how they're used.
Attachments:
Insert_and_Remove_Row.vi ‏50 KB

Similar Messages

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • How can I enter the data from the recordset into your insert query

    Hi
    i would like to know how I can enter the data from the recordset into your insert query without using a  hidden field.
    thanks
    ------------------------------------------------------------------------------------Below is the code------------------------------------------------------------------------------------- -----
    <?php require_once('../../Connections/ezzyConn.php'); ?>
    <?php
    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;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "frmpostComment")) {
       $insertSQL = sprintf("INSERT INTO comments (com_topic, com_user, title,  com_content, com_date, online_id) VALUES (%s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['com_topic'], "int"),
                           GetSQLValueString($_POST['commentby'], "int"),
                           GetSQLValueString($_POST['title'], "text"),
                           GetSQLValueString($_POST['com_content'], "text"),
                           GetSQLValueString($_POST['com_date'], "text"),
                           GetSQLValueString($_POST['online_id'], "int"));
      mysql_select_db($database_ezzyConn, $ezzyConn);
      $Result1 = mysql_query($insertSQL, $ezzyConn) or die(mysql_error());
      $insertGoTo = "index.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    $colname_rsCommentby = "-1";
    if (isset($_SESSION['MM_Username'])) {
      $colname_rsCommentby = $_SESSION['MM_Username'];
    mysql_select_db($database_ezzyConn, $ezzyConn);
    $query_rsTopics = "SELECT topic_id, topic FROM topics ORDER BY topic_date DESC";
    $rsTopics = mysql_query($query_rsTopics, $ezzyConn) or die(mysql_error());
    $row_rsTopics = mysql_fetch_assoc($rsTopics);
    $totalRows_rsTopics = mysql_num_rows($rsTopics);
    mysql_select_db($database_ezzyConn, $ezzyConn);
    $query_rsOnline = "SELECT online_id, `online` FROM `online` ORDER BY online_id DESC";
    $rsOnline = mysql_query($query_rsOnline, $ezzyConn) or die(mysql_error());
    $row_rsOnline = mysql_fetch_assoc($rsOnline);
    $totalRows_rsOnline = mysql_num_rows($rsOnline);
    $colname_rsCommentby = "-1";
    if (isset($_SESSION['MM_Username'])) {
      $colname_rsCommentby = $_SESSION['MM_Username'];
    mysql_select_db($database_ezzyConn, $ezzyConn);
    $query_rsCommentby  = sprintf("SELECT user_id, username FROM users WHERE username = %s",  GetSQLValueString($colname_rsCommentby, "text"));
    $rsCommentby = mysql_query($query_rsCommentby, $ezzyConn) or die(mysql_error());
    $row_rsCommentby = mysql_fetch_assoc($rsCommentby);
    $totalRows_rsCommentby = mysql_num_rows($rsCommentby);
    ?>
    <?php include("../includes/access.php"); ?>
    <!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=utf-8" />
    <title>ezzybay - easy click, ezzy shopping</title>
    <link href="../css/global.css" rel="stylesheet" type="text/css" />
    <link href="../css/navigation.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="wrapper">
      <?php include("../includes/top.php"); ?>
      <div id="content">
      <div id="pageTitle">
        <h2>CMS Section:</h2>
        <p>Comment Topics Page</p>
      </div>
      <?php include("../includes/leftnav.php"); ?>
        <div id="mainContent">
          <form action="<?php echo $editFormAction; ?>" method="post" name="frmpostComment" id="frmpostComment">
            <table align="center">
            <caption>Post Comment</caption>
              <tr valign="baseline">
                <td nowrap="nowrap" align="right">Topic:</td>
                <td><select name="com_topic" class="listbox" id="com_topic">
                  <?php
    do { 
    ?>
                   <option value="<?php echo  $row_rsTopics['topic_id']?>"><?php echo  $row_rsTopics['topic']?></option>
                  <?php
    } while ($row_rsTopics = mysql_fetch_assoc($rsTopics));
      $rows = mysql_num_rows($rsTopics);
      if($rows > 0) {
          mysql_data_seek($rsTopics, 0);
          $row_rsTopics = mysql_fetch_assoc($rsTopics);
    ?>
                </select></td>
              </tr>
              <tr valign="baseline">
                <td nowrap="nowrap" align="right">Title:</td>
                <td><input name="title" type="text" class="textfield" value="" size="32" /></td>
              </tr>
              <tr valign="baseline">
                <td nowrap="nowrap" align="right" valign="top">Comment:</td>
                <td><textarea name="com_content" cols="50" rows="5" class="textarea"></textarea></td>
              </tr>
              <tr valign="baseline">
                <td nowrap="nowrap" align="right">Status:</td>
                <td><select name="online_id" class="smalllistbox">
                  <?php
    do { 
    ?>
                   <option value="<?php echo $row_rsOnline['online_id']?>"  <?php if (!(strcmp($row_rsOnline['online_id'], 2))) {echo  "SELECTED";} ?>><?php echo  $row_rsOnline['online']?></option>
                  <?php
    } while ($row_rsOnline = mysql_fetch_assoc($rsOnline));
    ?>
                </select></td>
              </tr>
              <tr> </tr>
              <tr valign="baseline">
                <td nowrap="nowrap" align="right"> </td>
                <td><input type="submit" class="button" value="Insert record" /></td>
              </tr>
            </table>
            <input name="commentby" type="hidden" id="commentby" value="<?php echo $row_rsCommentby['user_id']; ?>" />
            <input type="hidden" name="com_date" value="<?php echo date("d/m/y : H:i:s", time()) ?>" />
            <input type="hidden" name="MM_insert" value="frmpostComment" />
          </form>
        </div>
      </div>
    <?php include("../includes/footer.php"); ?>
    </div>
    </body>
    </html>
    <?php
    mysql_free_result($rsTopics);
    mysql_free_result($rsOnline);
    mysql_free_result($rsCommentby);
    ?>

    I'll keep it simple and only use the date as an example. Hopefully you get the concept from the example. Basically you create a recordset and insert the recordset value instead of the POST value into your insert query. In the example below I declared a variable for $the_date and entered the variable into the INSERT query instead of the hidden POST field.
    <?php require_once('../../Connections/ezzyConn.php'); ?>
    <?php
    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;
    $the_date = date("d/m/y : H:i:s", time());
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "frmpostComment")) {
       $insertSQL = sprintf("INSERT INTO comments (com_topic, com_user, title,  com_content, com_date, online_id) VALUES (%s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['com_topic'], "int"),
                           GetSQLValueString($_POST['commentby'], "int"),
                           GetSQLValueString($_POST['title'], "text"),
                           GetSQLValueString($_POST['com_content'], "text"),
                           GetSQLValueString($the_date, "text"),
                           GetSQLValueString($_POST['online_id'], "int"));
      mysql_select_db($database_ezzyConn, $ezzyConn);
      $Result1 = mysql_query($insertSQL, $ezzyConn) or die(mysql_error());
      $insertGoTo = "index.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    ?>

  • Can I use LabVIEW to load data directly into system memory? The serial card I'm using isn't supported by NI nor does VISA recognize it. I'm using a Win32 function to read the data from the card and now I want it to go directly to system memory.

    Can I use LabVIEW to load data directly into system memory from a VI? The serial card I'm using isn't supported by NI nor does VISA recognize it. I'm using a Call Library function to read the data from the card and now I want it to go directly to system memory.
    The data is being received at 1Mbps.
    Thanks

    Two questions:
    One, if it's a serial card, then presumably it gives you more serial ports, like COM3, COM4, etc. If so, VISA would see the COM ports, and not the card directly. The drivers for the card should make it so that you see the extra serial ports from the OS. If you don't see the extra COM ports from VISA, then it sounds like the drivers for the card are not installed properly. Do the extra COM ports show up in Device Manager?
    Two, you said that you're using a Call Library function to get the data and you want to put it into system memory. Errr.... you just read the data and you have it in memory by definition. Are you saying you need a way to parse the data so it shows up on a graph or something?

  • Ok, so I want to buy the new iPod touch 5g this week and I have an iPhone 4. I want to transfer all the data from the phone to the iPod and have the files the exact same. I don't want to redo data, say erase game data (campaigns, achievements)...

    Ok, so I want to buy the new iPod touch 5g this week and I have an iPhone 4. I want to transfer all the data from the iPhone to the iPod and have the files the exact same. I don't want to redo data, say erase game data (campaigns, achievements)... I have apps that have very important data on them and if I sync it to iTunes and then transfer all that data to the iPod Touch 5g, will that erase app data?

    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device

  • Delete Repeated Data from an Array

    Hi guys,
    I need your support in to solve some issue with my program, I have a while loop that detects peak values from a given array of data, when I push the stop botton it records the raw file with the write to spreadsheet VI. The thing here is that when i'm collecting the peaks from the data the while loop is running and while I'm moving the position of the cursors to find out another peak that period of time generates a bunch of repeated data from the previous peak and so on until I finish collecting the peaks. What i would like to do is to collect let's say 8 peaks, and only these 8 values has to be wirtten on the text file, eliminating all the repeated vales from a single peak. Does anybody here has an idea on how to solve this problem? I really need your support!
    I'm attaching the part of the code that is doing the task, and also a sample raw file with the repeated values on it
    Thanks!
    Serge Armz
    Attachments:
    test.txt ‏1 KB
    .jpg.png ‏13 KB

    Well, I haven't bothered with an event structure, but here's a quick modification that only adds a max it it hasn't been added before.
    You still run into problems as the cursors are moved, because you might get a temporary max that is actually only the edge of a peak. I would probably add a button to manually add each valid point after the cursors have been moved to the new place.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Peak analyzer_MOD.vi ‏40 KB

  • Without loops how can i read data from associative Array??

    Hi all,
    I am facing scenario like...
    i need to read data from associative array  without using loops is it possible,
    CREATE OR REPLACE PACKAGE BODY test_pkg IS
        TYPE t1 IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
       -- in array we can expect more than one row or sometimes no data also.
      FUNCTION test1(vt1 T1 DEFAULT CAST(NULL AS t1)) RETURN NUMBER IS
      BEGIN
        -- basically in array we'll get data of column2
        -- this loop should satisfies table1.colum2 = nvl(NULL, table2.colum2 )if array is null.
        -- if array is not null then only compare with array values
        FOR i IN (SELECT t1.colum1,t1.column2
                         FROM table1 t1, table1 t2
                              WHERE t1.colum1 = t2.column1
                                AND t1.colum2 = nvl(vt1, t2.colum2)
          LOOP
            generateTEXT(i.colum1, i.colum2);
         END LOOP;
      END test1;
    END test_pkg;
    in table1 we have date like...
    colum1          column2
    Jan                  1
    Feb                  2
    Mar                  3
    if i call select test_pkg.test1(1) from dual then output should
    be Jan..
    and
    select test_pkg.test1(null) from dual then it should display all elements from table1.
    Jan                  1
    Feb                  2
    Mar                  3,
    Thanks for your quick replay..

    i need to read data from associative array  without using loops is it possible,
    No - you would need to create a SQL type and then use the TABLE operator to unnest the collection.
    create or replace TYPE my_nums IS TABLE OF INTEGER;
    DECLARE
    --  TYPE my_nums IS TABLE OF PLS_INTEGER INDEX BY PLS_INTEGER;
      v_nums my_nums := my_nums(1, 2, 3);
      v_total number;
    BEGIN
      select sum(column_value) into v_total from table(v_nums);
      DBMS_OUTPUT.PUT_LINE
        ('Sum of the numbers is ' || TO_CHAR(v_total));
    END;
    Sum of the numbers is 6

  • My Macbook won't start, and I must reinstall the disk. I haven't used time machine to back up, and I want to use an external drive to back up now. How can i do this from the utilities page?

    I am currently in Zambia on missions work and my computer is constantly exposed to heat. I have just been trying to avoid using it during the hottest part of the day. Today though, I started it up and it was stuck on the grey page with the rotating circle for over an hour, then once the circle left, it remained frozen on the gray page. I used command + r at startup to go to the utilities page to analyze the disk. It found that there were problems with the disk, but then it could not fix those problems and told me to backup as much information as I could and reinstall or redo it all. I haven't ever used time machine to back up any of my information, but i have an external drive that I can use right now to backup my files. I can't get into my computer though to backup the files. How can I use this external drive to backup my files while the computer is currently messed up? Please help.

    Emergency Backups (Data Recovery)
    A)          Format an external disk:
              (This will erase all data on the external disk.)
              Boot in recovery mode (power then Command-R).
                        Alternative: Network recovery boot (power then Command-Option-R keys)
              To format (and erase) the destination recovery disk:
              Plug in the drive you are about to erase.
              Select the volume that is NOT your system disk.
              Click on Partition.
              Pull down under Partition Layout to 1 Partition.
              Click on Options…
              Select GUID Partition Table.
              Name: Emergency Backup (or whatever you prefer)
              Format: Select Mac OS Extended (journaled)
              Click Apply.
              Click Partition.
    B)          Try to boot in Safe Mode (power then Shift key).
              (This will be a slow boot.  Be patient.)
              If it won’t boot in Safe Mode, jump to C.
              If it boots in Safe Mode, try to boot in normal mode.
                        If that fixed your problem then start a Time Machine backup.
                        http://support.apple.com/kb/ht1427
                        https://discussions.apple.com/docs/DOC-4055
              If not, boot in Safe Mode again.
              Go > Computer.
              Double click on the system disk.
              Drag the Users folder to the recovery disk.
    C)          To clone the disk:
              Boot in recovery mode.
              Select Disk Utility.
              Try to repair the system disk twice.
              Whether or not the repair succeeds:
              Drag and drop the system disk to Source:
              Drag an drop Emergency Backup to Destination:
              (Take care not to reverse this order.)
              Click Restore (the lower Restore button).
    Once your system is healthy, maintain two reasonably current backups.  (Time machine restores can fail.)
    Create either two Time Machine backups (good) or one or more Time Machine backup(s) and one or more bootable-clone backup(s) (better).
              Use Carbon Copy Cloner or SuperDuper! to create bootable-clone recovery disks.
              See https://discussions.apple.com/docs/DOC-3045
              and https://discussions.apple.com/docs/DOC-6031

  • The CFINPUT TYPE=DATEFIELD does not want to accept the date from the database

    I got a weird problem which I guess can be just a way to
    explain to the server how to interpret the value. I am using
    ColdFusion 8 with SQL 2005 Express. In my table, the field is a
    DATETIME field and shows the date with time (eg. 2007-07-23
    00:00:00).
    In my form, when I am adding using the DATEFIELD as the type
    for CFINPUT, it records the date correctly. But when I use the
    EDIT.cfm form and try to put the value from the database into the
    DATEFIELD CFINPUT, the server generate an error. Here is the error:
    2007-07-23 00:00:00/0 is an invalid date or time string.
    Of course, I tried many things but mostly I tried to force
    the format of the date with DATEFORMAT(qGetNewsInfos.dtIssued,
    'mm/dd/yyyy') and many more format but without success.
    Is anybody know the trick how to use a date into a
    <CFINPUT TYPE=DATEFIELD>?

    I tried the method like this and still got the same problem:
    <cfinput type="datefield" value="#DateFormat(now(),
    'mm/dd/yyyy')#">
    The system return this error:
    08/13/2007 is an invalid date or time string.
    I can use this method to record the date of parution of the
    News but cannot use it to put a vlue in the CFINPUT? This is not
    making any senses!

  • Error while retrieving data from an ARRAY resultset

    We hava an Oracle stroed procedure which has a table type as its OUT parameter and where the data is being entered into. This data requries to be returned to the Java client through a JDBC connection. We have used the OracleTypes' ARRAY object for this. We are facing errors when retieving data from the ARRAY resultset
    The Oracle Package
    ----I created a table type called "PlSqlTable":
    CREATE OR REPLACE TYPE PlSqlTable IS TABLE OF VARCHAR2(20);
    ----I defined this as the out parameter for my procedure :
    PROCEDURE testSQL
    arrayOutID OUT PlSqlTable
    Then populated the object :
    arrayOutID := PlSqlTable();
    arrayOutID.extend(4);
    arrayOutID(1):= 'Hello';
    arrayOutID(2) := 'Test';
    arrayOutID(3) := 'Ora';
    ----The procedure executes fine - all debug statements are printed ----right till the end of execution.
    The Java class
    ----Here is how I have defined the parameters :
    OracleCallableStatement stmnt = (OracleCallableStatement)connection.prepareCall("begin testSQL(?);end;");
    stmnt.registerOutParameter(2,OracleTypes.ARRAY,"PLSQLTABLE");
    System.out.println("Executing..");
    stmnt.execute();
    System.out.println("Executed..");
    ARRAY outArray = stmnt.getARRAY(1);
    System.out.println("Got array");
    ResultSet rset = outArray.getResultSet();
    System.out.println("Got Resultset..");
    int i = 1;
    while(rset.next()){
    System.out.println("VALUE : " + rset.getString(i));
    i = i+1;
    ----On execution, the debug messages display :
    Executing..
    Executed..
    Got array
    Got Resultset..
    VALUE : 1
    VALUE : Test
    ERROR : java.sql.SQLException: Invalid column index
    ----But I have populated upto 3 values in th e procedure. Then why this error ?
    PLLLEEEASE help me out on this.
    Thanks, Sathya

    haven't worked with db arrays but I think your problem is here:int i = 1;
    while(rset.next()){
         System.out.println("VALUE : " + rset.getString(i));
         i = i+1;
    }In the first loop you are retrieving the value from column 1(rs.getString(1)), which is OK, but in the second loop, you are trying to retrieve a value from the second column(rs.getString(2)) which doesn't exist. Try this code which only reads from column1:
    while(rset.next()){
         System.out.println("VALUE : " + rset.getString(1));
    }Jamie

  • Error in fetching the data from textfield and inserting to the database..

    I'm using Java Swing as front end and MySQL as backend using the netbeans ide..I am trying to fetch the data from the textfiled in the form and insert to the database table.i've skipped the generated code..In the following code i get the erro cannot find symbol "stmt" in the actionPerformed method..
    mport java.awt.event.*;
    import java.sql.*;
    public class BarcodeReader extends JFrame implements ActionListener {
    public BarcodeReader() {
    initComponents();
    nb.addActionListener(this);
    public void jdbcConnect(){
    Connection con=null;
    String url = "jdbc:mysql://localhost:3306/";
    String db = "mynewdatabase";
    String driver = "com.mysql.jdbc.Driver";
    String user = "usrname";
    String pass = "pwd";
    try{
    String s=newtxt.getText();
    con=DriverManager.getConnection(url + db, user, pass);
    Statement stmt=con.createStatement();
    Class.forName(driver);
    public void actionPerformed(ActionEvent e){
    try{
    jdbcConnect();
    stmt.executeUpdate("INSERT into machine(mname) values '"+jTextField1.getText()+"'");
    }}catch (Exception ex) {
    System.out.println(ex);
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new BarcodeReader().setVisible(true);
    }

    There are far too many errors to try and clear.
    For one, the exception references the actionPerformed method (according to your text), so why is that not shown here?
    For another you are performing, possible time-consuming, actions, and even worse IO actions, on the event thread, which is a huge no-no.
    You are not closeing your resources properly, if at all, which is another huge no-no.
    You are completely mixing your "view" (the gui), and your "model" (the data related classes), which is another huge no-no.
    etc, etc, etc.

  • HT1766 Recently i had to get a new computer due to my other one crashing.  My question is, i was able to get itunes on the new computer, but it doesnt want to transfer my music library?  How do i transfer the music from the phone to the computer?

    Recently i had to get a new computer.  I was able to get itunes on the new computer and itunes did reconize my phone.  BUT, it doesnt want to transfer the music from my phone to the computer?  Can someone help, Please??
    Thanks

    File>Transfer Purchases in iTunes will transfer items purchased from the iTunes store.
    If you have items from other sources (ripped CD's, etc.) on the phone, you can't transfer those without purchasing 3rd party software.
    Restore the backup of your old computer or just copy the data from the old computer to the new one.

  • Time Capsule died but I want the data off the drive

    Hi All,
    I too had my Time Capsule power supply die this past week. xx811xxxxxxxx.
    I pulled the case apart to remove the eSATA drive.
    I put it in an external case. I did this only after Apple said, no repairs, sorry.
    I Bought the new 2TB unit and want to get my data off of the old unit drive that now resides in the external case. The old drive (500gb unit) mounts fine on the desktop with three icons, 1- Time Capsule, 1- APswap, 1- APconfig. I not only have computer disk backups but also a fair amount of regular data stored there. I could care less about the old computer backups. I want the other data but none of it shows up in the Time Capsule partition. I click on that partition and it only says alias is broken.
    How do I get my data off of it?

    The same happened to me regarding the TC, and I did exactly the same as you putting the disk in a new enclosure. However, I can see my data in the Time Capsule partition. In fact, I'm still using it as the Time Machine back-up. I simply pointed TM to it. Have you tried that?
    Anyone know what the other two partitions are for, and can they be dismounted from the desktop without affecting the TM backup?

  • HT5622 When my daughter got her first iphone we set it up with my email address, she now has her own email & new iphone.  I want to use my email address for my icloud, can I delete the content  from the icloud account and continue to use my email?

    When my daughter got her first iphone we set it up with my email address, she now has her own email & new iphone.  I want to use my email address for my icloud, can I delete the content from the icloud account and continue to use my email?

    Yes, but be sure she is on a separate iCloud account with a separate ID before deleting anything.  Be sure there is nothing that you want to keep on your device too.  When you delete the data from iCloud it will be deleted from all devices signed into the account.  Then you can delete the data from the existing account by doing the following:
    To delete the contacts, go to iCloud.com from your computer, log into your iCloud account and open Contacts, click on All Contacts on the left, to the right click on any single contact to select it, click on the Actions (gear shaped) icon at the bottom left and choose Select All, then press the Delete key on your keyboard.
    For Calendars, open the calendar on icloud.com, click Edit on the bottom left, then tap the minus sign to the right of each calendar to delete it.
    For Notes, open notes on icloud.com, click on each note on the left, then click Delete at the top to delete it.
    For Reminders, open reminders on icloud.com, click on each reminder and press your Delete key to delete it.
    For Mail, open your mail on icloud.com, click each folder on the left (such as your inbox), click on a single message to the right, press Control-A on your keyboard to select them all, then press your Delete key.  Repeat this for each of your mail folders except Trash.  When finished, click on the actions (gear-shaped) icon on the bottom left and select Empty Trash.
    If you also want to delete your iCloud backups you can go to Settings>iCloud>Storage & Backup>Manage Storage on your device, tap the name of your device under Backups, then tap Delete Backup.

  • Adding data from an array to a table

    How can i add information from an array to a table via JDBC? I have tried:
    stmt.executeUpdate("INSERT INTO TEMP " + "VALUES (" + carData[0] + ", " + carData[1]);
    but i get the error:
    SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
    Also, can i only add data to some columns of a row and not all?

    If your TEMP table has only two columns and both of
    them are of number
    types, and your array contains only numeric types
    (int[], long[] etc., it should not be a problem.
    If your table contains more than two columns (and the
    remaining columns are nullable) you need to list the
    column names in the insert statement. Check your table
    definition in the database and see SQL syntax for
    insert.
    If your columns are of string type, you need to
    enclose the values in quotes (alternatively, use
    PreparedStatement).I agree with this.
    Here is the syntax that he was talking about
    //if the values are numeric
    stmt.executeUpdate("INSERT INTO TEMP(<COLUMN NAME>,<COLUMN NAME>) "
    + "VALUES(" + carData[0] + "," + carData[1] + ")";
    //if the values are text
    stmt.executeUpdate("INSERT INTO TEMP(<COLUMN NAME>,<COLUMN NAME>) "
    + "VALUES('" + carData[0] + "','" + carData[1] + "')";
    Notice that the last part of your original query was incorrect. You forgot to put the bracket in quotes again.

Maybe you are looking for

  • Front Row TV Show menu gets confused and jumps back

    I recently upgraded my Intel Mac mini to Mac OS X 10.5.5 (Leopard). Front row seems to get confused as I browse through my TV Shows menu. For instance, if I scroll down to "Heroes" (season 2) the select bar seems to jump to "Grey's Anatomy" on it's o

  • Tried to install Lion on my snow leopard and got an error. Lion was not installed.

    Should I try to install it again? Message was edited by: janicefromiselin

  • Archive id Updation problem

    Hi  Every one, I have writeen one report for Updating the Archive id , in the selection i given  sap object , archive old id, Document id and Archive newid my problem is when im updaing a new id to table TOAHR instead of changing ARCHIV ID TO the new

  • Trying to Install Cricket Software

    I'm trying to install palm cricket software and it is giving me error. When I do quick install it give me the following error message "No desktop users exist. Create a new user through Palm Desktop and then start Quick Install again." I have done the

  • How do I ignore end jumps on tracks?

    I put end jumps on my tracks to get viewers back to one of the submenus that they chose the track from, but I want a play all function as well. How do I get all the tracks to play all the way through without them jumping back to a menu?