New topic: my code SQL database works on mac but not on window ???
<http://forums.realsoftware.com/viewtopic.php?t=31463> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message THIERRY Post subject: my code SQL database works on mac but not on window ???Posted: Mon Dec 07, 2009 8:16 pm Joined: Wed Mar 14, 2007 4:44 am Posts: 26 Hi im beginner in RB and i have writing an simple code to add database in a listbox it works great in Mac (when i test the code) but he doesnt work on window xp (i have copy exalty the same code on window computer,but when i test it ,i have a nil object exception about the recordset i dont understand why ???) i use RBPRO 2008 3.1 ON MAC (os leopard) and RBPRO 2008 4.1 ON WINDOWS(xp) thks for your help regards thierry , this is my code as follow : Dim rec as DatabaseRecord dim rs as RecordSet dim madate as new date dim mybool as boolean dim i as integer rec= new DatabaseRecord mybool=ParseDate(EditField2.text,madate) rec.Column("mat")=EditField1.Text rec.DateColumn("madate")=madate app.ORDREBD.InsertRecord("TB_gen",rec) //commit app.ORDREBD.Commit //maj liste boxe via appel Listbox1.DeleteAllRows rs=APP.ORDREBD.SQLSelect("SELECT * FROM TB_gen")//ORDEBD App CLASS REALSQLDatabase While not rs.EOF Listbox1.AddRow"" FOR I = 1 TO 2 Listbox1.CELL(Listbox1.LastIndex,I-1)=RS.IdxField(I).StringValue NEXT RS.MoveNext WEND RS.Close Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- 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]
