[web2py] Legacy databases

2012-03-03 Thread Ralo Tannahill
Hello all I'm new to python and web2py, and I'm evaluating them to make new developments accessing legacy databases (MSSQL 2000, MySQL 3 and MySQL 5 ). I've tried the connection strings shown in the web2py book, but I can connect only to MySQL 5. - The error connecting to MySQL 3 is "access den

Re: [web2py] legacy databases

2010-03-19 Thread Thadeus Burgess
You need to define your tables in web2py. As of yet there is no db introspection for db. db.define_table('tablename', *Fields) There is also a thing called "keyedtables" which is for legacy databases. -Thadeus On Fri, Mar 19, 2010 at 10:44 AM, pacopyc wrote: > Hi, I need to develope a web

[web2py] legacy databases

2010-03-19 Thread pacopyc
Hi, I need to develope a web application with legacy database (Oracle). Database's tables have an auto increment field (id) and then this is ok. I tried to build a new application and I set database connection (db.py). No error (connection string is ok) but if I try to use "appadmin" application I

[web2py:19638] Re: web2py legacy databases, 'id' field requirement

2009-04-12 Thread Yarko Tymciurak
Thanks for the update, David. On Mon, Apr 6, 2009 at 8:51 AM, David Niergarth wrote: > > On Apr 1, 9:20 pm, Yarko Tymciurak wrote: > > > http://www.postgresql.org/docs/8.3/interactive/sql-createrule.html > > > > and looking at this, it seems fairly straight forward: > > Yes it does. The manual

[web2py:19252] Re: web2py legacy databases, 'id' field requirement

2009-04-06 Thread David Niergarth
On Apr 1, 9:20 pm, Yarko Tymciurak wrote: > > http://www.postgresql.org/docs/8.3/interactive/sql-createrule.html > > and looking at this, it seems fairly straight forward: Yes it does. The manual threw me when it said that "*Currently* views are read only" but that "you can get the *effect* of a

[web2py:18954] Re: web2py legacy databases, 'id' field requirement

2009-04-01 Thread Yarko Tymciurak
On Wed, Apr 1, 2009 at 8:32 PM, David Niergarth wrote: > > Yes, I meant SQL UPDATE/INSERT statements. As it turns out, in > PostgreSQL views are read-only. > >Currently, views are read only: the system will not allow an > insert, update, >or delete on a view. You can get the effect of an

[web2py:18951] Re: web2py legacy databases, 'id' field requirement

2009-04-01 Thread David Niergarth
Yes, I meant SQL UPDATE/INSERT statements. As it turns out, in PostgreSQL views are read-only. Currently, views are read only: the system will not allow an insert, update, or delete on a view. You can get the effect of an updatable view by creating rules that rewrite inserts, etc. on

[web2py:18945] Re: web2py legacy databases, 'id' field requirement

2009-04-01 Thread Yarko Tymciurak
On Wed, Apr 1, 2009 at 3:22 PM, David Niergarth wrote: > > But how would you handle updates (views being read-only). Views are not read-only. SQLite only supports READ-ONLY views. When derived columns are from multiple sources, there are constraints - but for what we're talking about here, th

[web2py:18939] Re: web2py legacy databases, 'id' field requirement

2009-04-01 Thread David Niergarth
But how would you handle updates (views being read-only). --David On Apr 1, 2:34 pm, Yarko Tymciurak wrote: > On Wed, Apr 1, 2009 at 12:34 AM, mdipierro wrote: > > > Can you create a custom database view and map the field? > > Yes - this is the way to do it in your db server.  You also want to

[web2py:18932] Re: web2py legacy databases, 'id' field requirement

2009-04-01 Thread Yarko Tymciurak
On Wed, Apr 1, 2009 at 12:34 AM, mdipierro wrote: > > Can you create a custom database view and map the field? Yes - this is the way to do it in your db server. You also want to set your web2py table definition to migrate=False (so that an ALTER TALE is not attempted by web2py). NOTE: you onl

[web2py:18905] Re: web2py legacy databases, 'id' field requirement

2009-03-31 Thread mdipierro
Can you create a custom database view and map the field? On Apr 1, 12:06 am, Kevin Butler wrote: > This was posted as a comment > tohttp://mdp.cti.depaul.edu/AlterEgo/default/show/55: > Which reads: > > > web2py can import tables saved in csv format therefore it can access legacy > > data. > >

[web2py:18901] web2py legacy databases, 'id' field requirement

2009-03-31 Thread Kevin Butler
This was posted as a comment to http://mdp.cti.depaul.edu/AlterEgo/default/show/55: Which reads: > web2py can import tables saved in csv format therefore it can access legacy > data. > web2py can also access existing databases directly (MySQL, PostgreSQL, SQLite > and Oracle) if > each table h