FWIW - I got web2py running on IBM i v7.3 (AS/400) using a sqlite database. 
 

Haven't had time to get back to trying the dal with DB2 for i.

-Jim


On Thursday, July 20, 2017 at 8:54:50 AM UTC-5, Jim S wrote:
>
> Nothing happening.  Got sidetracked and haven't looked at it for a couple 
> months.
>
> -Jim
>
> On Thu, Jul 20, 2017 at 7:12 AM, António Ramos <ramstei...@gmail.com> 
> wrote:
>
>> Hello @Jim 
>> any news  on your  
>>
>> DAL and ibm_db_dbi withing an iseries?
>>
>>
>> regards
>>
>> 2017-04-30 15:22 GMT+01:00 'DenesL' via web2py-users <
>> web2py@googlegroups.com>:
>>
>>> Have you tried the rname parameter in the table definition?.
>>> Denes
>>>
>>> On Thursday, April 27, 2017 at 8:20:40 AM UTC-4, Jim S wrote:
>>>>
>>>> Yes, I was able to get it to connect and the DAL created my tables, but 
>>>> not it won't access them because it is looking for lower case table names 
>>>> and evidently when the tables were created the names became upper case.  
>>>> Since I'm working with this in a Litmis space I don't have full access to 
>>>> do all the work needed.  I do have a 7.3 IBM i box that I'm just getting 
>>>> setup with the new OPS PTFs and am planning on continuing my testing when 
>>>> that becomes available. I was planning on reporting back once I had that 
>>>> all working.
>>>>
>>>> Anyone know if there is a quick way to tell the DAL to ignore the case 
>>>> of the table/field names when connecting?
>>>>
>>>> -Jim
>>>>
>>>> On Thu, Apr 27, 2017 at 6:48 AM, António Ramos wrote:
>>>>
>>>>> @Jim any news on this ?
>>>>>
>>>>>
>>>>>
>>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
>>>>>  Sem 
>>>>> vírus. www.avast.com 
>>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
>>>>>  
>>>>> <#CAERBpoCVC_a52i4gAmJFDRXiJw_GASg_aiayL5WNAzTXAyHyJQ@mail.gmail.com_m_2057056253654243897_m_4177656552753926970_CAERBpoBUu9KQD4Uj8Ar933yoAb8QOCH7cLr+sW0Xj8SU-4DPTw@mail.gmail.com_m_1226437280183523027_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>>>
>>>>> 2017-04-21 16:36 GMT+01:00 Massimo Di Pierro:
>>>>>
>>>>>> We do have an adapter for db2:ibm_db_dbi did you try it? Anyway, in 
>>>>>> general adapter are defined in 
>>>>>>
>>>>>> web2py/gluon/packages/dal/pydal/adapters
>>>>>> You can make your own adapter. The first step is identify which 
>>>>>> existing adapter to extend. You want to pick the one with the closest 
>>>>>> SQL 
>>>>>> dialect. Then you create (in a new adapter file) a new class that 
>>>>>> extends 
>>>>>> that adapter. db2:ibm_db_dbi for example is defined in db2.py as follows:
>>>>>>
>>>>>> @adapters.register_for('db2:ibm_db_dbi')
>>>>>>
>>>>>> class DB2IBM(DB2):
>>>>>>
>>>>>>     drivers = ('ibm_db_dbi',)
>>>>>>
>>>>>>
>>>>>>     def connector(self):
>>>>>>
>>>>>>         uriparts = self.ruri.split(";")
>>>>>>
>>>>>>         cnxn = {}
>>>>>>
>>>>>>         for var in uriparts:
>>>>>>
>>>>>>             v = var.split('=')
>>>>>>
>>>>>>             cnxn[v[0].lower()] = v[1]
>>>>>>
>>>>>>         return self.driver.connect(
>>>>>>
>>>>>>             cnxn['dsn'], cnxn['uid'], cnxn['pwd'], **self.driver_arg
>>>>>> s)
>>>>>>
>>>>>> and can be called as:
>>>>>>
>>>>>> db = DAL('db2:ibm_db_dbi:dsn=....;uid=...;pwd=...')
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Friday, 21 April 2017 09:50:03 UTC-5, Jim S wrote:
>>>>>>>
>>>>>>> I would love to do some work on this if there was a mentor out there 
>>>>>>> willing to help me get started.
>>>>>>>
>>>>>>> -Jim
>>>>>>>
>>>>>>> On Fri, Apr 21, 2017 at 5:34 AM, António Ramos wrote:
>>>>>>>
>>>>>>>> Maybe Massimo will read this and give us some hints on how to make 
>>>>>>>>  DAL use the ibm_dbi
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>>
>>>>>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
>>>>>>>>  Sem 
>>>>>>>> vírus. www.avast.com 
>>>>>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
>>>>>>>>  
>>>>>>>> <#CAERBpoCVC_a52i4gAmJFDRXiJw_GASg_aiayL5WNAzTXAyHyJQ@mail.gmail.com_m_2057056253654243897_m_4177656552753926970_CAERBpoBUu9KQD4Uj8Ar933yoAb8QOCH7cLr+sW0Xj8SU-4DPTw@mail.gmail.com_m_1226437280183523027_m_7092998039415557888_CAERBpoB9XHiZLmMc2ZRmOb=JTAwUc+3=AKTvYoVXpYzostc8gQ@mail.gmail.com_m_-8595142087007992887_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>>>>>>
>>>>>>>> 2017-03-17 21:06 GMT+00:00 Jim S:
>>>>>>>>
>>>>>>>>> Hi
>>>>>>>>>
>>>>>>>>> In a former (and somewhat current) life I was an AS/400 guy.  Our 
>>>>>>>>> shop still uses the platform though most of my time is spent on 
>>>>>>>>> Python and 
>>>>>>>>> web2py now.
>>>>>>>>>
>>>>>>>>> Recently Python became available and officially supported on IBM i 
>>>>>>>>> and I'm trying to get web2py running there accessing the local 
>>>>>>>>> DB2/400 
>>>>>>>>> database.  Using the local python on the system I can create a 
>>>>>>>>> database 
>>>>>>>>> connection to the local database doing this:
>>>>>>>>>
>>>>>>>>> import ibm_db_dbi as db
>>>>>>>>>
>>>>>>>>> conn = db.connect(database='*LOCAL')
>>>>>>>>>
>>>>>>>>> I'm hoping to find an easy way to convert this into a 
>>>>>>>>> connectstring for the DAL so I can have my database created there.  
>>>>>>>>> The 
>>>>>>>>> SQL-flavor it should use would be the same as ODBC-flavored SQL.  
>>>>>>>>>
>>>>>>>>> Can anyone give me a clue how to modify the DAL code to connect to 
>>>>>>>>> my db?  Any pointers to other articles or links would really be 
>>>>>>>>> appreciated.  It would be exciting for me to get this working since I 
>>>>>>>>> could 
>>>>>>>>> then show RPG developers how easy it would be to get an application 
>>>>>>>>> on the 
>>>>>>>>> web from the AS/400 using python/web2py.
>>>>>>>>>
>>>>>>>>> -Jim
>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>> 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.
>>>>>>>>>
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> 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 a topic in 
>>>>>>>> the Google Groups "web2py-users" group.
>>>>>>>> To unsubscribe from this topic, visit 
>>>>>>>> https://groups.google.com/d/topic/web2py/qrlN5TSSBgs/unsubscribe.
>>>>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>>>>> web2py+unsubscr...@googlegroups.com.
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>> 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.
>>>>>>
>>>>>
>>>>> -- 
>>>>> 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 a topic in the 
>>>>> Google Groups "web2py-users" group.
>>>>> To unsubscribe from this topic, visit 
>>>>> https://groups.google.com/d/topic/web2py/qrlN5TSSBgs/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>> web2py+unsubscr...@googlegroups.com.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> -- 
>>> 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.
>>>
>>
>> -- 
>> 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 a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/qrlN5TSSBgs/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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