|
|
Home » Community » Newbie corner » sqlarray and sqlite (Trying to use sqlite example but...)
Re: sqlarray and sqlite [message #54859 is a reply to message #54819] |
Tue, 22 September 2020 20:41   |
jimlef
Messages: 90 Registered: September 2020 Location: US
|
Member |
|
|
----------------------------------
Thread: 1
----------------------------------
Thread: 2
../sysdeps/unix/sysv/linux/poll.c:29
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
start_thread (arg=<optimized out>) at pthread_create.c:477
clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
----------------------------------
Thread: 3
../sysdeps/unix/sysv/linux/poll.c:29
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
g_main_loop_run () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
start_thread (arg=<optimized out>) at pthread_create.c:477
clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
----------------------------------
Thread: 4
futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xe82d60 <Upp::CoWork::GetPool()::pool+114848>) at ../sysdeps/nptl/futex-internal.h:183
pthread_cond_wait.c:508
pthread_cond_wait.c:638
Upp::ConditionVariable::Wait (this=0xe82d38 <Upp::CoWork::GetPool()::pool+114808>, m=..., timeout_ms=-1) at Mt.cpp:624
Upp::CoWork::Pool::ThreadRun (tno=0) at CoWork.cpp:155
Upp::CoWork::Pool::InitThreads(int)::$_21::operator()() const (this=0x7ffff4de58ec) at CoWork.cpp:31
Upp::Function<void ()>::Wrapper<Upp::CoWork::Pool::InitThreads(int)::$_21>::Execute() (this=0x7ffff4de58e0) at Function.h:17
Upp::Function<void ()>::operator()() const (this=0x7ffff4de5920) at /home/james/upp/uppsrc/Core/Function.h:76
Upp::sThreadRoutine (arg=0x7ffff4de5920) at Mt.cpp:91
start_thread (arg=<optimized out>) at pthread_create.c:477
clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
----------------------------------
Thread: 5
futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xe82d60 <Upp::CoWork::GetPool()::pool+114848>) at ../sysdeps/nptl/futex-internal.h:183
pthread_cond_wait.c:508
pthread_cond_wait.c:638
Upp::ConditionVariable::Wait (this=0xe82d38 <Upp::CoWork::GetPool()::pool+114808>, m=..., timeout_ms=-1) at Mt.cpp:624
Upp::CoWork::Pool::ThreadRun (tno=1) at CoWork.cpp:155
Upp::CoWork::Pool::InitThreads(int)::$_21::operator()() const (this=0x7ffff4de59ac) at CoWork.cpp:31
Upp::Function<void ()>::Wrapper<Upp::CoWork::Pool::InitThreads(int)::$_21>::Execute() (this=0x7ffff4de59a0) at Function.h:17
Upp::Function<void ()>::operator()() const (this=0x7ffff4de59e0) at /home/james/upp/uppsrc/Core/Function.h:76
Upp::sThreadRoutine (arg=0x7ffff4de59e0) at Mt.cpp:91
start_thread (arg=<optimized out>) at pthread_create.c:477
clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
----------------------------------
Thread: 6
futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xe82d60 <Upp::CoWork::GetPool()::pool+114848>) at ../sysdeps/nptl/futex-internal.h:183
pthread_cond_wait.c:508
pthread_cond_wait.c:638
Upp::ConditionVariable::Wait (this=0xe82d38 <Upp::CoWork::GetPool()::pool+114808>, m=..., timeout_ms=-1) at Mt.cpp:624
Upp::CoWork::Pool::ThreadRun (tno=2) at CoWork.cpp:155
Upp::CoWork::Pool::InitThreads(int)::$_21::operator()() const (this=0x7ffff4de5a6c) at CoWork.cpp:31
Upp::Function<void ()>::Wrapper<Upp::CoWork::Pool::InitThreads(int)::$_21>::Execute() (this=0x7ffff4de5a60) at Function.h:17
Upp::Function<void ()>::operator()() const (this=0x7ffff4de5aa0) at /home/james/upp/uppsrc/Core/Function.h:76
Upp::sThreadRoutine (arg=0x7ffff4de5aa0) at Mt.cpp:91
start_thread (arg=<optimized out>) at pthread_create.c:477
clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
----------------------------------
Thread: 7
futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xe82d60 <Upp::CoWork::GetPool()::pool+114848>) at ../sysdeps/nptl/futex-internal.h:183
pthread_cond_wait.c:508
pthread_cond_wait.c:638
Upp::ConditionVariable::Wait (this=0xe82d38 <Upp::CoWork::GetPool()::pool+114808>, m=..., timeout_ms=-1) at Mt.cpp:624
Upp::CoWork::Pool::ThreadRun (tno=3) at CoWork.cpp:155
Upp::CoWork::Pool::InitThreads(int)::$_21::operator()() const (this=0x7ffff4de58ac) at CoWork.cpp:31
Upp::Function<void ()>::Wrapper<Upp::CoWork::Pool::InitThreads(int)::$_21>::Execute() (this=0x7ffff4de58a0) at Function.h:17
Upp::Function<void ()>::operator()() const (this=0x7ffff4de5b20) at /home/james/upp/uppsrc/Core/Function.h:76
Upp::sThreadRoutine (arg=0x7ffff4de5b20) at Mt.cpp:91
start_thread (arg=<optimized out>) at pthread_create.c:477
clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
----------------------------------
Thread: 8
futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xe82d60 <Upp::CoWork::GetPool()::pool+114848>) at ../sysdeps/nptl/futex-internal.h:183
pthread_cond_wait.c:508
pthread_cond_wait.c:638
Upp::ConditionVariable::Wait (this=0xe82d38 <Upp::CoWork::GetPool()::pool+114808>, m=..., timeout_ms=-1) at Mt.cpp:624
Upp::CoWork::Pool::ThreadRun (tno=4) at CoWork.cpp:155
Upp::CoWork::Pool::InitThreads(int)::$_21::operator()() const (this=0x7ffff4de5bac) at CoWork.cpp:31
Upp::Function<void ()>::Wrapper<Upp::CoWork::Pool::InitThreads(int)::$_21>::Execute() (this=0x7ffff4de5ba0) at Function.h:17
Upp::Function<void ()>::operator()() const (this=0x7ffff4de5be0) at /home/james/upp/uppsrc/Core/Function.h:76
Upp::sThreadRoutine (arg=0x7ffff4de5be0) at Mt.cpp:91
start_thread (arg=<optimized out>) at pthread_create.c:477
clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
----------------------------------
Thread: 9
futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xe82d60 <Upp::CoWork::GetPool()::pool+114848>) at ../sysdeps/nptl/futex-internal.h:183
pthread_cond_wait.c:508
pthread_cond_wait.c:638
Upp::ConditionVariable::Wait (this=0xe82d38 <Upp::CoWork::GetPool()::pool+114808>, m=..., timeout_ms=-1) at Mt.cpp:624
Upp::CoWork::Pool::ThreadRun (tno=5) at CoWork.cpp:155
Upp::CoWork::Pool::InitThreads(int)::$_21::operator()() const (this=0x7ffff4de5c6c) at CoWork.cpp:31
Upp::Function<void ()>::Wrapper<Upp::CoWork::Pool::InitThreads(int)::$_21>::Execute() (this=0x7ffff4de5c60) at Function.h:17
Upp::Function<void ()>::operator()() const (this=0x7ffff4de5ca0) at /home/james/upp/uppsrc/Core/Function.h:76
Upp::sThreadRoutine (arg=0x7ffff4de5ca0) at Mt.cpp:91
start_thread (arg=<optimized out>) at pthread_create.c:477
clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
The code:
CustomersWindow::CustomersWindow() {
CtrlLayout(*this, "Customers");
btnAddCustomer << [=] { btnAddCustomerClick(); }; // THISBACK is not needed in c++11 world and could be replaced with lambda.
btnSearchCustomer << [=] { btnSearchCustomerClick(); }; // assisted by forum user Klugier
btnUpdateCustomer << [=] { btnUpdateCustomerClick(); };
btnFake << [=] { FakeStub(); };
if(FileExists(configfile))
{
VectorMap<String, String> cfg = LoadIniFile(configfile);
DBFile = cfg.Get("DBFile", Null);
}
else {
DBFile = SelectDB();
}
SQL;
Sqlite3Session sqlite3;
if(!sqlite3.Open(DBFile)) {
Exclamation("Can't create or open database file\n");
return;
}
SQL = sqlite3;
Sql sql;
CustArray.SetTable(CUSTOMERS, CUST_ID);
// CustArray.Join(BOOK_ID, book); // joins id from other db to this id
CustArray.AddColumn(CUSTNAME, "Name"); // .SetConvert(DateIntConvert());
CustArray.AddColumn(EMAIL, "Email"); // .SetConvert(DateIntConvert());
CustArray.AddColumn(CONTACT, "Phone");
CustArray.AddColumn(ADDRESS, "Address");
CustArray.AddColumn(CITY, "City");
CustArray.AddColumn(STATE, "State");
CustArray.AddColumn(ZIP, "Zip");
CustArray.AddColumn(TAXABLE, "Taxable?");
CustArray.ColumnWidths("40 40 20 50 20 15 10 5");
CustArray.SetOrderBy(CUST_ID);
// sql.Execute("select * from CUSTOMERS");
sql * SelectAll().From(CUSTOMERS);
// while(sql.Fetch()) CustArray.Add(sql);
CustArray.Query();
// CustArray.WhenBar
CustArray.WhenLeftDouble = [=] { EditRow(); };
// CustArray.GoEndPostQuery();
}
|
|
|
 |
