Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
JeyCi is currently offline  JeyCi
Messages: 50
Registered: July 2020
Member
mtdew3q wrote on Tue, 15 October 2019 02:47
Am 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

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: with MariaDB (MySql) to capture error with Skylark
Next Topic: Jsonize() in database table structures (S_*) [patch]
Goto Forum:
  


Current Time: Sun May 12 06:41:32 CEST 2024

Total time taken to generate the page: 0.02617 seconds