On 06/06/12 10:10, Paul McNett wrote:
> On 6/5/12 4:49 PM, Simon Cropper wrote:
>> Well I'm here. I am willing to be shown...
>>
>> So, I will throw up an apparently simple challenge. John, show me how I
>> can open a simple sqlite table and present the data in a window/frame in
>> an editable grid. Don't worry about the fluff, just the basic bones. The
>> code should be able to be pointed at any sqlite table. In other words
>> the grid is created and populated on the fly. In VFP parlance an
>> editable "browse" window that supposedly could be pointed at any
>> database table.
>
> Here's a single script that creates the database, a bare-bones bizobj, and a
> bare-bones UI. I hope this gets you started!
>
> http://paulmcnett.com/test_grid_editable_sqlite.py
>
> Paul
> _______________________________________________
> Post Messages to: [email protected]
> Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
> Searchable Archives: http://leafe.com/archives/search/dabo-users
> This message: http://leafe.com/archives/byMID/[email protected]

Hi Paul,

Considering the bulk of this script is involved with creating a table 
with data that is quite a small amount of code.

The code does however implies a knowledge of the underlying table 
structure. Is it possible to extract the structural elements of a table, 
like the field names, field type, etc so a grid could be created on the fly?

The pseudo code would be something like...

1. connect to table
3. work out number of fields (F#)
4. create a grid with same number of columns
5. populate said grid

-- 
Cheers Simon

    Simon Cropper - Open Content Creator / Website Administrator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction               http://www.fossworkflowguides.com
    GIS Packages           http://www.fossworkflowguides.com/gis
    bash / Python    http://www.fossworkflowguides.com/scripting
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to