Question About Using Andre Garzia's DBLib

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Knightlite
Posts: 51
Joined: Mon Jan 23, 2012 10:14 pm

Question About Using Andre Garzia's DBLib

Post by Knightlite » Thu Oct 25, 2012 7:33 pm

Hi,

Hope this is not off topic for this forum, but it is related to databases.

I am trying to use Andre's DBLib and I am running into a few problems. In his example he links a SQLite table to a DataGrid using two lines of code.

Code: Select all

put dbGet("contacts") into tDataA
   set the dgdata of control "contacts" to tDataA

This code then fills in the datagrid fields First Name, Last Name, Email, Age, and Country. It works great.

But what if you are not using the datagrid, but instead individual text fields, with the same names. What is the code for getting the data out of the table and loading it as a recordset into the individual text fields.

If anyone has used Andre's DBLib and knows how to do this, I would certainly appreciate knowing what the code is. I have tried posting this on Andre's forum, but its been over 24 hours and have not heard anything back. I'm sure he is a busy guy, but I like to keep going with my project.

Jim

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Question About Using Andre Garzia's DBLib

Post by mwieder » Thu Oct 25, 2012 8:13 pm

Jim-

tDataA is an array with all your data in it.
You can examine the keys of the array with

Code: Select all

put the keys of tDataA
or do all the usual array things with the data array.
Or look up the split and combine keywords in the dictionary.
Have fun.

Post Reply