PDA

View Full Version : Simple SQL Database Library before end of year.


kornalius
10-11-2006, 01:22 AM
Before the end of the year (meaning version 1.1 or 1.2) PPL will have a very simple SQLite database libray that will allow you to write fast and easy-to-code database programs.</p>

The SQDB library will have simplified functions to help simplify writing database programs. We will try to follow Delphi's BDE function style, like:</p><pre>db$ = DB_Open (filename$);
DB_Append(db$);
DB_Set(db$, &quot;FieldName1&quot;, &quot;Value1&quot;);
DB_Set(db$, &quot;FieldName2&quot;, &quot;Value2&quot;);
DB_Post(db$);
if (DB_Locate(db$, &quot;FieldName1&quot;, &quot;Value&quot;))
* DB_Delete(db$);
end;
DB_First(db$);
while (not DB_Eof(db$))
* ShowMessage(DB_Get(db$, &quot;FieldName1&quot;) + &quot;,&quot; + DB_Get(db$, &quot;FieldName2&quot;));
* DB_Next(db$);
end;
DB_Close (db$);
</pre>

This is what we are looking into doing right now. Expect this new library to be ready soon.</p>

We hope you will like to get simple Database in PPL. If you guys have any suggestions or comments, it is time now before we start active development.</p>

matteo.m
10-11-2006, 11:25 PM
i would like some powerful command like DB_query(query SQL,datagrid) that return a recordset populating the datagrid...so that is easy to display, and manage....

kornalius
10-12-2006, 03:24 AM
This is a good idea, we will have to look into it, we will use the ListView for grid however.

PointOfLight
10-12-2006, 04:28 PM
Actually, I would be more inclined to think it should work something like this:

lst$ = DB_Query(sql$);
DB_PopulateGrid(lst$);
or
DB_PopulateListView(lst$);
or
DB_PopulateCombo(lst$, field$);

Possibly others could be added as the need / desire arises.

kornalius
10-12-2006, 05:33 PM
I was thinking DB_GetRecords(Handle$, List$) then you can populate the ListView using ListView_LoadFromList from the Swapi.ppl.