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. Database & SysAdmin
  3. Database
  4. OLEdb & SQL with VC6 --> Help me please

OLEdb & SQL with VC6 --> Help me please

Scheduled Pinned Locked Moved Database
databasecomsysadminhelptutorial
4 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.
  • D Offline
    D Offline
    Dels
    wrote on last edited by
    #1

    Howdy, I built an app that used ODBC to write to an SQL database. The client has just turned around and said that they wish to use OLEdb connection strings to tell my app where the server is (instead of ODBC DSNs). Everything I've found on using OLEDB to access databases, is a whole pile of COM interface stuff with no real world examples. A far cry from the 'CDatabase' simplicity I'm used to. Can anybody help me with this ? All I need to do is to write some data via INSERT statements and do a few SELECT statements. I'm looking for some sample code or a tutorial with "real world" examples. Actually, anything that will help me do this in the few hours I have available to change my code. Thanks to anybody who can help. Damian Del Campo

    C 1 Reply Last reply
    0
    • D Dels

      Howdy, I built an app that used ODBC to write to an SQL database. The client has just turned around and said that they wish to use OLEdb connection strings to tell my app where the server is (instead of ODBC DSNs). Everything I've found on using OLEDB to access databases, is a whole pile of COM interface stuff with no real world examples. A far cry from the 'CDatabase' simplicity I'm used to. Can anybody help me with this ? All I need to do is to write some data via INSERT statements and do a few SELECT statements. I'm looking for some sample code or a tutorial with "real world" examples. Actually, anything that will help me do this in the few hours I have available to change my code. Thanks to anybody who can help. Damian Del Campo

      C Offline
      C Offline
      Carlos Antollini
      wrote on last edited by
      #2

      Use You can find good samples. If you want I can help you with some code.... best Regards Carlos Antollini. www.wanakostudios.com Sonork ID 100.10529 cantollini

      D 1 Reply Last reply
      0
      • C Carlos Antollini

        Use You can find good samples. If you want I can help you with some code.... best Regards Carlos Antollini. www.wanakostudios.com Sonork ID 100.10529 cantollini

        D Offline
        D Offline
        Dels
        wrote on last edited by
        #3

        Howdy, I downloaded you classes and was using them quite successfully. *However*, I had to convert my app to UNICODE as the clients require this. Since I've done that, I can't find any way of passing a connection to the CADODatabase. Open method simply doesn't like what I'm passing it (& I'm pressuming all methods will be the same). I've tried creating a char string and passing that to the database open function but it simply won't work either. All I get is an error message -> CADODataBase Error Code:80004005 Code meaning: Unspecified error Source:||||||||||||||| Description:|||||||||||||| Since I'm now passing it the same thing as I was before (char *) it should work, the fact that it doesn't makes me think that UNICODE must affect an include file that the ADO classes depend on in some way. Do you know how I can get around this ?????? Thanks, Damian Del Campo

        D 1 Reply Last reply
        0
        • D Dels

          Howdy, I downloaded you classes and was using them quite successfully. *However*, I had to convert my app to UNICODE as the clients require this. Since I've done that, I can't find any way of passing a connection to the CADODatabase. Open method simply doesn't like what I'm passing it (& I'm pressuming all methods will be the same). I've tried creating a char string and passing that to the database open function but it simply won't work either. All I get is an error message -> CADODataBase Error Code:80004005 Code meaning: Unspecified error Source:||||||||||||||| Description:|||||||||||||| Since I'm now passing it the same thing as I was before (char *) it should work, the fact that it doesn't makes me think that UNICODE must affect an include file that the ADO classes depend on in some way. Do you know how I can get around this ?????? Thanks, Damian Del Campo

          D Offline
          D Offline
          Dels
          wrote on last edited by
          #4

          Sorry about that last comment, "my bad". I won't tell you what the problem was as its rather embarassing. Sorry again. Damian

          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