Recordset or equivalent Implementation for database manipulation

Discussion in 'Basic4ppc Wishlist' started by markbarrett_1, Aug 30, 2007.

  1. markbarrett_1

    markbarrett_1 Member Licensed User

    Hi,

    I've been looking at Basic4PPC in the last week and looks fairly good for creating applications with a quick turn around time.

    The one piece that I haven't been able to find is a recordset or equivalent to simplify database record manipulation. (move first, move next, move previous, and move last). Sure I can go off and write something which simulates it, but before I go off an do that unit of work wanted to see if it was on anybody's radar.

    Thoughts?

    Cheers.

    M
     
  2. BPak

    BPak Active Member Licensed User

    Code:
    ' move to the previous bet in the table   
       BetRow = (BetRow+tblBet.RowCount-1Mod tblBet.RowCount

       
    ' move to the next Bet in the Table
       BetRow = (BetRow+1Mod tblBet.RowCount
    I used this in my FlatBet Program which can be seen here

    http://www.basic4ppc.com/forum/showthread.php?t=389
     
  3. markbarrett_1

    markbarrett_1 Member Licensed User

    Hi,

    I was more thinking having a sqllite backend with 100s or maybe 1000s of records, where you don't really want to burn a whole array table keeping tabs on things.

    Cheers.

    M
     
  4. BPak

    BPak Active Member Licensed User

    I have looked through the sqlite docs and have not found those functions avail.

    I guess the way to do it is to Create Index and use the Index to move through the records.
     
  5. markbarrett_1

    markbarrett_1 Member Licensed User

    Hi,

    Its fairly straight forward to do with sql statements (assuming you have designed your sql tables properly and have created the right indexes with your primary key and whatever sort order you are wanting to go through the database - you need an ability to uniquely identify each row, that is the big gotcha). I've seen it done on other database engines - as everything I've read about sqllite's sql implementation there is no reason to suggest that it won't work in that engine either - like I said a bit of code to make it happen.

    Cheers.

    M
     
Loading...