[mod_python] Query in Connection With Access Database

Nicolas Lehuen nicolas.lehuen at gmail.com
Tue Jan 3 02:02:50 EST 2006


I wouldn't like to state the obvious, but have you installed pywin32 ?

http://sourceforge.net/projects/pywin32/

Regards,
Nicolas

2006/1/3, python eager <python_eager at yahoo.com>:
> Hi
>    i got error while connecting datas with Ms-Access. I got the following
> error
>
> import win32com.client
> ImportError: No module named win32com.client
>
> My Code As Follows :
>
>     #CODE STARTS HERE
> import win32com.client
> engine = win32com.client.Dispatch("DAO.DBEngine.36")
> db=engine.OpenDatabase("C:\My Documents\Employee.mdb")
> rs = db.OpenRecordset("Employee")
> fields = rs.Fields
> def cycle(rs):
>     rs.MoveFirst()
>     while(rs.EOF==0):
>         for a in range(0,f.Count):
>             print f.Item(a)
>         rs.MoveNext()
> #END CODE
>
> Employee.mdb contains three fields
>  1. EmployeeNumber = number (primary key)
> 2. Employee Name = text
> 3. Salary  = number
>
> please give me the solution for this error. If you have sample code for this
> send me it will be useful for me. ( Data's retrieve from msaccess and also
> datas insert into msaccess ). Please send the solution.
>
> regards
> Python Eager
>
>
>  ________________________________
> Yahoo! Photos
>  Ring in the New Year with Photo Calendars. Add photos, events, holidays,
> whatever.
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>
>



More information about the Mod_python mailing list