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. New With Visual C++

New With Visual C++

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialcsharpdatabasevisual-studio
4 Posts 3 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.
  • U Offline
    U Offline
    Unplugged
    wrote on last edited by
    #1

    I'm new using Visual Studio, but I have done work before using C++ on Unix based systems. Is there a site that I can go to that can give me a run through on how to write out to a database? Or even just and over all guide on how to use the visual end and database connectivity? :confused: I was able to pick my datasource and my tables and everything, but i don't know how to access or write to them. And for an added bonus the visual studio I have, is missing it's help files. :(( Any help will be great. I love the faces on here. :-D ICXC NIKA

    R 1 Reply Last reply
    0
    • U Unplugged

      I'm new using Visual Studio, but I have done work before using C++ on Unix based systems. Is there a site that I can go to that can give me a run through on how to write out to a database? Or even just and over all guide on how to use the visual end and database connectivity? :confused: I was able to pick my datasource and my tables and everything, but i don't know how to access or write to them. And for an added bonus the visual studio I have, is missing it's help files. :(( Any help will be great. I love the faces on here. :-D ICXC NIKA

      R Offline
      R Offline
      RuiSantiago
      wrote on last edited by
      #2

      You can execute SQL commands...like this #import "c:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "EndOfFile") _bstr_t strConn("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=yourdatabase.mdb"); _ConnectionPtr pCn("ADODB.Connection"); kl.Format("INSERT INTO ...); pCn->Open(strConn, "", "", adConnectUnspecified); pCn->Execute((_bstr_t)kl ,NULL, adCmdText); pCn->Close(); i hope this helps

      U 1 Reply Last reply
      0
      • R RuiSantiago

        You can execute SQL commands...like this #import "c:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "EndOfFile") _bstr_t strConn("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=yourdatabase.mdb"); _ConnectionPtr pCn("ADODB.Connection"); kl.Format("INSERT INTO ...); pCn->Open(strConn, "", "", adConnectUnspecified); pCn->Execute((_bstr_t)kl ,NULL, adCmdText); pCn->Close(); i hope this helps

        U Offline
        U Offline
        Unplugged
        wrote on last edited by
        #3

        any idea how I could run a sybase stored procedure from there? for example. I have an array for names. names[]. I want to pass the array into a sybase stored procedure within my database called storenames. any idea on how I could do that? ICXC NIKA

        L 1 Reply Last reply
        0
        • U Unplugged

          any idea how I could run a sybase stored procedure from there? for example. I have an array for names. names[]. I want to pass the array into a sybase stored procedure within my database called storenames. any idea on how I could do that? ICXC NIKA

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          You could always use ODBC. There are many simple wrapper classes that make it very painless to do. I have been using a set of ODBC wrappers for many years now and have had no problems with sybase, oracle, MSSQL, Access, etc. Additionally, if you are just executing statements/sprocs and using fwd only result set fetching, odbc is a little faster than using ATL/OLEDB. If you need wrapper classes, send me an email and I can set you up.

          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