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#
  4. Connection To DataBase

Connection To DataBase

Scheduled Pinned Locked Moved C#
databasesql-serversysadminhelpquestion
9 Posts 6 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.
  • T Offline
    T Offline
    Thaer Hamael
    wrote on last edited by
    #1

    Hi All Iam Using the SqlConnection To Connect To Sql Server 2005 And the connecte is Done . I wount to Connecte to Sql Server 2005 By Using OledbConnection Or ODBCConnection , My Quesion Is : how I Can Connecte to Sql Server 2005 With OLedbConnection Or ODBCConnection ? and it is a Write Connect ? Thanks For any body help me :rose:

    Thaer

    P V N 3 Replies Last reply
    0
    • T Thaer Hamael

      Hi All Iam Using the SqlConnection To Connect To Sql Server 2005 And the connecte is Done . I wount to Connecte to Sql Server 2005 By Using OledbConnection Or ODBCConnection , My Quesion Is : how I Can Connecte to Sql Server 2005 With OLedbConnection Or ODBCConnection ? and it is a Write Connect ? Thanks For any body help me :rose:

      Thaer

      P Offline
      P Offline
      Pedram Behroozi
      wrote on last edited by
      #2

      Take a look here[^], It might help you.

      Life is 5: 3 me, 1 you.

      T 1 Reply Last reply
      0
      • P Pedram Behroozi

        Take a look here[^], It might help you.

        Life is 5: 3 me, 1 you.

        T Offline
        T Offline
        Thaer Hamael
        wrote on last edited by
        #3

        Ok Thanks Mr Pedram Behroozi iwount To Know Can I Use The ODBCConnection Or OledbConnection to Connecte to Sql Server 2005 :rose:

        Thaer

        P N 2 Replies Last reply
        0
        • T Thaer Hamael

          Ok Thanks Mr Pedram Behroozi iwount To Know Can I Use The ODBCConnection Or OledbConnection to Connecte to Sql Server 2005 :rose:

          Thaer

          P Offline
          P Offline
          Pedram Behroozi
          wrote on last edited by
          #4

          I think so but OdbcConnection requires an ODBC driver for the database while OleDbConnection requires an OLEDB provider (it's suitable for MSAccess or Oracle). Why don't you use SqlConnection? It's more efficient when using SQL Server because there is no OLEDB provider in between.

          Life is 5: 3 me, 1 you.

          1 Reply Last reply
          0
          • T Thaer Hamael

            Ok Thanks Mr Pedram Behroozi iwount To Know Can I Use The ODBCConnection Or OledbConnection to Connecte to Sql Server 2005 :rose:

            Thaer

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

            Yes, you can use ODBCConnection to connect to a SQL Server database, however, you really should use SQlConnection, which is specifically written for SQL Server. ODBC connections are necessarily generic where as the SQL connection offers enhanced performance and capabilities specific to SQL Server.


            only two letters away from being an asset

            1 Reply Last reply
            0
            • T Thaer Hamael

              Hi All Iam Using the SqlConnection To Connect To Sql Server 2005 And the connecte is Done . I wount to Connecte to Sql Server 2005 By Using OledbConnection Or ODBCConnection , My Quesion Is : how I Can Connecte to Sql Server 2005 With OLedbConnection Or ODBCConnection ? and it is a Write Connect ? Thanks For any body help me :rose:

              Thaer

              V Offline
              V Offline
              Vimalsoft Pty Ltd
              wrote on last edited by
              #6

              OledbConnection is not For SQL SqlConnection is for SQL, ODBCConnection is Fine, but i suggest you use ODBCConnection

              Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

              G 1 Reply Last reply
              0
              • T Thaer Hamael

                Hi All Iam Using the SqlConnection To Connect To Sql Server 2005 And the connecte is Done . I wount to Connecte to Sql Server 2005 By Using OledbConnection Or ODBCConnection , My Quesion Is : how I Can Connecte to Sql Server 2005 With OLedbConnection Or ODBCConnection ? and it is a Write Connect ? Thanks For any body help me :rose:

                Thaer

                N Offline
                N Offline
                Nouman Bhatti
                wrote on last edited by
                #7

                Yes u can use OLeDBConnection & ODBCConnection to connect with SQL 2005 but .Net provided SQLConnection class to reduce the overhead while connecting with SQL using OLeDB or ODBC SQLConnection specifically built for SQL. So if you use SQLConnection it will save time and your application will be more efficient as compared if you ODBC or OLeDB

                1 Reply Last reply
                0
                • V Vimalsoft Pty Ltd

                  OledbConnection is not For SQL SqlConnection is for SQL, ODBCConnection is Fine, but i suggest you use ODBCConnection

                  Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

                  G Offline
                  G Offline
                  Giorgi Dalakishvili
                  wrote on last edited by
                  #8

                  Vuyiswa Maseko wrote:

                  i suggest you use ODBCConnection

                  You mean SqlConnection don't you?

                  Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

                  V 1 Reply Last reply
                  0
                  • G Giorgi Dalakishvili

                    Vuyiswa Maseko wrote:

                    i suggest you use ODBCConnection

                    You mean SqlConnection don't you?

                    Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

                    V Offline
                    V Offline
                    Vimalsoft Pty Ltd
                    wrote on last edited by
                    #9

                    Oops typo i meant that yes thanks

                    Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

                    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