[DB-SIG] MS Access problem (no subject)

M.-A. Lemburg mal@lemburg.com
Thu, 23 Nov 2000 10:14:03 +0100


bimal shah wrote:
> 
> Dear friends,
>        i was executing the following prog:
> 
> # \user\local\bin\python
> 
> import dbi, odbc     # ODBC modules
> 
> try:
>         s = odbc.odbc('bimal/bimal/bimal')
> # i kept system DSN=bimal and in advanced settings
> # login=bimal  & password=bimal
> 
>         cur = s.cursor()
>         cur.execute('select * from bimal1')
>         print cur.description
>         for tup in cur.description:
>                 print tup[0],
>         print
>         while 1:
>                 rec = cur.fetchmany(10)
>                 if not rec: break
>                 print rec
> except NameError,e:
>         print 'error ', e, 'undefined'
> 
> i am getting follwing traceback:
> 
> Traceback (most recent call last):
>   File "d:\python20\pythonwin\pywin\framework\scriptutils.py", line 301, in
> RunScript
>     exec codeObject in __main__.__dict__
>   File "D:\Python20\win32\python fiels\dbtest.py", line 10, in ?
>     s = odbc.odbc('bimal/bimal/bimal')
> dbi.operation-error: [Microsoft][ODBC Microsoft Access Driver]General error
> Not enough information to connect to this DSN with SQLConnect.   Use
> SQLDriverConnect. in LOGIN
> >>>

Have you tried the same thing with user id and password
as parameters to .odbc() ?

If the problem persists, you must be using some kind of special
setup which can only be dealt with using SQLDriverConnect.
I that case, I'd suggest switching to mxODBC which you can
download from my Python Pages.
 
>          so please guide me for this problem. I am feeling that
> it is not importing my odbc.pyd properly.

I don't think this is the problem: it's the MS ODBC manager
that's generating the error message, so the connection is there.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company:                                        http://www.egenix.com/
Consulting:                                    http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/