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. The Lounge
  3. How to access SQL Server 2000 databases?

How to access SQL Server 2000 databases?

Scheduled Pinned Locked Moved The Lounge
databasesql-serversysadmintutorialquestion
8 Posts 5 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.
  • M Offline
    M Offline
    Mario M
    wrote on last edited by
    #1

    Hi, Does anyone knows which is the best method to access (read/write) an SQL Server 2000 database ? thanks.

    S V Z 3 Replies Last reply
    0
    • M Mario M

      Hi, Does anyone knows which is the best method to access (read/write) an SQL Server 2000 database ? thanks.

      S Offline
      S Offline
      Simon Brown
      wrote on last edited by
      #2

      For portability I would suggest ODBC - more overhead initially, it will pay off in the long run when your 'management' decide to change the corporate standard to ORACLE / SYBASE / MYSQL / Cheese. :-O Old Simon HB9DRV

      M 1 Reply Last reply
      0
      • S Simon Brown

        For portability I would suggest ODBC - more overhead initially, it will pay off in the long run when your 'management' decide to change the corporate standard to ORACLE / SYBASE / MYSQL / Cheese. :-O Old Simon HB9DRV

        M Offline
        M Offline
        Mario M
        wrote on last edited by
        #3

        Hi, Thanks for your suggestion, but I don't think we will move to unix systems since the entire thing is running on Windows. What about MDAC ?, we need to implement the database access only into Win32 applications, not on webservers. The application takes customers registrations and newsletter subscribtions from Formmail.pl -> E-Mail (Outlook) and writes them to the SQL server. Then the application sends from the database e-mails, notifications, etc...

        1 Reply Last reply
        0
        • M Mario M

          Hi, Does anyone knows which is the best method to access (read/write) an SQL Server 2000 database ? thanks.

          V Offline
          V Offline
          Vagif Abilov
          wrote on last edited by
          #4

          Go for OLE DB, i.e. use either OLE DB provider directly or via ADO (which is a layer on the top of OLE DB). As long as you stay with Win32, you can easily change database vendor without affecting your code. ODBC products are considered legacy (at least SQL Server ODBC driver). Good luck! Vagif Win32/ATL/MFC Developer Oslo, Norway

          M N 2 Replies Last reply
          0
          • V Vagif Abilov

            Go for OLE DB, i.e. use either OLE DB provider directly or via ADO (which is a layer on the top of OLE DB). As long as you stay with Win32, you can easily change database vendor without affecting your code. ODBC products are considered legacy (at least SQL Server ODBC driver). Good luck! Vagif Win32/ATL/MFC Developer Oslo, Norway

            M Offline
            M Offline
            Mario M
            wrote on last edited by
            #5

            Hi, Thanks, I think ADO is ok, but I hate those ActiveX controls, they are extremly slow.

            1 Reply Last reply
            0
            • V Vagif Abilov

              Go for OLE DB, i.e. use either OLE DB provider directly or via ADO (which is a layer on the top of OLE DB). As long as you stay with Win32, you can easily change database vendor without affecting your code. ODBC products are considered legacy (at least SQL Server ODBC driver). Good luck! Vagif Win32/ATL/MFC Developer Oslo, Norway

              N Offline
              N Offline
              Not Active
              wrote on last edited by
              #6

              Agreed. OLE DB is the way to go. If you are coding in C++ I wouldn't even consider ADO. ODBC is legacy that will be left zealots and comp sci students.

              1 Reply Last reply
              0
              • M Mario M

                Hi, Does anyone knows which is the best method to access (read/write) an SQL Server 2000 database ? thanks.

                Z Offline
                Z Offline
                Zyxil
                wrote on last edited by
                #7

                Mario, The choice of what data access method to use is a bit complicated. Based on your comments in this thread, it sounds like you are new to this type of programming, so I will explain a bit. If you are not, I apologise. There are several methods to access a database. Some old, some new. ODBC - Open Database Connectivity is several years old. It was the first real standardization for database connectivity. It defined the API that a database manufacturer had to implement in their driver to be ODBC compliant. This is a venerable and very useful technology, but is a bit long in the tooth. OLE DB - (the acronym doesn't matter) is the successor to ODBC with a greatly expanded scope. OLE DB is the foundation piece of MS's goal of moving towards Universal Data Access. OLE DB can somewhat easily access many types of data, not just relational db systems like SQL or IBM DB2, but things like text files, the exchange repository, the SMS database, etc... Generally, OLE DB programming is in C/C++ and amongst the hardcore on this site, is the access method of choice. (I haven't had the guts to tackle it yet.) ADO - ActiveX Data Objects (the X is silent) is not an ActiveX control. ADO started out as a thin wrapper around OLE DB for VB programmers, but as time has marched on, it became much more feature laden than OLE DB. For ease of use, ADO is the way to go. The cornerstone of RAD (Rapid Application Development), ADO had made MS billions of dollars in OS sales, Visual Studio sales, etc.. ADO is (arguably) what made VB mega-popular. MDAC - Microsoft Data Access Compoents is not a data access method at all. It is the distribution package for all of the above methods. The versioning of MDAC describes what level of features and compatibility are available for these access methods. For example, MDAC 2.5 shipped with Windows 2000 (it was broken, but we'll ignore that for now...). When working with data access developers, saying the MDAC version that you are working with is a shorthand way of saying what OS and patches, what feature set, what coding methods, etc. that you are using. All that said, if you are working in VB, use ADO. If you are working in C++ use OLE DB. -John

                M 1 Reply Last reply
                0
                • Z Zyxil

                  Mario, The choice of what data access method to use is a bit complicated. Based on your comments in this thread, it sounds like you are new to this type of programming, so I will explain a bit. If you are not, I apologise. There are several methods to access a database. Some old, some new. ODBC - Open Database Connectivity is several years old. It was the first real standardization for database connectivity. It defined the API that a database manufacturer had to implement in their driver to be ODBC compliant. This is a venerable and very useful technology, but is a bit long in the tooth. OLE DB - (the acronym doesn't matter) is the successor to ODBC with a greatly expanded scope. OLE DB is the foundation piece of MS's goal of moving towards Universal Data Access. OLE DB can somewhat easily access many types of data, not just relational db systems like SQL or IBM DB2, but things like text files, the exchange repository, the SMS database, etc... Generally, OLE DB programming is in C/C++ and amongst the hardcore on this site, is the access method of choice. (I haven't had the guts to tackle it yet.) ADO - ActiveX Data Objects (the X is silent) is not an ActiveX control. ADO started out as a thin wrapper around OLE DB for VB programmers, but as time has marched on, it became much more feature laden than OLE DB. For ease of use, ADO is the way to go. The cornerstone of RAD (Rapid Application Development), ADO had made MS billions of dollars in OS sales, Visual Studio sales, etc.. ADO is (arguably) what made VB mega-popular. MDAC - Microsoft Data Access Compoents is not a data access method at all. It is the distribution package for all of the above methods. The versioning of MDAC describes what level of features and compatibility are available for these access methods. For example, MDAC 2.5 shipped with Windows 2000 (it was broken, but we'll ignore that for now...). When working with data access developers, saying the MDAC version that you are working with is a shorthand way of saying what OS and patches, what feature set, what coding methods, etc. that you are using. All that said, if you are working in VB, use ADO. If you are working in C++ use OLE DB. -John

                  M Offline
                  M Offline
                  Mario M
                  wrote on last edited by
                  #8

                  Hi, I have over 10 years experience with VC++, since it's first release. I know what COM/DCOM/ATL/SQL stands for, but I did not worked with SQL since last year and I still used it only ocasional. I made a simple application with the ActiveX controls, but the initializations and many other tasks are very slow with these controls, also they are somewhat limited and I don't like ActiveX at all. I heard that OLE DB is hard to use, and ODBC is seems a little bit old. If OLE DB will be supported by Microsoft in the future maybe that will be my choice, I don't want to learn something which will be not supported any more in a 1-2 years as Microsoft used to do. Thanks for the information, it was very useful in my decision. :cool:

                  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