On Saturday, February 05, 2011 10:49:57 am Ed Leafe wrote: > On Feb 5, 2011, at 1:39 PM, Sibylle Koczian wrote: > > True, but if you don't always want to get complete tables into your > > bizobj you'd normally need parameterized SQL. The select pages of > > AppWizard applications should contain lots of it (can't find the place > > ATM). And this might be distributed all over the application, not > > concentrated in bizobj methods. > > Paul's point is that if you are using the SqlBuilder methods (i.e., not > using UserSQL), Dabo will know the backend in use and create the > parameters appropriately. His use case is running user-defined SQL > statements against both SQLite (which uses ?) and MySQL (which uses %s). > > > -- Ed Leafe
Yes we have two of each Postgres and MySQL use %s and SQLite uses '?' and FireBird uses both the '?' and ':name' (at least it did when I worked with it). Therefore, I think I'm aware of the issue. First let me say I am biased. I love using Postgres and in general I do not see SQLite as a reliable database engine (that's only my opinion and comes from my personal experiences - yes I know millions are using it). So in general I try to avoid using SQLite. My only answer is don't pass para directly - pass the SQL statement. This does several nice things IMO. SQLite does not allow parameters for anything but values. Meaning changing tables names, etc is impossible unless: sql = "select * from %s" sql = sql % self.tablename bizobj.UserSQL = sql Now I have a complete sql statement that will work with any of the databases supported by Dabo. So I do not see the need for a special universal paramPlaceholder value. Dabo does a great job as is and if the developer has needs outside of the standard he/she can use the above to pass the values. As always I'm open to anyone's opinion that I'm full of it! Johnf --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/201102051141.22921.jo...@jfcomputer.com