hello!
I'm testing an application on two samsung devices:
galaxy s smartphone
galaxy tab p1000 (7") tablet
i have an sd card inserted in all the devices.
the problem is this:
with this sub i connect (via LAN) to a FTP and download some csv files.
the files are correctly downloaded to the sdroot path - in main module is
Dim sdRoot As String
sdRoot = File.DirRootExternal & "/" 'percorso dove arriverà il file zip
but the instruction:
Table = su.LoadCSV(sdRoot & "mcordini", "clienti.csv", ";")
on the galaxy s works
on the galaxy tab says "no such file or directory /mnt/sdcard/mcordini/clienti.csv"
I cannot understand why?!?!?!
I'm testing an application on two samsung devices:
galaxy s smartphone
galaxy tab p1000 (7") tablet
i have an sd card inserted in all the devices.
the problem is this:
with this sub i connect (via LAN) to a FTP and download some csv files.
the files are correctly downloaded to the sdroot path - in main module is
Dim sdRoot As String
sdRoot = File.DirRootExternal & "/" 'percorso dove arriverà il file zip
but the instruction:
Table = su.LoadCSV(sdRoot & "mcordini", "clienti.csv", ";")
on the galaxy s works
on the galaxy tab says "no such file or directory /mnt/sdcard/mcordini/clienti.csv"
I cannot understand why?!?!?!
B4X:
Sub BtRicevi_Click
Dim myZip As ABZipUnzip
FTP.List("/")
File.MakeDir(sdRoot, "mcordini")
File.Delete(sdRoot & "mcordini","clienti.csv")
File.Delete(sdRoot & "mcordini","articoli.csv")
File.Delete(sdRoot & "mcordini","tabelle.csv")
' scarico il file dall'FTP
NFile = "clienti.csv"
FTP.DownloadFile(NFile, False, sdRoot & "mcordini", NFile)
Progressbar1.Progress = 10
NFile = "articoli.csv"
FTP.DownloadFile(NFile, False, sdRoot & "mcordini", NFile)
Progressbar1.Progress = 20
NFile = "tabelle.csv"
FTP.DownloadFile(NFile, False, sdRoot & "mcordini", NFile)
Progressbar1.Progress = 30
FTP.Close
' lettura file clienti
' Delete old tables and create new ones.
DBUtils.DropTable(SQL, "Clienti")
DBUtils.DropTable(SQL, "Articoli")
DBUtils.DropTable(SQL, "Famiglie")
DBUtils.DropTable(SQL, "GruppiMer")
'********************************************************* ' Creo la tabella Clienti
Dim m As Map
m.Initialize
m.Put("IdCli", DBUtils.DB_TEXT)
m.Put("Ragsoc", DBUtils.DB_TEXT)
m.Put("Indirizzo", DBUtils.DB_TEXT)
m.Put("Cap", DBUtils.DB_TEXT)
m.Put("Localita", DBUtils.DB_TEXT)
m.Put("Prov", DBUtils.DB_TEXT)
m.Put("Telefono", DBUtils.DB_TEXT)
m.Put("Fax", DBUtils.DB_TEXT)
m.Put("Mobile", DBUtils.DB_TEXT)
m.Put("Iniziale", DBUtils.DB_TEXT)
DBUtils.CreateTable(SQL, "Clienti", m, "IdCli")
' popolo la tabella clienti
Dim su As StringUtils
Dim Table As List
Table = su.LoadCSV(sdRoot & "mcordini", "clienti.csv", ";")
Dim Table2 As List
Dim Items() As String
Table2.Initialize
For i = 0 To Table.Size - 1
Items = Table.Get(i)
Dim m As Map
m.Initialize
m.Put("IdCli", Items(0))
m.Put("Ragsoc", Items(1))
m.Put("Indirizzo", Items(2))
m.Put("Cap", Items(3))
m.Put("Localita", Items(4))
m.Put("Prov", Items(5))
m.Put("Telefono", Items(6))
m.Put("Fax", Items(7))
m.Put("Mobile", "0") 'Items(8))
m.Put("Iniziale", Items(1).SubString2(0,1))
Table2.Add(m)
Next
DBUtils.InsertMaps(SQL, "Clienti", Table2)
Progressbar1.Progress = 40
Last edited by a moderator: