This is what the examples indicate as db2 syntax, and it depends on the 
driver you have

'db2:ibm_db_dbi://DSN=dsn;UID=user;PWD=pass'                                

'db2:pyodbc://driver=DB2
;hostname=host;database=database;uid=user;pwd=password;port=port' 

On Saturday, 31 October 2015 17:12:11 UTC-5, [email protected] wrote:
>
> I'm new to Python world and based on the recommendation web2py is the 
> easiest way to learn about data and web integration. I need to access IBM 
> DB2 database in AS400 to interact with web page. 
>
> I been reading the guidelines, I define db2 connection string in 
> private/appconfig with db2://username:password@test. 
> The result was negative and this is what i get in message
>
> <type 'exceptions.SyntaxError'> Error in URI 'db2' or database not 
> supportedVersionweb2py™Version 2.12.3-stable+timestamp.2015.08.19.00.18.03
> Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
>
> Traceback (most recent call last):
>   File "C:\web2py\gluon\restricted.py", line 227, in restricted
>     exec ccode in environment
>   File "C:/web2py/applications/as400app/models/db.py" 
> <http://127.0.0.1:8000/admin/default/edit/as400app/models/db.py>, line 20, in 
> <module>
>     db = DAL(myconf.take('db.uri'), pool_size=myconf.take('db.pool_size', 
> cast=int), check_reserved=['all'])
>   File "C:\web2py\gluon\packages\dal\pydal\base.py", line 174, in __call__
>     obj = super(MetaDAL, cls).__call__(*args, **kwargs)
>   File "C:\web2py\gluon\packages\dal\pydal\base.py", line 424, in __init__
>     raise SyntaxError("Error in URI '%s' or database not supported" % 
> self._dbname)
> SyntaxError: Error in URI 'db2' or database not supported
>
>
> can anyone help as I been working on this for a week.... Millions thank you 
> in advanced.
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to