*I think we found the solution for msaccess...!!!  yes,  is the odbtp + 
python-odbtp*

*STEP 1: odbtp *
download odbtp-1.1.4.tar.gz
>sudo tar xzf odbtp-1.1.4.tar.gz
>cd odbtp-1.1.4
SOS !! for Building ODBTP client library on a 64-bit OS please read 
odbtp-1.1.4/README.64bitOS
>sudo ./configure
>sudo make
>sudo make install

*STEP 2: Win32 Service Installation*
NOTE: The ODBTP service can only be installed on Windows NT 4.0, 2000 or XP 
Pro.

Create a directory on the Windows host where the service program files will 
reside, i.e., md odbtp.
Copy the files odbtpctl.exe, odbtpsrv.exe and odbtpsrv.ini files from the 
winservice 
directory into the directory created in step 1.

open odbtpsrv.ini and change some parameter like : 

[Settings]
LogFile=odbtpsrv.log
EnableLog=1                     #<-for debug
LogReadAndSent=1
LogODBC=1                      #<-for debug
;Port=2799
ListenBacklog=32
;MaxClientThreads=256
;MaxActiveClientThreads=32
;ClientThreadWaitTimeout=60
ReadTimeout=1800
TransBufferSize=65536                  #<- maximum  
MaxRequestSize=2000000000
;ConnPoolSize=32
;ConnPoolTimeout=1300
;ReservConnPoolSize=24
;ReservConnPoolTimeout=3600
;BadConnCheck=0
;MaxQrysPerConn=4
;ConnectTimeout=0
;QueryTimeout=0
FetchRowCount=0
;EnableProcCache=0

Open a command prompt (cmd) window on the Windows host.
Change to the directory to which the service program files were copied, 
i.e., cd odbtp.
Run the following commands to install and start the service:
    
       odbtpctl install
       odbtpctl start

*STEP 3: python-odbtp*
>sudo git clone https://github.com/msaavedra/python-odbtp
>sudo ln -s /opt/python-odbtp/odbtp /usr/lib/python2.7

>sudo ln -s /usr/local/lib/libodbtp.so.1 /usr/lib/python2.7
>sudo ln -s /usr/local/lib/libodbtp.so /usr/lib/python2.7
>sudo ln -s /usr/local/lib/libodbtp.so.1.0.1 /usr/lib/python2.7

>ldconfig
>export LD_LIBRARY_PATH=/usr/lib/python2.7:$LD_LIBRARY_PATH

*STEP 4: some changes to python-odbtp*

>nano python-odbtp/connection.py, line 121
     change to :
     if self.driver not in (ODB_DRIVER_FOXPRO, ODB_DRIVER_JET, 
ODB_DRIVER_MSACCESS):

>nano python-odbtp/constants.py, 

line 26, add:
ODB_MSACCESS_INT = 65520

line 105, add :
ODB_DRIVER_MSACCESS= 'odbcjt32.dll' 

>nano python-odbtp/types.py, 
line 370, add:
ODB_MSACCESS_INT:_convert_int,


*STEP 5: test*
>python
>>import odbtp 
>>cn_string='DRIVER={Microsoft Access Driver 
(*.mdb)};DBQ=C:\\test.mdb;UID=admin;PWD=<pas>'
>>cn=odbtp.connect(cn_string,server='<server ip>')
>>print cn.driver
odbcjt32.dll
>>cu=cn.cursor()
>>cu.execute('select * from <table>')
>>print [(column[0]) for column in cu.description]
>>print cu.rowcount
>>cu.fetchall()

With odbtp you can insert/delete/select your data in mdb files...!!!  It's 
a very good solution
We found some problems with size TransBufferSize if you have enough data 
but if you know your data can you manage it.

Now is the final step to web2py : 
I think is needing to create a new adapter 
(http://web2py.com/books/default/chapter/29/6#Note-on-new-DAL-and-adapters) 
. Is that true ?
Can anybody help ?


-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to