It is safer to use the web2py API instead of raw SQL.

On Monday, 5 March 2012 12:17:56 UTC-6, Ralo Tannahill wrote:
>
> Is it safe (from the perspective of queries syntax or stability) to use 
> MySQLdb in web2py (DAL), or is it better to use it "manually" as an import 
> and use raw SQL for accessing MySQL 3?
> If have found this url showing the changes needed
>
> http://code.google.com/p/web2py/source/diff?spec=svnfc75444ca55590835b4d0dc0e6c06a85e3f282a8&r=fc75444ca55590835b4d0dc0e6c06a85e3f282a8&format=side&path=/gluon/dal.py
>
>
> On Saturday, March 3, 2012 9:06:41 PM UTC+1, Alan Etkin wrote:
>>
>> If web2py uses pymysql, then it should not work with version 3: 
>>
>> (pymysql) Requirements 
>>
>>     Python 2.4 or higher 
>>
>>         http://www.python.org/ 
>>         2.6 is the primary test environment. 
>>
>>     MySQL 4.1 or higher 
>>
>>         protocol41 support, experimental 4.0 support 
>>
>> With some modifications, it should be possible to accept another 
>> library in the MySQL adpater. For example, PostgreSQL adpater now 
>> accepts two optional db interface libraries specified in the db uri. 
>>
>> On 3 mar, 13:52, Ralo Tannahill <[email protected]> wrote: 
>> > 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 denied for user 
>> > @databaseServer (using password: NO)", because no username or password 
>> is 
>> > passed to the server . 
>> > Is it a problem with pymysql? Searching in google, I found the python 
>> > module "MySQLdb" and with that module I can connect to both MySQL 3 and 
>> 5. 
>> > Could I configure web2py to use MySQLdb instead of pymysql? 
>> > 
>> > - The error connecting to MSSQL says that I don't specify a DSN or 
>> driver 
>> > 
>> > I am using CENTOS 6 (64bits) + python 2.6 + apache + mod_wsgi 
>> > I'd appreciate any help, thanks in advance
>
>

Reply via email to