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. Working with data base

Working with data base

Scheduled Pinned Locked Moved C#
databasetutorial
7 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.
  • C Offline
    C Offline
    columbos14927
    wrote on last edited by
    #1

    Hello, Im doing a big final project that manages a dive shop. This application will have data base. What im looking for is some example of solution that works with data base(connect to DB , SQL , Query) that i can take and modify it for my needs. Thanks.

    P A 2 Replies Last reply
    0
    • C columbos14927

      Hello, Im doing a big final project that manages a dive shop. This application will have data base. What im looking for is some example of solution that works with data base(connect to DB , SQL , Query) that i can take and modify it for my needs. Thanks.

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

      I can offer you some insight into creating a Data Access Layer. DatabaseAccessor[^] There are many similar articles on here.

      S 1 Reply Last reply
      0
      • P PIEBALDconsult

        I can offer you some insight into creating a Data Access Layer. DatabaseAccessor[^] There are many similar articles on here.

        S Offline
        S Offline
        SledgeHammer01
        wrote on last edited by
        #3

        I understand that article is from 2007, but I'd completely disregard it. It was completely bad practice even "back then". Definitely is horrible practice today. Use a proper data access layer like EF, nHibernate, etc. At the very least, if you use barebones ADO.NET, you should not write queries in the C# code like that. Completely vulnerable to a script kiddie who knows SQL injection.

        P J S 3 Replies Last reply
        0
        • S SledgeHammer01

          I understand that article is from 2007, but I'd completely disregard it. It was completely bad practice even "back then". Definitely is horrible practice today. Use a proper data access layer like EF, nHibernate, etc. At the very least, if you use barebones ADO.NET, you should not write queries in the C# code like that. Completely vulnerable to a script kiddie who knows SQL injection.

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

          SledgeHammer01 wrote:

          Completely vulnerable to a script kiddie who knows SQL injection

          Bullshit -- it fully and easily supports parameters so there's no reason a developer has to leave himself open to that.

          SledgeHammer01 wrote:

          EF, nHibernate, etc

          And what do you think they do in the background? Exactly the same things I do. Everything has to go through a command and connection eventually; I cut out the middle man. Additionally, those tools may not support whatever database the OP has to use, whereas there is probably an ADO.net connector for it.

          1 Reply Last reply
          0
          • S SledgeHammer01

            I understand that article is from 2007, but I'd completely disregard it. It was completely bad practice even "back then". Definitely is horrible practice today. Use a proper data access layer like EF, nHibernate, etc. At the very least, if you use barebones ADO.NET, you should not write queries in the C# code like that. Completely vulnerable to a script kiddie who knows SQL injection.

            J Offline
            J Offline
            jschell
            wrote on last edited by
            #5

            SledgeHammer01 wrote:

            It was completely bad practice even "back then".

            Nonsense.

            SledgeHammer01 wrote:

            you should not write queries in the C# code like that. Completely vulnerable to a script kiddie who knows SQL injection.

            You and I must have completely different definitions of SQL injection then. I don't see anything in there that suggests anything at all like that.

            1 Reply Last reply
            0
            • S SledgeHammer01

              I understand that article is from 2007, but I'd completely disregard it. It was completely bad practice even "back then". Definitely is horrible practice today. Use a proper data access layer like EF, nHibernate, etc. At the very least, if you use barebones ADO.NET, you should not write queries in the C# code like that. Completely vulnerable to a script kiddie who knows SQL injection.

              S Offline
              S Offline
              Simon_Whale
              wrote on last edited by
              #6

              Most of the ORM providers are bult upon ADO.NET. but personally I dont think there is anything wrong with using ADO.NET, SQL Injection is only possible when there is a lack of parameterised queries.

              Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch

              1 Reply Last reply
              0
              • C columbos14927

                Hello, Im doing a big final project that manages a dive shop. This application will have data base. What im looking for is some example of solution that works with data base(connect to DB , SQL , Query) that i can take and modify it for my needs. Thanks.

                A Offline
                A Offline
                Abhinav S
                wrote on last edited by
                #7

                Just do a search in the articles section on this site. There are a number of good samples and articles here.

                WP7.5 Apps - XKCD | Calvin | SMBC | Sound Meter | Speed Dial

                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