ODBC

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lblr33@yahoo.com

    #1

    ODBC

    I would like to connect to an Oracle database. In python version 2.1 I
    used the following code and it worked fine. When I run the code in
    version 2.4 it says that the odbc moduled does not exist. How do you
    connect to an Oracle database in v2.4?

    oradb=odbc.odbc ('oracle/scott/tiger')
    stmt='select project_id from s_projects'
    cur=oradb.curso r()
    cur.execute(stm t)
    for rec in cur.fetchall():
    print rec[0]
    cur.close()

    Thanks

  • Roger Upole

    #2
    Re: ODBC

    From the syntax, this appears to be the odbc module included
    with the Pywin32 package.
    http://sourceforge.net/projects/pywin32/
    You probably have it installed with the 2.1.1 version, but
    not 2.4.

    hth
    Roger

    <lblr33@yahoo.c om> wrote in message news:1138312667 .909488.130680@ o13g2000cwo.goo glegroups.com.. .[color=blue]
    >I would like to connect to an Oracle database. In python version 2.1 I
    > used the following code and it worked fine. When I run the code in
    > version 2.4 it says that the odbc moduled does not exist. How do you
    > connect to an Oracle database in v2.4?
    >
    > oradb=odbc.odbc ('oracle/scott/tiger')
    > stmt='select project_id from s_projects'
    > cur=oradb.curso r()
    > cur.execute(stm t)
    > for rec in cur.fetchall():
    > print rec[0]
    > cur.close()
    >
    > Thanks
    >[/color]



    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----

    Comment

    Working...