On Monday, June 6, 2016 at 1:34:00 PM UTC-7, Sammy wrote: > > I will probably be picking this back up in a few weeks as I will be > sidetracked for a while. I am just curious though why web2py requires one > to define a table even if it already exists. e.g. if I have an Oracle > client installed, all I need is a connection string. I don't need to define > a model table locally before starting my sql queries. Why can't web2py do > the same? This sounds like extra work. > > If you're only going to be using the DAL's "executesql" function, the model tables would be unnecessary. But the DAL provides a lot more, including the select() function. To use the select() function, the DAL needs to know the structure of the tables in the database. That's what the model files tell it. The DAL also provides a way to *create* tables in the database, and again uses the model files for that. Not needed for existing tables, but for many projects web2py is used for, the database doesn't exist until we use web2py to create it.
/dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

