I have a table in an odbc connected database
i already have my connection setup because of other controllers stuff
import sys
import pythoncom
pythoncom.CoInitialize ()
import win32com.client
conn = win32com.client.Dispatch(r'ADODB.Connection')
rs = win32com.client.Dispatch('ADODB.Recordset')
DSN='Driver={Client Access ODBC Driver (32-bit)};System=x.x.x.x;User
ID=x.x.x.x;Password=x.x.x.x;Initial Catalog=QGPL;CommandTimeout=0;'
conn.Open(DSN)
etc
as i dont know how to autocomplete base on a remote odbc i imported a table
to my web2py instance
*now i have*
db.define_table('lista',
Field('mp'))
*after i have *
db.define_table('matprimas',
Field('descr'),
Field('qt','integer'))
db.matprimas.descr.widget = SQLFORM.widgets.autocomplete(request,
db.lista.mp, limitby=(0,10), min_length=2)
I would like to avoid having to update regularly my table *lista* and
autocomplete my form field directly based on my odbc dsn
Is this possible? I see this need a lot in my company, especially working
on top of the ERP system.
Thank you again
António
2013/11/4 Massimo Di Pierro <[email protected]>
> You should be able to do it. We need more info to provide an example.
>
>
> On Monday, 4 November 2013 05:10:44 UTC-6, Ramos wrote:
>>
>> hello
>> i need an autocomplete widget to autocomplete with data from an external
>> odbc database
>>
>> is this possible to tweak the autocomplete widget or i need to create my
>> own?
>>
>> Thank you
>>
> --
> 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/groups/opt_out.
>
--
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/groups/opt_out.