Home » U++ Library support » U++ SQL » Access to S_* Structure of TABLE crash Application.
Re: PROPOSAL: Access to S_* Structure of TABLE crash Application. [message #36306 is a reply to message #36305] |
Sat, 19 May 2012 03:12   |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
sergeynikitin wrote on Sat, 19 May 2012 02:02 | Talk about that (even in SQLite) you can execute the query
SELECT PLANT.NAME FROM PLANT
and it will be correctly understood by the SQL driver.
(By the way, - try make DUMP of NAME.Of(PLANT))
|
SQL * Select(PLANT(NAME)).From(PLANT);
LOG(SQL.ToString());
while (SQL.Fetch()) {
DUMP(SQL.GetColumnInfo(0).name); // returns "NAME"
DUMP(NAME.Of(PLANT)); // returns PLANT\nNAME
DUMP(SQL[NAME]); // returns correct value, associated with "NAME" column
DUMP(SQL[0]); // returns previous value
DUMP(SQL[NAME.Of(PLANT)]); // "Assertion failed" here
}
With following output:
select PLANT.NAME from PLANT
SQL.GetColumnInfo(0).name = NAME
NAME.Of(PLANT) = PLANT
NAME
SQL[NAME] = First Plant
SQL[0] = First Plant
Assertion failed in C:\upp\uppsrc\Sql\Sql.cpp, line 339
0
sergeynikitin wrote on Sat, 19 May 2012 02:02 | I do not understand how the subject is connected with the function of sqlite3_column_name
|
The subject is connected with incorrect using of S_* structure, which throws "Assertion failed", because of requested empty column. The sqlite3_column_name function is related to SQLite database and how U++ wrapper uses it to get result set. Therefore, I said, that it is dependent from concrete database.
I think, you are free to propose your changes, if you want. So, U++ developers, which responsible to SQL parts of U++, might analyse it and return the answer to you.
|
|
|
Goto Forum:
Current Time: Tue May 13 11:40:14 CEST 2025
Total time taken to generate the page: 0.00733 seconds
|