Home » U++ Library support » U++ SQL » Reading S_xxxx records from Sql
Reading S_xxxx records from Sql [message #38871] |
Thu, 24 January 2013 21:20  |
 |
Alboni
Messages: 216 Registered: January 2012 Location: Kajaani, Finland
|
Experienced Member |
|
|
Hello,
Is it possible to read whole records from sql instead of fields?
something like: (different syntax probably)
Sql sql;
S_SOMETABLE rec;
sql*Select(SqlAll()).From(SOMETABLE).Where(key==1);
if (sql.Fetch()
{
rec=sql;
}
Would be awfully handy.....
[Updated on: Thu, 24 January 2013 21:21] Report message to a moderator
|
|
|
|
|
|
Re: Reading S_xxxx records from Sql [message #39077 is a reply to message #38884] |
Wed, 13 February 2013 08:30  |
|
If you use not all fields in your sql schema, then SqlAll() may transfer unwanted fields (maybe BLOBs...).
rec transfers fields only present in your schema.
PS
For screen buffer to read DataFileRecord use SqlCtrls screen sctructure in header file of window class.
and in constructor
ctrls
(sqlfield1,dlg.ScreenField1)
(sqlfield2,dlg.ScreenField2)
(sqlfield3,dlg.ScreenField3)
(sqlfield4,dlg.ScreenField4)
;
And when you read record use this code:
SQL * Select(dlg.ctrls).From(TABLE).Where(TAB_ID == ptr);
if(!dlg.ctrls.Fetch(SQL))
return;
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
Goto Forum:
Current Time: Mon Apr 28 14:15:23 CEST 2025
Total time taken to generate the page: 0.04010 seconds
|