if (colorDB.create("farben", "data", app.creator, false))
{
and so on...
handler personalForm.onopen() {
string pages[2] = { "Einfach", "Erweitert" };
// Datenbank f?ºr die Farben aufbauen
Database colorDB;
Database db;
StringList sl;
string txt;
DBRecord rec;
int cnt = db.nrecs, i=0;
if (colorDB.create("farben", "data", app.creator, false))
{
while (i<cnt) {
if (colorDB.getrec(i, rec, true)) {
rec.read(&txt, typeof(txt), 1);
rec.close();
sl.add(txt);
++i;
//}
//list.setitemslist(sl);
}
else
alert("colorDB wurde nicht geladen!.");
colorDB.close();
nmc wrote:* the assigment has to be after the create/open
int cnt, i = 0;
...
if (db.create(...)) {
cnt = db.nrecs;
while (i<cnt) {
...
}
db.close();
}
list.setitemslist(s);
Database colorDB;
StringList sl;
string txt;
DBRecord rec;
int cnt, i = 0;
if (colorDB.create("colors", "data", app.creator, false))
{
while (i<cnt) {
if (colorDB.getrec(i, rec, true)) {
rec.read(&txt, typeof(txt), 1);
rec.close();
sl.add(txt);
++i;
}
else
alert("Could not load database!");
colorDB.close();
void savePersonalData() {
// save the data from the form into the current record
entry.per.name = fldPersonalName.text;
entry.per.age = fldPersonalAge.text;
if (pushMale.checked) {
entry.per.sex = 0;
} else {
entry.per.sex = 1;
}
entry.per.status = listPersonalStatus.selitem;
}
Users browsing this forum: No registered users and 1 guest