Hi, I understand that if a component needs to have access to 1 or more tables there are 2 ways to do this: - Inject the table definition(s) into the host - USE DATABASE and connect to an external database/datafile.
I have some questions about using external databases in the context of a component. Given the following situation: [Host_Database] <- [component] -> [external_for_Component] - in the case of client/server how is the external database managed? -- would I place it in the component's resource folder? -- is it automagically moved to the client via some other mechanism? -- or is the component's external database call passed back to the server, call(s) made and then data transferred to client from server? -- something else - As I read the 4D docs it seems that the external database can NOT have/use a field of type C_Object as this is not supported by SQL, and access is done to the external database only through SQL. -- Is this a correct interpretation? - In a component with an external database, would I need to switch back and forth between access to the external database and the host system? ex: method call from host includes pointer to table or field of host. To satisfy the method call, data from the external database needs to be accessed. I USE DATABASE(External) to the external database do query, get data. - do I need to place the retrieved external database data into variable(s)? - do I need to then USE DATABASE(Host) before working with the host table/field(s)? Thanks for answering, and any other tips you may have regarding external databases and components. Chip We have done so much, with so little, for so long; We are now qualified to anything with nothing <sigh> - unknown ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

