DAQ problem reading data

I just instaled the PCI board together with the CA-1000
Connector Accessory Encloser. The test panel works, so I know that the device is installed. But when I connect a signal to the port on the CA-1000, I don't see
the signal appearing on the test panel display. I just
see a signal that is constant,
with a little variation.
By the way, I also have the PCI-GPIB card installed.
Thanks! Matt

Chuck;
The problem there is most likely due to a bad connection somewhere.
My suggestion to you is to cross check the connection you made with the Users Manual of the CA-1000 and DAQ board to confirm you done everything accordinly.
If that is not the case, the CA-1000 is probably damaged.
Regards
Filipe A.
Applications Engineer
National Instruments

Similar Messages

  • Problem reading data from oracle database 11g using OleDbDataReader

    Hi everyone I work with Visual Studio 2010 and C# programming language. I have a problem reading data from the oracle database. I created a WPF application with my main Window Xaml and class files and 1 more class called DataFiles. The thing I want is to read some data from the database on my grid in my WPF window. Problem is even though it connects to the database the grid is always empty. It isn't the connection string as I tested it and it connects to the database the problem seems to be in showing the LASTNAME (PREZIME in my native tongue) on the grid which is what it's supposed to do.
    Here is the code:
    Data Files Code
    using System;
    using System.Collections.ObjectModel;
    using System.Data.SqlClient;
    using System.Data.OleDb;
    namespace SQLKonekcija
        public class clsEmployee
            public string Prezime { get; set; }
        public class DataAccess
            OleDbConnection oleCon;
            OleDbCommand oleComd;
            public DataAccess()
                string connectionString = "provider=ORAOLEDB.ORACLE; data source=ORCL; password=****; user id=****;";
                oleCon = new OleDbConnection(connectionString);
            public ObservableCollection<clsEmployee> GetAllEmployee()
                ObservableCollection<clsEmployee> EmpCol = new ObservableCollection<clsEmployee>();
                oleComd = new OleDbCommand();
                oleComd.Connection = oleCon;
                oleComd.CommandText = "Select PREZIME from UPOSLENICI";
                oleCon.Open();
                OleDbDataReader Reader = oleComd.ExecuteReader();
                Reader.Read();
                while (Reader.Read())
                    EmpCol.Add(new clsEmployee()
                        Prezime = Reader["PREZIME"].ToString()
                oleCon.Close();
                return EmpCol;
            }And here is my main window.cs code
    public partial class MainWindow : Window
            clsEmployee objEmpToAdd;
            DataAccess objDs;
            public MainWindow()
                InitializeComponent();
            private void Window_Loaded(object sender, RoutedEventArgs e)
                objDs = new DataAccess();
                dgEmp.ItemsSource = objDs.GetAllEmployee();And the XAML
    <Window x:Class="SQLKonekcija.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
        <Grid>
            <DataGrid AutoGenerateColumns="False" Height="237"
                      HorizontalAlignment="Left" Margin="18,66,0,0" Name="dgEmp"
                      VerticalAlignment="Top" Width="466" ColumnWidth="*"
                       >
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding PREZIME}" Header="Prezime"></DataGridTextColumn>
                </DataGrid.Columns>
            </DataGrid>
            <TextBlock Height="42" HorizontalAlignment="Left" Margin="18,15,0,0" Name="textBlock1" Text="TEST CONNECTION" VerticalAlignment="Top" Width="462" TextAlignment="Center" FontSize="28" FontWeight="ExtraBold" />
        </Grid>
    </Window>
    The guys on the MSDN forums told me I should ask the question here so sorry if it's not your field.
    Hope u guys can help, thanks.

    I tried it, commented out the reader.read and have the following connection string
    string connectionString = "provider=ORAOLEDB.ORACLE; data source=ORCL; password=****; user id=****; OLEDB.NET=True"
    Unfortunately the result is the same.
    Edited by: Dino2dy on Nov 24, 2011 12:53 AM

  • JavaConsole Error: Problem reading data from server

    HI All
    We are getting this error on java console on a page:
      Error: Problem reading data from Server - Java.Security.AccessControlException:access denied (java.util.PropertyPermission http.strictpostredirect Read)
    In this page we are not firing  a SQL Query of huge data.
    Any suggestions on this why it is happening?
    Thanks
    Manisha

    Manisha,
    I think JVM(Java Virtual Machine) is trying to access something at network level and it cant able to find it.Or any new patches of java is installed.
    Or may be due to IIS or Applet,Don't know exactly.
    You can find some answers in below links:
    http://java.sun.com/j2se/1.4.2/docs/api/java/security/AccessControlException.html
    http://www.webdeveloper.com/forum/archive/index.php/t-46358.html
    -Suresh

  • Problem reading data from two tables

    Hi experts,
    I'm developing a JDBC - IDOC scenario that needs to read data from two oracle tables. I have created a BPM that has a initial fork for the two channels and it works fine.
    The problem is that I need to read data from the first, two or both tables depending if there is data to read. If there is data in the two tables it works, but if only there is data in one of the two tables, I have read problems. I have tryed to set the 'neccesary branches' to 1 but this is a problem when I have data in both tables.
    Any idea?
    Best Regards,
    Alfredo Lagunar.

    Hi,
    have your fork step inside a block and then right-click your block to insert a deadline branch to your BPM process and specify the time after which your BPM process should be cancelled.....so if in that time, you get data from both tables, your BPM will work okay otherwise if that time is over, then your BPM process will be cancelled.
    Regards,
    Rajeev Gupta

  • Problem reading data from nested internal table.

    Hi,
    Below is my code;
    *********SAP Code********
    TYPES: BEGIN OF v54a0_scdd,
             fknum  LIKE vfkk-fknum,
             change LIKE vfkkd-updkz,
             x      TYPE v54a0_scd,
             y      TYPE v54a0_scd,
             tvtf   LIKE tvtf,
           END OF v54a0_scdd.
    SCD table for dialog
    TYPES: v54a0_scdd_tab TYPE v54a0_scdd OCCURS 1.
    *********SAP Code********
    *Custom declaration*****
    data: wa_freight_costs type v54a0_scdd_tab.
    data: it_freight_costs type v54a0_scdd_tab occurs 0.
    *****Here data is getting appended to it_freight_costs. P_frieght_costs is coming from standard program.
         move p_freight_costs TO wa_FREIGHT_COSTS.
         append wa_freight_costs to it_freight_costs.
         clear wa_freight_costs.
    ***Now the problem is here. I am not able to read the data from the nested internal table x-item.
    if i use <fs_f_costs> to move data from it_freight_costs in the outer loop, i get a syntax error; <i> "the line type of the table it_freight_costs is not compatible with field symbol type <fs_f_costs>" </i>
         FIELD-SYMBOLS: <fs_f_costs> type line of v54a0_scdd_tab.
          LOOP AT it_freight_costs assigning <fs_f_costs>.
              LOOP AT <fs_f_costs>-x-item ASSIGNING <fs_freight_item>.        
                  <b> I want to read <fs_freight_item>-vfkp-netwr.</b> 
             ENDLOOP.
    Can anyone guide me?

    A quick look at how I would do this. Note I haven't checked if this compiles just done a quick brain-dump.
      DATA: lr_f_costs TYPE REF TO v54a0_scdd_tab,
            lr_f_cost TYPE REF TO v54a0_scdd.
      LOOP AT it_freight_costs REFERENCE INTO lr_f_costs.
        LOOP AT lr_f_costs->* REFERENCE INTO lr_f_cost.
        ENDLOOP.
      ENDLOOP.
    As you can see I personally prefer pointers to field symbols - I don't believe there is any performance differences and because of my background in other languages pointers make more sense to me.
    Cheers
    Graham Robbo

  • Problem reading data file (JDK1.3x)

    Here's what I'm trying to do:
    I want to read in data from a text file, parse it into records and fields and insert it into an oracle database.
    Info about the data file:
    I have an excel file that contains rows of data. Some cells can contain data (text) that has multiple lines and line breaks. This text data can contain commas, single quotes and double quotes.
    Using excel, I save this excel file as either a tab delimited or csv file.
    The problem:
    I use the following java code to open the file, and reads it's contents:
    String fileData = "";
    BufferedReader br = new BufferedReader(new FileReader( "filePathAndName" ) );
    StringBuffer contents = new StringBuffer();
    String line = "";
    while( ( line = br.readLine() ) != null )
    {   contents.append( line ); }
    br.close();
    fileData = contents.toString();
    //code to parse data goes here
    Remember, the file is delimited by tabs or commas. A record (an excel row) is delimited by a carriage return. A single value/field can contain multi-line text.
    The problem I'm experiencing is that using the code specified above to read in the data from the file, I lose all tabs, new lines and carriage returns, so my stringTokenizer/regular expression code to parse the data doesn't work correctly. In the case of tab-delimited files, the fields cannot be distinguished. In both file types, the last field of the previous record and the first field of the next record run together.
    It doesn't seem logical that java won't read in tabs/newlines/carriage-returns. Can someone tell me what's wrong? <I confirmed that the tabs/newlines/carriage returns exist in the text file, so it's definately something going wrong during the file reading process>
    Thanks

    Using the FileInputStream, is there anyway to read in multiple characters at a time, like a readline() function? I've looked at various buffered input streams and none of them seemed to have this function.

  • Problem Reading Data from .dat File

    I am trying to read in data from lines 384-475. The data looks something like this
    198 95 70 71 93-99-99-99-99-99-99-99-99-99-99  5 17 17 17 17-99-99-99-99-99-99-99-99-99-99 1
    78 95 70 69-99-99-99-99-99-99-99-99-99-99-99  6  2  1  1-99-99-99-99-99-99-99-99-99-99-99 2
    70 73-99-99-99-99-99-99-99-99-99-99-99-99-99  0  1-99-99-99-99-99-99-99-99-99-99-99-99-99 1This is only the data from lines 384-475. I keep getting an error though, and I can't figure it out.
    import java.util.*;
    import java.io.*;
    public class ProgrammingExercise1
         public static double findAccuracy(String systemCommand) throws IOException
             Process proc = Runtime.getRuntime().exec(systemCommand);
             Scanner scan = new Scanner(proc.getInputStream());
             PrintStream logOut = new PrintStream(new FileOutputStream("log.dat"));
             while(scan.hasNextLine())
                  logOut.println(scan.nextLine());
             logOut.close();
             scan.close();
             proc.destroy();
             Scanner input = new Scanner(new File("log.dat"));
             String line = "";
             for(int c=1; c<=4; c++)
                  line = input.nextLine();
             double finalAccuracy = Double.parseDouble(line.substring(22,27));
             input.close();
             return finalAccuracy;
         public static void main (String[] args) throws IOException
              try {
                        String s;
                        int count=0;
                        String temp;
                        int aInt;
                        int med;
                        int[] daM = new int[251];
                        String[] pos = new String[251];
                        int[][] da = new int[251][507];
                        int[] daSort = new int[da.length];
                        for (int i=0; i<251; i++)
                             daM[i] = 0;
                             for (int j=0; j<507; j++)
                                  da[i][j] = 0;
              //creating an input stream
                 FileInputStream fstream = new FileInputStream("dataset.dat");
                 DataInputStream in = new DataInputStream(fstream);
                 BufferedReader br = new BufferedReader(new InputStreamReader(in));
                 while((s = br.readLine()) != null)
                    //safety check as the last line in not null, but empty
                    //break the procedure info from the string/line
                      String sub = s.substring(384, 475);
                      for (int k=0; k<15; k++)
                           temp = sub.substring(k*3, (k*3)+3);
                             //removes spaces from the string to alleviate integer conversion errors
                           temp = temp.replace(" ", "");
                           aInt = Integer.parseInt(temp);
                           if (aInt > -1)
                                da[count][aInt] = 1;
                      sub = s.substring(260, 264);
                      temp = sub.replace(" ", "");
                      aInt = Integer.parseInt(temp);
                      if (aInt > -1)
                           daSort[count] = aInt;
                           daM[count] = aInt;
                      count++;
                 in.close();
                 bubbleSort(daSort);
                 med = daSort[daSort.length/2];
                 for (int t=0; t<daM.length; t++)
                      if (daM[t]<med)
                           pos[t] = "+1";
                      else
                           pos[t] = "-1";
                      for (int r=0; r<da[t].length; r++)
                           if (da[t][r]==1)
                                pos[t] +=" " + r + ":1.0";
                 Collections.shuffle(Arrays.asList(pos));
                 File file = new File("testSet.dat");
                 PrintWriter output = new PrintWriter(new FileWriter(file));
                 String tempOut = "";
                 for (int ii=0; ii<pos.length/4; ii++)
                      tempOut += pos[ii];
                      output.write(tempOut);
                      tempOut = "";
                      output.write("\n");
                 output.close();
                 file = new File("crossValidationSet.dat");
                 output = new PrintWriter(new FileWriter(file));
                 for (int jj=(pos.length/4); jj<pos.length/2; jj++)
                      tempOut += pos[jj];
                      output.write(tempOut);
                      tempOut = "";
                      output.write("\n");
                 output.close();
                 file = new File("trainingSet.dat");
                 output = new PrintWriter(new FileWriter(file));
                 for (int kk=(pos.length/2); kk<pos.length; kk++)
                      tempOut += pos[kk];
                      output.write(tempOut);
                      tempOut = "";
                      output.write("\n");
                 output.close();
                 System.out.println("Your file has been written");
              catch (Exception e)
                   System.err.println("Error: " + e.getMessage());
    } // end ProgrammingExercise1The main error I can't figure out is as follows... "Error: For input string: "93-"
    *Note: I had to remove some of the code due to exceeding the maximum characters allowed. I THINK the error is found at the //creating an input stream section.

    The input data that I included is the exact data I am trying to read...just three lines instead of the 251. There is plenty of other data surrounding the included data, but I am not concerned with it.
    Here is the first 3 lines of data...
    4200410577816 76-99 9 177        1 1 0  5.573125262 5 429429422MED0262      25080403915990 427322851 5789 250402859 2111                                 50  99 159 106  60 153  50  59  47-999-999-999-999-999-999                    -999-999-999-999 0 1 4025AZ   14    141010 5868 2817 9  0 04223 3 105        -9           2451644434443                                                 70 93 93-99-99-99-99-99-99-99-99-99-99-99-99  3-99-99-99-99-99-99-99-99-99-99-99-99-99-99 3     40667       40667.002004 1
    4200410581753 79-9911 177        1 1 0  5.5731252 3 5 429429422MED0262      250822851 4271 486  5789 785595990 41400V4581                                50  60 106 122 153 249 159 101 101-999-999-999-999-999-999                    -999-999-999-999 0 1 4025AZ    8     81010 2043  883 9  0 04223 2 105        -9           245134824                                                     70 77-99-99-99-99-99-99-99-99-99-99-99-99-99  4-99-99-99-99-99-99-99-99-99-99-99-99-99-99 3     25444       25444.002004 1
    4200410277559 67-99 3 177        1 0 0  5.5731252 3 5 229229221MED0236      25080707146827 4280 7318 73027041042506045981                                50 199 197 108 212 201   3  50 121-999-999-999-999-999-999                    -999-999-999-999 0 0 4047AZ   29    291010 2414 5409 9  0 04223 6 111        -9           1392745164542884288483950                                     57 70 95189190 61-99-99-99-99-99-99-99-99-99 18-99-99-99-99-99-99-99-99-99-99-99-99-99-99 1    141927      141927.002004 4
    import java.util.*;
    import java.io.*;
    public class ProgrammingExercise1 {
    public static void bubbleSort(int[] x)
              int n = x.length;
              for (int pass=1; pass < n; pass++)
                   for (int i=0; i < n-pass; i++)
                        if (x[i] > x[i+1])
                             int temp = x;
    x[i] = x[i+1];
    x[i+1] = temp;
    }// end bubbleSort
    public static void main (String[] args) throws IOException
    try {
              String s;
              int count=0;
              String temp;
              int aInt;
              int med;
              int[] daM = new int[251];
              String[] pos = new String[251];
              int[][] da = new int[251][507];
              int[] daSort = new int[da.length];
              for (int i=0; i<251; i++)
                   daM[i] = 0;
                   for (int j=0; j<507; j++)
                        da[i][j] = 0;
    FileInputStream fstream = new FileInputStream("dataset.dat");
    DataInputStream in = new DataInputStream(fstream);
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    while((s = br.readLine()) != null)
         String sub = s.substring(384, 475); //!!! Is this supposed to be (384, 475) or (384, 428)???
         for (int k=0; k<15; k++)
              temp = sub.substring(k*3, (k*3)+3);
              temp = temp.replace(" ", "");
              aInt = Integer.parseInt(temp);
              if (aInt > -1)
                   da[count][aInt] = 1;
         sub = s.substring(260, 264);
         temp = sub.replace(" ", "");
         aInt = Integer.parseInt(temp);
         if (aInt > -1)
              daSort[count] = aInt;
              daM[count] = aInt;
         count++;
    in.close();
    bubbleSort(daSort);
    med = daSort[daSort.length/2];
    for (int t=0; t<daM.length; t++)
         if (daM[t]<med)
              pos[t] = "+1";
         else
              pos[t] = "-1";
         for (int r=0; r<da[t].length; r++)
              if (da[t][r]==1)
                   pos[t] +=" " + r + ":1.0";
    Collections.shuffle(Arrays.asList(pos));
    File file = new File("testSet.dat");
    PrintWriter output = new PrintWriter(new FileWriter(file));
    String tempOut = "";
    for (int ii=0; ii<pos.length/4; ii++)
         tempOut += pos[ii];
         output.write(tempOut);
         tempOut = "";
         output.write("\n");
    output.close();
    file = new File("crossValidationSet.dat");
    output = new PrintWriter(new FileWriter(file));
    for (int jj=(pos.length/4); jj<pos.length/2; jj++)
         tempOut += pos[jj];
         output.write(tempOut);
         tempOut = "";
         output.write("\n");
    output.close();
    file = new File("trainingSet.dat");
    output = new PrintWriter(new FileWriter(file));
    for (int kk=(pos.length/2); kk<pos.length; kk++)
         tempOut += pos[kk];
         output.write(tempOut);
         tempOut = "";
         output.write("\n");
    output.close();
    System.out.println("Your file has been written");
    catch (Exception e)
         e.printStackTrace();
    Edited by: djcochran on Jan 27, 2010 5:22 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem reading data from textField?

    I have a problem in my program I'm currently doing.
    I have a textArea and a textField in a container.
    Inside the textArea will be displayed some questions which require user to give answers to in the textField.
    When user types something in the textField and presses enter, an actionListener will trigger and take in String.
    My problem is how do you wait for the user to type something in the textField?
    thanks

    Hi
    I am trying to read a value from a textField object in the following code, but its returning an empty string. any kind of help would be appreciated. thanks.
    bhavesh
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.io.*;
    import java.lang.*;
    public class Applet1 extends Applet implements ActionListener, TextListener{
         String text = "";
         Image logo;
         static TextField usr;
         static TextField pswd;
         static Button logOn;
         public boolean authenticate(Graphics g){
              g.setColor(Color.RED);
              g.setFont(new Font("Monospaced", Font.PLAIN, 20));
              text = "Username:";
              g.drawString(text, 300, 300);
              text = "Password:";
              g.drawString(text, 300, 325);
              g.setFont(new Font("Serif", Font.PLAIN, 20));
              usr = new TextField(40);
              usr.setBounds(420,280, 200,20);
              usr.setEditable(true);
              //usr.addActionListener(this);
              add(usr);
              //add (new Label("Enter number:"));
              pswd = new TextField(40);
              pswd.setEditable(true);
              pswd.setBounds(420,310, 200,20);
              //pswd.addActionListener(this);
              add(pswd);
              //add (new Label("Enter number:"));
         logOn = new Button("Log on ...");
         logOn.setBounds(380,340,80,20);
              logOn.addActionListener(this);
              add(logOn);
              return true;
         public void actionPerformed(ActionEvent ae){
              System.out.print(usr.getText()+"rr\n"+ae);
              System.out.print(pswd.getText()+"bb\n");
              if ( usr.getText().compareTo("gusr")==0 && pswd.getText().compareTo("gpswd")==0 ){
                   System.out.print("COOOOOOL");
              else{
                   System.out.print("BAD");
         public void textValueChanged(TextEvent te){
              String foo = usr.getText();
              System.out.print("\n\nevent please\n\n"+foo+" +"+usr.getSelectedText());
         public void paint(Graphics g) {
              logo = getImage(getCodeBase(),"logo2.gif");
              g.setColor(Color.WHITE);
              g.fillRect(0,0,1000,625);
              g.drawImage(logo, 0, 0, this);
              g.setFont(new Font("SansSerif", Font.ITALIC, 20));
              g.setColor(Color.BLUE);
              text = "Welcome to AMPD Timecard!";
              g.drawString(text, 300, 255);
              authenticate(g);

  • Problem reading data from database

    Hi All,
    I'm doing some test with Oracle Coherence, particulary testing partitioned cache of a database. I'm using a client/server archictecture and I developed my own CacheStore. So, the problem is, after start the server and the client, when i do a get() in the client for a object that is on database and not in the cache, the cache answer is it doesn't exist. Isn't it supposed the cache "call" the cache store and read/verify if it is on database?
    My Configuration file:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>Recharge</cache-name>
    <scheme-name>partitioned-cache</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>partitioned-cache</scheme-name>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <write-delay>0</write-delay>
    <read-only>false</read-only>
    <internal-cache-scheme>
    <local-scheme>
    <scheme-name>InMemoryScheme</scheme-name>
    </local-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <class-name>RechargeCacheStore</class-name>
    </class-scheme>
    </cachestore-scheme>
    </read-write-backing-map-scheme>
    </backing-map-scheme>
    <listener/>
    <autostart>true</autostart>
    </distributed-scheme>
    </caching-schemes>
    </cache-config>
    Tanks,
    Paulo Sousa

    Hi Paolo,
    You should use a fully qualified class name to enable the JVM class loader to find the RechargeCacheStore class.
    Regards,
    Harv

  • Problem reading dates into numbers

    I suspect I am missing something very obvious but I am trying to read a spreadsheet with dates in the first column  into Numbers 3.0.1 in Mavericks. The original file was in xls format and the dates are imported as numbers (e.g. todays date - 31st Dec 2013 appears as 41639). The spreadsheet was created with Libreoffice but the dates are fine if I read the xls file into preview or google docs.  I have tried reformatting the column into date format but nothing happens. Any ideas?

    Check to see if any columns are hidden by opening the contextual menu for any column:

  • Problem reading data from a file

    this is inside a servlet.
    Re: servlet question
    Author: gramberto
    In Reply To: servlet question Oct 1, 2004 10:24 AM
    Reply 6 of 6
    I'm getting the following errors:
    java.util.NoSuchElementException     at java.util.StringTokenizer.nextToken(StringTokenizer.java:259)     at myClass.readFile(myClass.java:387)     at myClass.doPost(myClass.java:421)I am reading a file of the form:
    Blah|blah2||
    '|' is the delimiter. A null would just have another |
    Here is my code:
    public void readFile(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException
              PrintWriter out = response.getWriter();
             String row;
             BufferedReader infile1 = new BufferedReader(new FileReader("c:\\file1.txt"));
             response.setContentType("text/html");
             String FName="",MName="",LName="",Sex="",Street1="",Street2="",City="",State="",Zip="",PhoneLocalCode="",PhoneAreaCode="",PhoneLastCode="",Email="",OtherInfo="";
            try {
                    while ((row = infile1.readLine()) != null)
                      StringTokenizer in_str = new StringTokenizer(row, "|");
                      FName = in_str.nextToken();
                      MName = in_str.nextToken();
                      LName = in_str.nextToken();
                      Sex = in_str.nextToken();
                      Street1 = in_str.nextToken();
                      Street2 = in_str.nextToken();
                      City = in_str.nextToken();
                      State = in_str.nextToken();
                      Zip = in_str.nextToken();
                      PhoneLocalCode = in_str.nextToken();
                      PhoneAreaCode = in_str.nextToken();
                      PhoneLastCode = in_str.nextToken();
                      Email = in_str.nextToken();
                      OtherInfo = in_str.nextToken();
                 } catch (IOException ioException) {
                   out.println("Error: "+ioException);
                 out.println(FName);
                 out.println(MName);

    Well, you are probably passing in a line that is tokinized into less than 14 tokens.
    Add some debug output that prints the line that you are tokenizing.
    Use hasMoreTokens and countTokens to determine if it is ok to call nextToken or if you are already out of tokens.
    E.g. you could do something along these lines:
    fixed token count formatprivate void tokenize(final String line)
      final StringTokenizer st = new StringTokenizer( line, "|" );
      if ( st.countTokens() != 14 )
         throw new RuntimeException("Invalid token count: " + st.countTokens());
      FName = st.nextToken();
    }variable token count formatprivate void tokenize(final String line)
      final StringTokenizer st = new StringTokenizer( line, "|" );
      if (st.hasMoreTokens())
        FName = st.nextToken();
      if (st.hasMoreTokens())
        MName = st.nextToken();
    }

  • Problem Reading Data From An Excel Spreadsheet

     

    HI,
    Have u set classpath correctly, i mean does this pakage appear in the class path of ur sever. If not include it in the classpath of the sever or the web-app that u have created. From their only can it include it.
    Take care
    Kunal

  • A problem with data acquisitioning in LV 7.1 (transition from Traditional NI-DAQ to NI-DAQmx)

    Hi to everyone,
    I have a problem with data acquisitioning in LV 7.1.
    I made a transition from Tradiotional NI-DAQ to NI-DAQmx in my LabVIEW application.
    The problem I have is that when I acquire data in Traditional (without writing somewhere -
    just reading) then there is no scan backlog data. But when I acquire data in application that
    acquisition is based on DAQmx than a scan backlog indicator shows numbers from 20 to 50 for
    about 6 min and then that number quite quickly increases until I get an error (unable to
    acquire data. The data was overwritten).
    Acquisition settings are the same in both cases. When I acquire with DAQmx I use a global
    channels. Is a reason for that phenomenon in global channels data procesing? But it seems
    strange why does it flows quite smoothly for about 6 min and then it stucks?
    Best regards,
    Ero

    If you have an old Daq unit it may not be compatible with DAQMX. Which DAQ unit do you have? I think NI have a list showing which DAQ driver you can use with your card
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Can't open file - error "There was a problem reading the layer data.."

    I'm on a
    Mac Pro, 10.5.7
    PSCS3
    I have been sent a file (148MB) from a client via FTP that I can not open. The file was created on a PC, using PSCS3.
    I'm usually pretty good at troubling shooting but I have not seen this before.
    Any help, suggestions would welcomed.
    I get the following error messages: (see attached)

    It looks like the atttachement did not work
    Here are the error messages:
    First message:
    "There was a problem reading the layer data. Read the composite date instead?"
    Second Message:
    "Could not complete your request because the file is not compatiable with this version of Photoshop."

  • Having problem with adding and reading dates to/from database !!!

    Hi
    I am new in J2ME
    I am trying to code a simple software.
    My problem is with dates.
    I have a datefield on my menu and the user will choose the date from here. By default, datefield shows todays date. But when I try to write that date to database using rms, date value transforms to java.util.Date@acfdb0fe.
    As I read from tutorials this is common problem of date class, so I tried to use calendar class.
    But with Calendar class I cannot let user to choose date from screen like DateField. datefield dowsn't work with calendar.
    later, I will use that date for sorting records
    Summary : I need a sample code that read date from screen (preferably with datefield), write it to recordstore. and then read it from recordstore asnd write to screen.
    I searching internet for a sample code through days.
    Please help me
    Thanks

    Hi,
    The best i would suggest is instead of storing the date as 19 Jan 2004 or something like this better store the date in milliseconds.
    DateField df = new DateField();
    Date d = df.getDate();
    long ms = d.getTime();
    store the value of ms in RMS. This is the commonly used way to store date in RMS for j2me.
    You can get back date using
    Date d = new Date(ms);
    DateField df = new DateField();
    df.setDate(d);
    Prabhu.

Maybe you are looking for

  • How can i change an interface to a class?

    I created an interface with name XXX. But when i have finished and saved it,i learn the XXX was not an interface but a class. Then i delete the interface XXX in SE24,and creat it for a class with the same name XXX. But wrong message occur " There is

  • Extracting WAV files from CD's to hard disk

    Hi, Can iTunes v6.0.4 be used to copy the songs from a CD to the hard drive? I have many store bought CD's that I would like to copy to my hard drive in WAV format. I don't see any way for iTunes to do this. Is it possible? If not, are there any comm

  • BO Multiple screen selection fields

    Hello, I have three Bex reports, These Reports displays Group currency, Document Currency and Local Currency. I added all three in Bo Webi, each report is added in one tab.All these reports having same selection screen fields. when I execute the repo

  • Allows to change quantity in sales order lesser that already billed

    Dear All, I am new to SD and I have encountered an issue. Please help me finding a solution. The details are given below: 1. I have a sales order with 1 line item with quantity 5 2. I bill the sales order for quantity 4 3. Someone goes and change the

  • Mail won't use rules at all

    I just updated to Leopard from Tiger on my office G5. I had many rules that regulated where incoming messages would go. Under Leopard, none of these rules works. Consequently, all new mail is thrown into the Spam folder under "ON MY MAC" This is NOT