Home » U++ Library support » U++ SQL » date not showing in sqlarray
date not showing in sqlarray [message #52300] |
Mon, 02 September 2019 03:45  |
|
Hi all-
I am practicing U++. I am having trouble with dates in sqlbool with sqlset situations and also just plain sqlarray.query() commands.. It returned the ID and location just fine.
If anyone has a quick moment can you please take a gander at this small snippet of code and tell me why when I call query of the sqlarray it does not return the date in the sqlarray control?
Code follows: THNX! roboloki
#include "fearmonger.h"
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct WinDlg : public WithWin10Layout<TopWindow> {
Button button;
SqlCtrls ctrls;
EditInt myid;
EditDate mydate;
EditString myloc;
typedef WinDlg CLASSNAME;
void exec4() {
SqlBool where;
SqlBool where2;
WinDlg dlg;
// SQL * Select(dlg.ctrls).From(SCHEDULE).Where(ID == 3);
disturbed.Query();
}
WinDlg() {
CtrlLayout(*this, "computer");
Title("My application with menu").Sizeable();
Add(button.LeftPos(10, 100).TopPos(10, 30));
disturbed.SetTable(SCHEDULE);
disturbed.AddKey(ID);
disturbed.AddColumn(ID,"ID").Edit(myid);
disturbed.AddColumn(LOCATION,"loc").Edit(myloc);
disturbed.AddColumn(START_DATE, "START_DATE").Edit(mydate);
disturbed.Appending().Inserting().Removing();
button <<= THISBACK(exec4);
}
};
void Cyborg::SqArray(){
WinDlg dlg;
dlg.Run();
// menu.Set(THISBACK(WinDlg());
}
sqlite> pragma table_info(SCHEDULE);
0|ID|INTEGER|0||1
1|LOCATION|STRING|0||0
2|START_DATE|INTEGER|0||0
3|START_TIME|INTEGER|0||0
4|END_DATE|INTEGER|0||0
5|END_TIME|INTEGER|0||0
6|DESCRIPTION|STRING|0||0
|
|
|
Goto Forum:
Current Time: Fri Apr 25 20:28:03 CEST 2025
Total time taken to generate the page: 0.00880 seconds
|