On 01/05/2013 11:51 AM, Carey Gagnon wrote:
I have inherited a database that in my opinion was designed very badly, and
now I am having a hard time wrapping my head around what I need to do so
that dabo and the mssql database play nice together.
I have 3 tables where I have to pull fields into table one from tables 2 &
3. Problem is, the fields I need to pull in all have the same names. I have
tables 2 (Cities) and table 3 (ProvinceState) playing nice together but I
can't get table 1 into the mix as well.
TABLE 2 (Cities)
self.DataStructure = (
("CityID", "I", True, "dbo.Cities", "CityID"),
("CityName", "C", False, "dbo.Cities", "CityName"),
("ProvinceState", "C", False, "dbo.Cities",
"ProvinceState"),
("Country", "C", False, "dbo.ProvinceState", "Country"),
################## Pulled In from Table 3 with addJoin and addField
)
I would be dubious of the above. Especially since Country shows up below
also. See further comments below.
TABLE 3 (ProvinceState)
self.DataStructure = (
("ProvinceState", "C", True, "dbo.ProvinceState",
"ProvinceState"),
("Country", "C", False, "dbo.ProvinceState", "Country"),
)
Again, I don't have the option of changing the tables and not matter what I
do I can't seem to get it right. I either end up with a Ambiguous field
error or I get the values that were previously entered into the Companies
table when it was stand alone (more correct to say before it relied on the
Cities table)
What are the exact error messages and where are they coming from Dabo or
the database?
As to the values issue, that would depend on how the DropDown was
defined, so its code would need to be seen.
I know this isn't really a dabo specific question, but if anyone can help
me wrap my head around this it would be greatly appreciated.
Thanks
Carey
--
Adrian Klaver
[email protected]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]