Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Bug Reports
Home Register FAQ Members List 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, 11:48 AM
Knows the basics
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 71
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
Reply With Quote
  #2 (permalink)  
Old 07-07-2007, 11:50 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,185
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, 12:23 PM
Knows the basics
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 71
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
Reply With Quote
  #4 (permalink)  
Old 07-07-2007, 12:37 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,752
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
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 12:41 PM. Reason: Stupity
Reply With Quote
  #5 (permalink)  
Old 07-07-2007, 12:41 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
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 On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 03:28 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0