Home » U++ Library support » U++ SQL » simple example sqlite ref. not working core console
Re: simple example sqlite ref. not working core console [message #56366 is a reply to message #52514] |
Sat, 27 February 2021 16:57  |
JeyCi
Messages: 67 Registered: July 2020
|
Member |
|
|
mtdew3q wrote on Tue, 15 October 2019 02:47Am I doing something wrong with this code?
Is there a trick for joining SQLite tables?
Sql sql(sqlite3);
Select(id.Of(a), mytext.Of(b))
.From(a)
.InnerJoin(b)
.On(id.Of(a) == fk_A.Of(b))
.Where(id.Of(a) == 2);
while(sql.Fetch())
Cout() << sql[0] << ' ' << sql[1] <<'\n' ;
//Error: Schema join not found ,a, b (if I used a reference join syntax instead of plain old join)
it was just an example of unattentiveness while reading SQL Tutorial
- just need to use cursor "sql*" to get then records from recordset while fetching
Sql sql(sqlite3);
sql * Select(id.Of(a), mytext.Of(b))
.From(a)
.InnerJoin(b)
.On(id.Of(a) == fk_A.Of(b))
.Where(id.Of(a) == 2);
the code of topic_starter is working...
Best regards.
[Updated on: Sat, 27 February 2021 17:09] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Apr 26 16:01:09 CEST 2025
Total time taken to generate the page: 0.00908 seconds
|