New topic: SQLLite Data to Listbox and Editing of COL (Time) bugs
<http://forums.realsoftware.com/viewtopic.php?t=38388> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message scariba Post subject: SQLLite Data to Listbox and Editing of COL (Time) bugsPosted: Tue Mar 29, 2011 3:44 pm Joined: Fri Oct 06, 2006 4:45 am Posts: 39 For Info Guys and Girls: I have submitted the following bug report RB Feedback Report 16521 Randomly incorrect reading of shortime from sqllite database to listbox and editing a time value to NULL causes Real Studio to crash when repopulating listbox again with same data First Bug 1. Create Database/table/column=TIME is populated with a .shorttime value 2. Create a number of records, say 5000 3. Populate a listbox with the .stringvalue value from database 4. Apparantly randomly a longtime value is populated in a few listbox cells (varies between 4 and 200 records). For example shortime in database record is 17:00 and when populated in listbox could be displayed as 17:00:43 5. Repeat step 3 and you'll have a different set of results Second Bug 1. If you edit one of the records and change the TIME column to a NULL/"" value 2. Repopulate the listbox with the database records and Real Studio crashes when it reaches the NULL value Sample project attached to bug report demostrating both bugs. http://hotfile.com/dl/112451727/5fc0b78 ... g.zip.html Workarounds: When populating your listbox use Left(rs.field("WHATEVER").stringvalue,5) to trim data going into listbox No apparant work around for editing bug. Top Jym Post subject: Re: SQLLite Data to Listbox and Editing of COL (Time) bugsPosted: Tue Mar 29, 2011 4:10 pm Joined: Sat Oct 01, 2005 5:19 pm Posts: 2335 You have some things that would make better sense if you explained them better. What are you doing to populate the Listbox with the times? It doesn't sound like a bug it sounds more like you are doing something incorrect. If the database holds the contents 17:00 it's impossible that the listbox would put up anything but that if you are just getting a sting value, so I you must be using a date variable some where. listbox.AddRow rs.Idxfield(1).getString Your saying somehow the listbox knows this is a time and adds :43 to the end of it? Impossible. 2nd bug, are you asking Real basic to set a Date to Null ? Yeah that will cause a crash, but that's not a bug in any language. Top scariba Post subject: Re: SQLLite Data to Listbox and Editing of COL (Time) bugsPosted: Tue Mar 29, 2011 4:54 pm Joined: Fri Oct 06, 2006 4:45 am Posts: 39 Hi Jym, Yes the database record is say 17:00 and is being retrived from the database using .stringvalue straight into addrow rs.field("blahblah").stringvalue. im not saying the the lisbox knows that it is a time value, however if you look at my example project you will hopefully see what I mean, whether impossible or not. The second item does set the value to Null correctly and can be viewed directly using a database viewer and all appears well, again however when reading the values back in it crashes RB completely at this amended record, a few versions back in RB this did not happen. Have a look at my example. Top Jym Post subject: Re: SQLLite Data to Listbox and Editing of COL (Time) bugsPosted: Tue Mar 29, 2011 5:43 pm Joined: Sat Oct 01, 2005 5:19 pm Posts: 2335 ok well I had to change your error catch because the len of 6:30 pm is > 5 grrrr, but I don't get a single error when I put it to 8 I have just run it 5 times and have 20,000 records and no errors Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
