different paths for tables

Discussion in 'Questions (Windows Mobile)' started by albgreco, Sep 10, 2008.

  1. albgreco

    albgreco Member Licensed User

    I would need to load csv tables that are in different paths.
    If I do

    filename="../../WM_Administrat2 My Documents/oggetti.csv"

    and then

    table1.Clear
    table1.loadcsv(filename, ";", true, true)
    numcol=table1.colcount

    it seems to load the table but I get an incorrect table load (it seems to start from the third line of the file and I get a wrong columns number)

    Note that it is not an issue concerning the csv file format because if I put the very same file in the same path where the application starts, all is right.

    How to use different folders for storing/retrieving csv tables?

    Thanks
     
  2. Mr_Gee

    Mr_Gee Active Member Licensed User

    I think it is because you are recreating the columns
    try if this works :
    Code:
    'first file 
    filename="File1.csv"
    'create columns
    table1.loadcsv(filename, ";"truetrue)
    'do not create them
    filename="File2.csv"
    table1.loadcsv(filename, 
    ";"truefalse)
     
  3. albgreco

    albgreco Member Licensed User

    ...it does'nt work, it gives the error message

    "Column number and type do not match data file" :confused:
     
  4. Mr_Gee

    Mr_Gee Active Member Licensed User

    what happens if you create a new table and compare the two...
    something isn't correct ...
     
  5. albgreco

    albgreco Member Licensed User

    I don't understand what was wrong... I rewrote all the code and now it works!
    At least now I am sure that including "/../.." etc. in the filename it's the right way to make refernce to files in different paths.

    Thank you very much :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice