Home » U++ Library support » U++ SQL » sql using sqlexp
sql using sqlexp [message #52498] |
Fri, 11 October 2019 10:28 |
|
Hi all-
I am trying in vain to get something to work right in sqlexp that is so easy in the sqlite console.
sqlite> select event from DATES left outer join SCHEDULE on SCHEDULE.id = DATES.fk_schedule
I left out the where clause on the console. I can do this in regular sqlite with calling execute with parameters but want to do it the sqlexp way.
If you can see why sqlexp keeps giving me an assert error, please let me know!
thnx for any help,
roboloki
eventGrid.Clear();
Sql sql;
sql * Select(fk_schedule(id,event))
.From(DATES).LeftJoinRef(SCHEDULE)
.On(fk_schedule.Of(DATES) == id.Of(SCHEDULE))
.Where(dt==Date(2019,9,28));
while (sql.Fetch()){
eventGrid.Add(); }
TABLE_(SCHEDULE)
INT_ (id) PRIMARY_KEY AUTO_INCREMENT
STRING_ (loc,55)
INT_ (fk_task)
STRING_ (event,100)
END_TABLE
TABLE_(DATES)
INT (id) PRIMARY_KEY AUTO_INCREMENT
INT_ (fk_schedule) REFERENCES (SCHEDULE)
DATE_ (dt)
TIME_ (tm)
DATE_ (dt2)
TIME_ (tm2)
DATE_ (rdate)
TIME_ (rtime)
END_TABLE
[Updated on: Fri, 11 October 2019 10:41] Report message to a moderator
|
|
|
Re: sql using sqlexp [message #52499 is a reply to message #52498] |
Fri, 11 October 2019 11:44 |
|
Hi -
I tried changing the dates in the schema to INT_ . I still get the assert message.
I am headed for bed soon. Work in a couple of hours.
thnx.
|
|
|
|
Re: sql using sqlexp [message #52504 is a reply to message #52498] |
Sun, 13 October 2019 10:10 |
|
Hi all-
I think i figured out this problem.
My code wouldn't work, and I began to suspect that my computer got hacked.
I went and got nmap and ran a port scan. It came back with open ports!
So I decided to tie a rock to that computer and send it to the bottom of the river.
My new computer came back with nmap scans that are fine.
I knew that the sqlexp worked, and it defied logic why I couldn't get it running.
I could only run queries on one table at a time.
Back to sane test results I hope.
Have a cool rest of the weekend.
thanks,
roboloki
|
|
|
Goto Forum:
Current Time: Sat Apr 20 11:35:38 CEST 2024
Total time taken to generate the page: 0.05296 seconds
|