hi! i'm writing my first wxWindows application. i use wxDb & wxDbTable classes to connect to my MySQL database and create some tables. but i don't know how to connect this tables into relational database. i couldn't find in documentation functions to create relations between tables.... wxDbTable::SetColDefs() & wxDbTable::CreateTable() seems to be insufficient... i know how to write it SQL but i want to use wxODBC... (sorry for my english...)
2. Re: relational database with wxODBC
#2614
Posted by: 2003-09-09 22:16:28
Hi, I'm not very expert however I'm using
wxDbTable::QueryBySqlStmt
to join more that one table using standard SQL. The pointer to the wxDbTable class is releted to one only table (to insert/delete/update records) but you can read with wxDbTable::SetColDefs from other tables, selected from your query.
Andrea
3. Re: relational database with wxODBC
#2615
Posted by: 2003-09-10 21:37:49
Just a guess: Can wxODBC classes deal with views? In that case you could "connect" the tables as a view and then use wxDbTable to work with it.