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. ATL / WTL / STL
  4. need help in ADO VC++

need help in ADO VC++

Scheduled Pinned Locked Moved ATL / WTL / STL
helpc++
5 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
    GANsJob
    wrote on last edited by
    #1

    I used a table named FDetails with 4 text fields and a datetime field named date in MSaccess when insert values into table ising ado recordset obj I receive some syntax error recordset->Open("INSERT INTO FDetails(name,path,duration,volume,date) VALUES('hello','location','duration','vol','12/12/2000')",connection.GetInterfacePtr(), ADODB::adOpenForwardOnly,ADODB::adLockReadOnly, ADODB::adCmdText); any one know inserting date into table

    M 1 Reply Last reply
    0
    • G GANsJob

      I used a table named FDetails with 4 text fields and a datetime field named date in MSaccess when insert values into table ising ado recordset obj I receive some syntax error recordset->Open("INSERT INTO FDetails(name,path,duration,volume,date) VALUES('hello','location','duration','vol','12/12/2000')",connection.GetInterfacePtr(), ADODB::adOpenForwardOnly,ADODB::adLockReadOnly, ADODB::adCmdText); any one know inserting date into table

      M Offline
      M Offline
      Milton Karimbekallil
      wrote on last edited by
      #2

      'Date' is a reserved word in MS Access Try changing the column name 'Date' to 'Date1' cheers.. Milton KB

      G 1 Reply Last reply
      0
      • M Milton Karimbekallil

        'Date' is a reserved word in MS Access Try changing the column name 'Date' to 'Date1' cheers.. Milton KB

        G Offline
        G Offline
        GANsJob
        wrote on last edited by
        #3

        inserting problem is over but now while retvieve the date I got no. of days form 1900 to till date &time in mill or micro sec. how to get the time in mm/dd/yyyy hh:mm:ss format

        M 1 Reply Last reply
        0
        • G GANsJob

          inserting problem is over but now while retvieve the date I got no. of days form 1900 to till date &time in mill or micro sec. how to get the time in mm/dd/yyyy hh:mm:ss format

          M Offline
          M Offline
          Milton Karimbekallil
          wrote on last edited by
          #4

          use the Format function in the select statement: eg: select Format (#date1#, "Short Date") from ur_table //would return '17/04/2004' select Format (#date1#, "Long Date") from ur_table //would return 'April 17, 2004' select Format (#date1#, "yyyy/mm/dd") from ur_table //would return '2004/04/17' go thru http://www.techonthenet.com/access/functions/date/format.php[^] for more details. cheers....Milton KB

          G 1 Reply Last reply
          0
          • M Milton Karimbekallil

            use the Format function in the select statement: eg: select Format (#date1#, "Short Date") from ur_table //would return '17/04/2004' select Format (#date1#, "Long Date") from ur_table //would return 'April 17, 2004' select Format (#date1#, "yyyy/mm/dd") from ur_table //would return '2004/04/17' go thru http://www.techonthenet.com/access/functions/date/format.php[^] for more details. cheers....Milton KB

            G Offline
            G Offline
            GANsJob
            wrote on last edited by
            #5

            thank u its working

            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