|
sqlarray and sqlite
By: jimlef on Fri, 18 September 2020 22:49
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Sat, 19 September 2020 05:50
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Sat, 19 September 2020 06:57
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Sat, 19 September 2020 08:04
|
 |
|
Re: sqlarray and sqlite
By: mirek on Mon, 21 September 2020 08:19
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Mon, 21 September 2020 22:54
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Tue, 22 September 2020 03:05
|
 |
|
Re: sqlarray and sqlite
By: mirek on Tue, 22 September 2020 09:08
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Tue, 22 September 2020 17:43
|
 |
|
Re: sqlarray and sqlite
By: mirek on Tue, 22 September 2020 17:54
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Tue, 22 September 2020 18:07
|
 |
|
Re: sqlarray and sqlite
By: mirek on Tue, 22 September 2020 18:47
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Tue, 22 September 2020 20:41
|
 |
|
Re: sqlarray and sqlite
By: mirek on Wed, 23 September 2020 16:32
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Wed, 23 September 2020 17:14
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Wed, 23 September 2020 19:57
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Thu, 24 September 2020 06:08
|
 |
|
Re: sqlarray and sqlite
By: mirek on Thu, 24 September 2020 13:46
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Thu, 24 September 2020 16:40
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Thu, 24 September 2020 19:28
|
 |
|
Re: sqlarray and sqlite
By: mirek on Fri, 02 October 2020 11:40
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Fri, 02 October 2020 15:13
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Sat, 03 October 2020 00:17
|
 |
|
Re: sqlarray and sqlite
By: mirek on Sun, 04 October 2020 10:05
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Sun, 04 October 2020 17:27
|
 |
|
Re: sqlarray and sqlite
By: mirek on Sun, 04 October 2020 19:56
|
 |
|
Re: sqlarray and sqlite
By: jimlef on Sun, 04 October 2020 20:37
|
Goto Forum:
Current Time: Mon Jul 07 18:21:32 CEST 2025
Total time taken to generate the page: 0.04571 seconds
|
|
|