Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CDaoDatabase

CDaoDatabase

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Girish601
    wrote on last edited by
    #1

    Hi friends, I use above class and CDaoRecordset for writing into xls file. I set one button. on button event, i write following code CString Sql,Name,Addr; GetDlgItemText(IDC_NAME,Name); GetDlgItemText(IDC_ADDRESS,Addr); db.Open("Pis.xls"); Sql = "SELECT * FROM Pis"; recset.Open(CRecordset::forwardOnly,Sql,NULL); recset.AddNew(); recset.SetFieldValue("Name",(LPCSTR)Name); recset.SetFieldValue("Addr",(LPCSTR)Addr); recset.Update(); recset.Close(); db.Close(); } when I enter name and address and click on button, error message come could'nt open database. unrecognise database format friend kindly give me a reply. why i am not able to write and read data from xls Regards kedar Girish Software Developer

    K 1 Reply Last reply
    0
    • G Girish601

      Hi friends, I use above class and CDaoRecordset for writing into xls file. I set one button. on button event, i write following code CString Sql,Name,Addr; GetDlgItemText(IDC_NAME,Name); GetDlgItemText(IDC_ADDRESS,Addr); db.Open("Pis.xls"); Sql = "SELECT * FROM Pis"; recset.Open(CRecordset::forwardOnly,Sql,NULL); recset.AddNew(); recset.SetFieldValue("Name",(LPCSTR)Name); recset.SetFieldValue("Addr",(LPCSTR)Addr); recset.Update(); recset.Close(); db.Close(); } when I enter name and address and click on button, error message come could'nt open database. unrecognise database format friend kindly give me a reply. why i am not able to write and read data from xls Regards kedar Girish Software Developer

      K Offline
      K Offline
      kiran janaswamy
      wrote on last edited by
      #2

      did you specify the pis.xls path correctly? pls check the path of the xls file i mean db.open("path\\pis.xls") give path correctly and i hope it works correctly. cheers, uday. uday kiran

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups