Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist > Bug Reports
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.

Error loading empty csf file

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-07-2007, 10:48 AM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default Error loading empty csf file

When I try to load an empty but existing csv with loadCSV, it rises the error "Index was outside the bounds of the array" (loadCVS("csv", ",", FALSE, FALSE)

When i do the same with an headered csv file I don't get errors.

How to find out if an csv file without headers is empty? I could use errorlabel I guess, but I want to know if there are records or not and not if the file exists or not.

Scub
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)
Reply With Quote
  #2 (permalink)  
Old 07-07-2007, 10:50 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,714
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You could check the file size using FileSize.
An empty CSV file with no headers should be an empty file.
Reply With Quote
  #3 (permalink)  
Old 07-07-2007, 11:23 AM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Well, not complete emtpy. It returns 3 bytes.
But writing en empty table with saveCSV is no problem an causes no error.

Perhaps it's an idea to return the actual records readed or written to csv?

RecsIn = loadCSV(..)

But for now the filesize will do. Thanks for your quick reply.

Scub
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)
Reply With Quote
  #4 (permalink)  
Old 07-07-2007, 11:37 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Excuse my ignorance and jumping in to your thread, but loadCSV looks useful but where is it located? I'm probably being stupid but it's not a native sub and I can't seem to find any component with it in?

EDIT : I was being stupid, I've found it now. I didn't expect it to be a control method.

Last edited by agraham : 07-07-2007 at 11:41 AM. Reason: Stupity
Reply With Quote
  #5 (permalink)  
Old 07-07-2007, 11:41 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Look at table control
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error When Loading Tutorial corwinckler Questions (Windows Mobile) 2 12-12-2007 01:24 PM
multilingual support & error loading moharj Bug Reports 4 11-10-2007 12:29 PM
Error when loading table how to avoid tvrman Questions (Windows Mobile) 2 08-04-2007 08:32 PM
Error loading SQL Component conniemalan Questions (Windows Mobile) 1 07-27-2007 08:29 AM
Out of Memory error while loading bitmap HARRY Questions (Windows Mobile) 3 05-15-2007 12:12 PM


All times are GMT. The time now is 03:47 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0