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. Intearact with DB ?

Intearact with DB ?

Scheduled Pinned Locked Moved C#
databasequestion
15 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.
  • H Hum Dum

    Without using SqlCommand or CommandBuilder object, Is it possible to interact with database? :confused:

    P Offline
    P Offline
    Pete OHanlon
    wrote on last edited by
    #2

    Yes, you could always use something like ODBCCommand, or is that not what you're asking? If you are using SQL Server, I'd use SqlCommand over the ODBC equivalent anyday because it uses the native SQL driver, rather than having to go via the ODBC transport.

    I'm not a stalker, I just know things. Oh by the way, you're out of milk.

    Forgive your enemies - it messes with their heads

    My blog | My articles | MoXAML PowerToys | Onyx

    H 1 Reply Last reply
    0
    • H Hum Dum

      Without using SqlCommand or CommandBuilder object, Is it possible to interact with database? :confused:

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #3

      Sounds like a test question. Certainly you can do without CommandBuilder, but ADO.net requires a Command, even if it's buried in a DataAdapter.

      H 1 Reply Last reply
      0
      • P Pete OHanlon

        Yes, you could always use something like ODBCCommand, or is that not what you're asking? If you are using SQL Server, I'd use SqlCommand over the ODBC equivalent anyday because it uses the native SQL driver, rather than having to go via the ODBC transport.

        I'm not a stalker, I just know things. Oh by the way, you're out of milk.

        Forgive your enemies - it messes with their heads

        My blog | My articles | MoXAML PowerToys | Onyx

        H Offline
        H Offline
        Hum Dum
        wrote on last edited by
        #4

        I am not specific to sql only ! What i want to know without using Oledb, Odbc, Sql, SqlClient namespace Is it possible to interact with DB ? Now don't tell you can create your own library from scratch like fraework have :doh: May be i am asking worng ? ( As i don't exactly recall ? ) But it is something like same as my initial post :confused:

        P 1 Reply Last reply
        0
        • P PIEBALDconsult

          Sounds like a test question. Certainly you can do without CommandBuilder, but ADO.net requires a Command, even if it's buried in a DataAdapter.

          H Offline
          H Offline
          Hum Dum
          wrote on last edited by
          #5

          PIEBALDconsult wrote:

          Sounds like a test question.

          Yup it is !

          PIEBALDconsult wrote:

          even if it's buried in a DataAdapter.

          That i know (and is my intial thought) also Odbc, Oledb namespaces. But without all these namspaces. Is there any way ?

          P P R 3 Replies Last reply
          0
          • H Hum Dum

            I am not specific to sql only ! What i want to know without using Oledb, Odbc, Sql, SqlClient namespace Is it possible to interact with DB ? Now don't tell you can create your own library from scratch like fraework have :doh: May be i am asking worng ? ( As i don't exactly recall ? ) But it is something like same as my initial post :confused:

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #6

            Hum Dum wrote:

            May be i am asking worng ?

            Pretty much. ADO.net relies on derived versions of Connection, Command, and other sundry classes. Each database -- Sql Server, Oracle, MySql, Ingres, Firebird, Cache, etc. -- has its particular classes in some namespace; if you want to use ADO.net, you will need to use the classes in the appropriate namespace. Or use something (e.g. Linq) that hides the ADO.net so you don't see it even though you're using it. Or don't use ADO.net -- you can use older database access techniques, but ADO.net is far superior to any others I have used.

            1 Reply Last reply
            0
            • H Hum Dum

              PIEBALDconsult wrote:

              Sounds like a test question.

              Yup it is !

              PIEBALDconsult wrote:

              even if it's buried in a DataAdapter.

              That i know (and is my intial thought) also Odbc, Oledb namespaces. But without all these namspaces. Is there any way ?

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #7

              Hum Dum wrote:

              But without all these namspaces. Is there any way ?

              How do you think we did it before ADO.net came along (and lifted us from the dark ages)?

              P 1 Reply Last reply
              0
              • H Hum Dum

                PIEBALDconsult wrote:

                Sounds like a test question.

                Yup it is !

                PIEBALDconsult wrote:

                even if it's buried in a DataAdapter.

                That i know (and is my intial thought) also Odbc, Oledb namespaces. But without all these namspaces. Is there any way ?

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #8

                Hum Dum wrote:

                But without all these namspaces. Is there any way ?

                Well, you could always write your own protocol but that's time consuming, prone to errors and a bit, how shall I put it, boneheaded stupid.

                I'm not a stalker, I just know things. Oh by the way, you're out of milk.

                Forgive your enemies - it messes with their heads

                My blog | My articles | MoXAML PowerToys | Onyx

                1 Reply Last reply
                0
                • P PIEBALDconsult

                  Hum Dum wrote:

                  But without all these namspaces. Is there any way ?

                  How do you think we did it before ADO.net came along (and lifted us from the dark ages)?

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #9

                  I don't know about you, but I sacrificed chickens and did the hoodoo dance.

                  I'm not a stalker, I just know things. Oh by the way, you're out of milk.

                  Forgive your enemies - it messes with their heads

                  My blog | My articles | MoXAML PowerToys | Onyx

                  P 1 Reply Last reply
                  0
                  • H Hum Dum

                    PIEBALDconsult wrote:

                    Sounds like a test question.

                    Yup it is !

                    PIEBALDconsult wrote:

                    even if it's buried in a DataAdapter.

                    That i know (and is my intial thought) also Odbc, Oledb namespaces. But without all these namspaces. Is there any way ?

                    R Offline
                    R Offline
                    Rajesh R Subramanian
                    wrote on last edited by
                    #10

                    Hum Dum wrote:

                    But without all these namspaces.Is there any way ?

                    Those namespaces exist to serve you that very purpose. If you don't want to use any of those, AND you don't want to write your own stuff from scratch, then the only way is to p/invoke into the beast and use one of the things it has to offer. Then it would be pointless to use .NET.

                    "Real men drive manual transmission" - Rajesh.

                    1 Reply Last reply
                    0
                    • H Hum Dum

                      Without using SqlCommand or CommandBuilder object, Is it possible to interact with database? :confused:

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

                      Hum Dum wrote:

                      Without using SqlCommand or CommandBuilder object, Is it possible to interact with database?

                      Yes, by capturing the output of SQLCMD/Isql.exe for example.

                      I are Troll :suss:

                      P 1 Reply Last reply
                      0
                      • L Lost User

                        Hum Dum wrote:

                        Without using SqlCommand or CommandBuilder object, Is it possible to interact with database?

                        Yes, by capturing the output of SQLCMD/Isql.exe for example.

                        I are Troll :suss:

                        P Offline
                        P Offline
                        PIEBALDconsult
                        wrote on last edited by
                        #12

                        I hadn't thought of that. MySql also has a command-line utility.

                        P 1 Reply Last reply
                        0
                        • P Pete OHanlon

                          I don't know about you, but I sacrificed chickens and did the hoodoo dance.

                          I'm not a stalker, I just know things. Oh by the way, you're out of milk.

                          Forgive your enemies - it messes with their heads

                          My blog | My articles | MoXAML PowerToys | Onyx

                          P Offline
                          P Offline
                          PIEBALDconsult
                          wrote on last edited by
                          #13

                          Ah, PRO*C, I did that too.

                          1 Reply Last reply
                          0
                          • P PIEBALDconsult

                            I hadn't thought of that. MySql also has a command-line utility.

                            P Offline
                            P Offline
                            Pete OHanlon
                            wrote on last edited by
                            #14

                            So does 'orrible.

                            I'm not a stalker, I just know things. Oh by the way, you're out of milk.

                            Forgive your enemies - it messes with their heads

                            My blog | My articles | MoXAML PowerToys | Onyx

                            1 Reply Last reply
                            0
                            • H Hum Dum

                              Without using SqlCommand or CommandBuilder object, Is it possible to interact with database? :confused:

                              OriginalGriffO Offline
                              OriginalGriffO Offline
                              OriginalGriff
                              wrote on last edited by
                              #15

                              You could use LINQ to SQL[^]

                              Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."

                              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                              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