FAQ
Hi all,
Let's imagine we have make an GUI using Tkinter module.
So, how can we connect an widget (such as a label, text entry etc) to one
field of a Database, in the way we can access/show the data stored in that
field.

Any hint would be appreciate.

Carlos Alberto
COELCE/DPRON-Departamento de Projetos e Obras Norte
Fone: 677- 2228
e-mail: calves at coelce.com.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-list/attachments/20020123/d14932c7/attachment.html

Search Discussions

  • DeepBleu at Jan 23, 2002 at 2:38 pm
    Connecting widgets to DatabasesLet us say that you are using mxODBC or DCOracle2 (or some other database driver for this matter).
    The first thing to know is how are you getting your database query.
    For example, DCOracle2 stores the result of a query in a list.
    Say you have the list Query_List.
    With fetchall():
    You access its individual items in the regular way: Query_List[0][0], Query_List[0][1] etc...etc....
    These ARE the values that you want to impart to the values of a Label or Text widgets.
    Say you have Label1
    Then
    Label1.value=Query_List[0][0]
    for example.
    You can loop over values etc... etc.....
    DeepBleu (Blue with a difference)
    "Alves, Carlos Alberto - Coelce" <calves at coelce.com.br> wrote in message news:mailman.1011782553.17025.python-list at python.org...
    Hi all,
    Let's imagine we have make an GUI using Tkinter module.
    So, how can we connect an widget (such as a label, text entry etc) to one field of a Database, in the way we can access/show the data stored in that field.

    Any hint would be appreciate.

    Carlos Alberto
    COELCE/DPRON-Departamento de Projetos e Obras Norte
    Fone: 677- 2228
    e-mail: calves at coelce.com.br

    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.python.org/pipermail/python-list/attachments/20020123/235d7ea6/attachment.html

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJan 23, '02 at 11:44a
activeJan 23, '02 at 2:38p
posts2
users2
websitepython.org

People

Translate

site design / logo © 2022 Grokbase