U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » Access to S_* Structure of TABLE crash Application.
Re: Access to S_* Structure of TABLE crash Application. [message #36256 is a reply to message #36255] Thu, 17 May 2012 07:53 Go to previous messageGo to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Therefore it is logical error!

For example, there are two tables :

TABLE_(WORKER)
   INT_     (ID) PRIMARY_KEY
   STRING_  (NAME, 200)
   STRING_  (LASTNAME, 200)
   INT_     (PLANT_ID)
END_TABLE


TABLE_(PLANT)
   INT_     (ID) PRIMARY_KEY
   STRING_  (NAME, 200)
   STRING_  (ADDRESS, 200)
END_TABLE


I think, that S_* structure created to use in this situation, to decide this collision.

S_WORKER w;
S_PLANT p;

SQL * Select (w.NAME,w.LASTNAME,p.NAME,p.ADDRESS).FROM(WORKER).LeftJoin(PLANT).On(w.PLANT_ID==p.ID);

while SQL.Fetch() {
   Cout() << SQL[w.NAME] << SQL[w.LASTNAME] << SQL[p.NAME] << SQL[p.ADDRESS];
}


In other case S_-structure not help. I can write this code without S_struct more simple.


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

[Updated on: Thu, 17 May 2012 08:29]

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: Sun Apr 26 21:41:59 GMT+2 2026

Total time taken to generate the page: 0.00762 seconds