Re: Access db module
Tim Chase wrote: >> Someone wants to create a browser UI for an access db. can't change the db, >> even though A) access can talk to other engines via odbc and B) it will cost >> someone else more. >> >> python does odbc, there is already a MsSql_oledb for django module, so all I >> need to do is make one for access. I'm a db guy, and access is a db, so it >> shouldn't be too hard, right? > > I'll toss a couple caveats on the table and let you evaluate them > against your needs :) > > There seem to be a couple warts on the ado_mssql > driver/backend--mostly due to some brain-damaged decisions on the > MS end of things. > > One I noticed was slicing, as MSSQL and Access (ADB) don't > support the LIMIT syntax, but do support TOP which means that > instead of doing > >SELECT * FROM app_model LIMIT 10 OFFSET 20; > > you're stuck with something like > >SELECT TOP 10 * FROM app_model; -- no OFFSET ability > > This makes pagination a drag. 'cuz yeah...I really want to pull > back N+M records when all I asked for was M records. I am hoping the whole db file is about 50 mb, so don't care if I have to pull everything. I can't imagine the db is over 500. but that is all just hunch. > > It might be feasible to do some sort of "(top M of ((top N+M) > reverse-sorted)) reverse-sorted again" which is an obcene hack. > One worthy of a 100-year sentence being stuck doing > data-conversions for clients that don't know what . > > Random ordering (using "?" as your order) is also broken as the > Rand() function is only evaluated once (not per-row). Thus, if > you try to order by it, it does nothing. It would be like > ordering by a constant-valued column. hope I dont have to care about that. > > I believe MSSQL/ADB are generally case-insensitive (you can > switch MSSQL to be case sensitive, but it makes all sorts of > things very fragile, as this is deviance from the norm). > > I've also had ADB fall over on me for no good reason in complex > queries. For some reason it usually has to do with a simple > ORDER BY clause on a complex query; yet simply wrapping the whole > thing in "SELECT * FROM () ORDER BY order>" solves the problem for me. If I remove the ORDER BY from > the original query, it works just fine. Go figure. > > Those are my ADB & MSSQL frustrations that come to me off the top > of my head. I'm sure there are more, but that should be enough > to make you use sqlite and hoodwink the party that thinks ADB is > ${DIETY}'s gift to databases ;) > >> Anyone know where I am going to get screwed? > > heh, it wouldn't be polite to say in mixed company ]:-D > Thanks for the tips. I won't be so optimistic now. Carl K --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Access db module
> Someone wants to create a browser UI for an access db. can't change the db, > even though A) access can talk to other engines via odbc and B) it will cost > someone else more. > > python does odbc, there is already a MsSql_oledb for django module, so all I > need to do is make one for access. I'm a db guy, and access is a db, so it > shouldn't be too hard, right? I'll toss a couple caveats on the table and let you evaluate them against your needs :) There seem to be a couple warts on the ado_mssql driver/backend--mostly due to some brain-damaged decisions on the MS end of things. One I noticed was slicing, as MSSQL and Access (ADB) don't support the LIMIT syntax, but do support TOP which means that instead of doing SELECT * FROM app_model LIMIT 10 OFFSET 20; you're stuck with something like SELECT TOP 10 * FROM app_model; -- no OFFSET ability This makes pagination a drag. 'cuz yeah...I really want to pull back N+M records when all I asked for was M records. It might be feasible to do some sort of "(top M of ((top N+M) reverse-sorted)) reverse-sorted again" which is an obcene hack. One worthy of a 100-year sentence being stuck doing data-conversions for clients that don't know what . Random ordering (using "?" as your order) is also broken as the Rand() function is only evaluated once (not per-row). Thus, if you try to order by it, it does nothing. It would be like ordering by a constant-valued column. I believe MSSQL/ADB are generally case-insensitive (you can switch MSSQL to be case sensitive, but it makes all sorts of things very fragile, as this is deviance from the norm). I've also had ADB fall over on me for no good reason in complex queries. For some reason it usually has to do with a simple ORDER BY clause on a complex query; yet simply wrapping the whole thing in "SELECT * FROM () ORDER BY " solves the problem for me. If I remove the ORDER BY from the original query, it works just fine. Go figure. Those are my ADB & MSSQL frustrations that come to me off the top of my head. I'm sure there are more, but that should be enough to make you use sqlite and hoodwink the party that thinks ADB is ${DIETY}'s gift to databases ;) > Anyone know where I am going to get screwed? heh, it wouldn't be polite to say in mixed company ]:-D -tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Access db module
swell. I am hoping I can use the MsSql_OLEDB code. Carl K Graham Hagger wrote: > Carl, > > Your question triggered some horrible access memories - but also > intrigued me. A quick googling brought me this link which might help > you out somewhat. > > http://www.markcarter.me.uk/computing/python/ado.html > > Graham > > Carl Karsten wrote: >> Someone wants to create a browser UI for an access db. can't change the db, >> even though A) access can talk to other engines via odbc and B) it will cost >> someone else more. >> >> python does odbc, there is already a MsSql_oledb for django module, so all I >> need to do is make one for access. I'm a db guy, and access is a db, so it >> shouldn't be too hard, right? Anyone know where I am going to get screwed? >> >> Carl K >> >> >> >> >> > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Access db module
Carl, Your question triggered some horrible access memories - but also intrigued me. A quick googling brought me this link which might help you out somewhat. http://www.markcarter.me.uk/computing/python/ado.html Graham Carl Karsten wrote: > Someone wants to create a browser UI for an access db. can't change the db, > even though A) access can talk to other engines via odbc and B) it will cost > someone else more. > > python does odbc, there is already a MsSql_oledb for django module, so all I > need to do is make one for access. I'm a db guy, and access is a db, so it > shouldn't be too hard, right? Anyone know where I am going to get screwed? > > Carl K > > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---