[Gambas-user] How do I navigate a MySql Table

Charlie Reinl na2492 at ...9...
Sat Aug 13 20:14:00 CEST 2005


>Hi, I am writing a little application that connects to a mysql table and 
>browse the records using last, first, prev and next buttons ( using the 
>methods of the result object). But when I reach the last record using 
>movenext method (or when I reach the first record, using movefirst 
>method), I am not able to navigate anymore the table. Could anyone send 
>me a simple example? 
> 
>Thanks 
> 
>Francesco 
> 
>--  
>Teaching OnLine  
>Corsi online di programmazione 
>Php, Asp, C, C++, Visual Basic, Delphi 
>Linux Shell Programming 
>------------------------------------ 
>http://www.teachingonline.it 
 
Salut, 
 
this are out of my TableView Class, I think it will be easy to use it in 
a forms button-Click. 
 
PUBLIC SUB MoveNext() 
    IF ME.Row < ME.Rows.Count - 1 THEN 
        ME.MoveTo(ME.Row + 1, ME.Column) 
    ENDIF 
END 
PUBLIC SUB MovePrevious() 
    IF ME.Row > 0 THEN 
        ME.MoveTo(ME.Row - 1, ME.Column) 
    ENDIF 
END 
PUBLIC SUB MoveFirst() 
    IF ME.Rows.Count - 1 > 0 THEN 
        ME.MoveTo(0, ME.Column) 
    ENDIF 
CATCH 
    message.Info("DBTableView.MoveFirst" & gb.NewLine & Error.Text) 
END 
PUBLIC SUB MoveLast() 
    IF ME.Rows.Count - 1 > 0 THEN 
        ME.MoveTo(ME.Rows.Count - 1, ME.Column) 
    ENDIF 
CATCH 
    message.Info("DBTableView.MoveLast" & gb.NewLine & Error.Text) 
END 
 
Amicalment 
Charlie 
* Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *




More information about the User mailing list