trouble with import odbc

wryder at taz.cs.wcupa.edu wryder at taz.cs.wcupa.edu
Wed Dec 12 17:20:24 EST 2001


Thanks for the reply.  As I posted later, I got it working.  Would just like
to mention that because an error message is accurate doesn't mean its
helpful.  For example, say you want to buy a house.  Is knowing that a house
is for sale enough to help you out?  Or do you need to know more?  Even if my
mistake was an ametuerish one, none-the-less a simple indication of the path
and object that the script was attempting to load would have saved me a
couple hours.

-Bill


>First you have to go into the ODBC settings (Start Menu | Settings |
Control
>Panel, double click on ODBC) and create a System DSN pointing to the
>database you want to use. This will require you to have a PostgreSQL ODBC
>driver loaded, whcih I assume you've done.
>
>Then you should call
>
>    conn = odbc.odbc("DSNName")
>
>to make the connection to your database. The error message is an exact
>description of what you are doing wrong. You would get the same thing if
you
>wrote
>
>    import sys
>    sys("Hello")
>
>regards
> Steve
>--
>http://www.holdenweb.com/
>
>
>
>
>




 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse at newsone.net



More information about the Python-list mailing list