[mod_python] Query in Connection With Access Database

python eager python_eager at yahoo.com
Mon Jan 2 23:51:02 EST 2006


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060102/c6851894/attachment.html


More information about the Mod_python mailing list