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 » SqlArray::Join when a foreign key has more than one field
SqlArray::Join when a foreign key has more than one field [message #7472] Sat, 30 December 2006 21:03 Go to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
I couldn’t get how to join two tables using compound key.
Join(SqlId fk, ArrayCtrl& master) takes SqlId, which is a single field. It could be an SqlSet instead.

Is there another way to join two tables using compound key without reimplementing all logic from SqlArray?

Am I doing or asking something wrong?


Regards,
Novo
Re: SqlArray::Join when a foreign key has more than one field [message #7475 is a reply to message #7472] Sat, 30 December 2006 23:11 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, that case is simply out of scope of SqlArray.

But usually it is as simple to use ArrayCtrl for the job.

Mirek

P.S.: Now thinking, you might also try to use one foreign key using Join and another to alter "Where" condition. Or maybe both to alter Where and no Join at all. The only trouble is insertion in detail SqlArray, but even that could be done.

[Updated on: Sat, 30 December 2006 23:13]

Report message to a moderator

Re: SqlArray::Join when a foreign key has more than one field [message #7479 is a reply to message #7475] Sun, 31 December 2006 05:07 Go to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Thank you!

I got it. I just wanted to make sure that I did not miss something in design of Upp. I finally need to type a few lines of code myself. I almost got a working application without that.


Regards,
Novo
Previous Topic: MySql data types
Next Topic: SqlArray::SetDistinct()
Goto Forum:
  


Current Time: Sun Apr 28 22:54:55 CEST 2024

Total time taken to generate the page: 0.02261 seconds