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 » Access to S_* Structure of TABLE crash Application.
icon3.gif  Access to S_* Structure of TABLE crash Application. [message #36254] Thu, 17 May 2012 02:21 Go to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

I try to access field by the expression:

row.NAME
row.ID

TABLE defenition:
TABLE_(SIMPLE_TEST1)
   INT_     (ID) PRIMARY_KEY
   STRING_  (NAME, 200)
   STRING_  (LASTNAME, 200)
   INT_     (BDATE)
END_TABLE


call SQL[row.NAME] throw Assertion. What I'm wrong???

Testcase:
Package: /upp/reference/SQL_Sqlite3
File: simple.cpp

Fragment of modified code (lines 83-90):
	// Test selection:
	sql*Select(row).From(SIMPLE_TEST1);
	LOG(sql.ToString());
	while (sql.Fetch()) {
		LOG(Format("%d %s %s %d",sql[0],sql[1],sql[2],sql[3]));
		LOG(Format("%s %s %s %s",sql[ID],sql[NAME],sql[LASTNAME],sql[BDATE]));
//My added line vvvvvvvvvvvvvv                           vvv         vvv           vvv               vvv
		LOG(Format("error line: %s %s %s %s",sql[row.ID],sql[row.NAME],sql[row.LASTNAME],sql[row.BDATE]));
	}


Also Source of this example in attachment

PS
It looks like this problem come after entering SVO_VALUE.

PSPS
For temporary decision of this problem I use alternative scheme, like this:
TABLE_(SIMPLE_TEST1)
   INT_     (row_ID) PRIMARY_KEY
   STRING_  (row_NAME, 200)
   STRING_  (row_LASTNAME, 200)
   INT_     (row_BDATE)
END_TABLE




SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}

[Updated on: Thu, 17 May 2012 14:49]

Report message to a moderator

 
Read Message icon3.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon3.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sql .sch / Date (moved)
Next Topic: SqlBinary and Postgres 9
Goto Forum:
  


Current Time: Thu Apr 25 21:26:35 CEST 2024

Total time taken to generate the page: 0.04343 seconds