Sorry I misunderstood you, yes thats right I'm using the e32db, I'm using the script shell to run the programme on a n70, when I try my search code the phone jumps back to the main menu, ie exits the script shell and the programme so I get no error message?
This is the bit of code I'm using to search.
dbv.prepare(db,u"select * from weigh where weight >='%s' and weight<='%s'" %(miny,maxy))
for i in range(1,dbv.count_line()+1):
appuifw.popup_menu(taglist,u"No of animals:"+str(lentag))
I wonder if it could be a bug in the n70? I also have a x6 so might try on that. Your quite right I removed the '.' and it made no difference.
So I should be able to sort a list of strings into numerical order. No I havnt limeted the length of the vachar.
Thanks to you both for looking