1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Print rows from a table with Pyodbc from progress openedge database

Discussão em 'StackOverflow' iniciado por fdantas, Novembro 23, 2017.

  1. fdantas

    fdantas Administrator Moderador

    I am new to python and pyodbc

    I try to print the first a row from a table from a progress openedge database. (Windows 7) Here is the code block that is not running:

    cursor.execute("select my-nr, my-dt-my from mytable")
    row = cursor.fetchone()
    print(row.my-nr, row.my-dt-my)


    This gives errors undefined name: 'nr' undefined name 'dt' undefined name 'my'

    I guess it has something to do with the minus - symbols behind the dot . in print(row.my-nr, row.my-dt-my)

    It was easy to print out the table names and column names from the database earlier but for some reason printing out rows is harder.

    Any ideas how to get the rows printed?

    Continue reading...

Compartilhe esta Página