SQLite with table datagrid for beginners ?

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bonbon
Posts: 62
Joined: Thu Jul 17, 2008 11:48 pm

SQLite with table datagrid for beginners ?

Post by bonbon » Fri Jul 30, 2010 10:16 pm

I've gone through the datagrid online tutorials, and downloaded the "Datagrid and Databases" example. I'm now trying (from scratch) to populate a grid from an SQLite database. The datagrid is "table" style (rather than "form", which is what the downloaded example uses).

I can't get the grid to display data. It gets as far as setting the dgNumberOfRecords of group "dgDataGrid" to sRecordCount (from the database). I've checked this with a button, which correctly "answers" the dgNumberOfRecords for the grid. This is supposed to fire the GetDataForLine message, but nothing seems to be happening. I have put an "answer" in the first line of command GetDataForLine pLine, @pOutData, and it doesn't display.

Please does anyone have a simple, table-based example that I could play with ?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Re: SQLite with table datagrid for beginners ?

Post by Janschenkel » Sat Jul 31, 2010 6:50 am

At the RunRevLive'09 conference I did a presentaton 'Desktop databases with SQLite' - the slides and example application can be downloaded from the downloads section of the quartam.com website. Here's a direct link: http://www.quartam.com/downloads/tea.zip. The example application uses table datagrids to display records from an SQLite database.

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

bonbon
Posts: 62
Joined: Thu Jul 17, 2008 11:48 pm

Re: SQLite with table datagrid for beginners ?

Post by bonbon » Sat Jul 31, 2010 8:20 am

Tremendous - thanks Jan.

jcollett
Posts: 17
Joined: Sun Aug 01, 2010 8:28 pm

Re: SQLite with table datagrid for beginners ?

Post by jcollett » Mon Aug 23, 2010 9:36 pm

I am attempting the move from Supercard to Revolution for one reason only. I am learning Chinese, and Revolution allows me to use Chinese characters. I have managed to get my head around some of the special coding needed to do that for working in fields. I am now wondering if it will be possible to build a databank containing a long list of items such as
十 shí ten
口 kǒu mouth
I have problems.
1) I have forgotten the little I ever knew about how to create and use databanks (that was in Supercard).
2) I have spent a day exploring the tutorials I have located (for example, "Revolution_Data_Grid", "Connecting_to_a_MySQL_database", "SQLite Sampler"), but none of them give me the full step-by-step instructions I need. The users guide tries to cover everything, and utterly confuses me.
3) I have read that Chinese and pinyin characters such as I will have in my list will not survive in a database format.
My questions :
Is there a "Rev databases for Dummies" article anywhere?
Since I will have just a plain list, a long lookup table, is is a good idea to go down the databank road anyway?
Would just a datagrid be enough for "lookup-and-learn"? (though I'm not all that sure, yet, what a datagrid is or what it can do.)
Will my Chinese characters and the special unicode handling they require work in a databank or a datagrid?

(On related matters in the forum archives, the "tea.zip" mentioned by Janschenkel does not unpack on to my current Mac.)
Thanks. JC

seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Re: SQLite with table datagrid for beginners ?

Post by seaniepie » Thu Nov 03, 2011 5:35 pm

What a surprise, no replies to this either! Where is the support community?

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: SQLite with table datagrid for beginners ?

Post by townsend » Thu Nov 03, 2011 5:48 pm

This CRUD SQLite example may help. There's a lot of good code in there.

Image

Post Reply