Error Message on Mobile PC

drmaize

New Member
Licensed User
I wrote a program to ask for a filename and open a file for viewing in a Table. The program works OK on my PC, but on the PC device it gives an error message. Here is the line of code referenced by the message:

Table1.LoadCSV(mfile,",",True,True)

Here is the error message: IndexOutOfRangeException

The lines of code that opens the file originally are:

If opendialog1.Show<>cCancel Then
mfile = opendialog1.File
Else
AppClose
End If

Does anyone have any ideas?
My Mobile PC has Windows Mobile 5.0 OS 5.1.478
 

mjcoon

Well-Known Member
Licensed User
Well, for starters I'd try cutting down the CSV file (initially to just the first line) to see whether there's some content it does not like.

An alternative is putting in an error handler to see if you can extract any more detail, such as whether any of the file has been successfully loaded.

(I think Erel has admitted that the CSV handling has some vulnerabilities - or was that loadXML...)

Did the CSV file originate in a Basic4PPC table, or elsewhere?

Mike.
 

drmaize

New Member
Licensed User


Thanks, Mike. The problem appears to be file size. I left in four rows (from the Excel-generated .csv) and the program worked as expected. I guess that means I need more RAM?
 

mjcoon

Well-Known Member
Licensed User
Thanks, Mike. The problem appears to be file size. I left in four rows (from the Excel-generated .csv) and the program worked as expected. I guess that means I need more RAM?

Or, less advantageously (!), there may be an absolute limit to the size that a table can have. Try a search on the forum or a specific question (for Erel or AGraham) about that.

An alternative (though not trivial) is to use SQLite instead. I have done such a conversion myself, with code to scroll down a large SQL d/b, showing just a screen-full at a time via a small table.

Mike.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…