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

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

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Error when loading table how to avoid

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-04-2007, 06:03 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default Error when loading table how to avoid

I'm busy for serveral hours to find the solution for the below issue which
i'm can't solved yet.

When a table is loaded with data like files (filesearch), the table is loaded
with the file names of the current directory, that's works fine.
When i do an reload the table will start at the top and the error starts
with that it's not possible to use dublicate names in the table.
(of course starting with clear table is one solution), what i want is
that the filesnames in the table will stay and not changed anymore,
this make it possible to reload the directory and only the files which added
will be added to the table.
I have tried to errorlabel and create serveral sub's with variable all of them
will not work now. the errorlabel will brake out of the loop and comes never back.

Is there one solution to compare the data from the filesearch with the table and
only the difference or new filenames will be added to the table
Reply With Quote
  #2 (permalink)  
Old 08-04-2007, 06:24 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You could add duplicate items to a table (unless you have set the column unique property).
I guess that you don't want to show duplicate values.
You can store the file names in an ArrayList and then check if a name exists using: if ArrayList.IndexOf(newFile) > -1 then ...
Reply With Quote
  #3 (permalink)  
Old 08-04-2007, 08:32 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

Greate Erel ,

i have used your advise Arraylist see below code

' load the arraylist to compair.
Arraylist2.Clear
for counter = 0 to table1.RowCount - 1
Arraylist2.Add (Table1.Cell("Files",counter))
next

al1.clear
filesearch(al1,path)
for I =0 to al1.count - 1
s=al1.item(i)

'Compair with exist data in table which is loaded in arraylist2 at the start
If ArrayList2.IndexOf(Substring (s,c,strlength(s)-c)) > -1 then
'..
Else
Table1.AddRow (Substring(s,c,strlength(s)-c),s)
End if

next





Thanks

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 loading source code Roadrunner Bug Reports 12 06-02-2008 07:46 AM
Error When Loading Tutorial corwinckler Questions (Windows Mobile) 2 12-12-2007 01:24 PM
Error loading SQL Component conniemalan Questions (Windows Mobile) 1 07-27-2007 08:29 AM
Error loading empty csf file Scubaticus Bug Reports 4 07-07-2007 11:41 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 10:57 AM.


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