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. Other Discussions
  3. The Weird and The Wonderful
  4. seeing a student code

seeing a student code

Scheduled Pinned Locked Moved The Weird and The Wonderful
databasesecurity
9 Posts 6 Posters 1 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.
  • K Offline
    K Offline
    kdgupta87
    wrote on last edited by
    #1

    my student write this code, and asking me why it is not working.

    String connectionString="Data Source=asd;Persist Security Info=True;User ID=system;Password=******;Unicode=True"
    SqlConnection sql = new SqlConnection(connectionString);
    sql.open();

    it takes me a gr8 time to explain why he cant give password value ****** in a cs codefile. he just got the connectionString from database properties and think ****** is password

    _ J M 3 Replies Last reply
    0
    • K kdgupta87

      my student write this code, and asking me why it is not working.

      String connectionString="Data Source=asd;Persist Security Info=True;User ID=system;Password=******;Unicode=True"
      SqlConnection sql = new SqlConnection(connectionString);
      sql.open();

      it takes me a gr8 time to explain why he cant give password value ****** in a cs codefile. he just got the connectionString from database properties and think ****** is password

      _ Offline
      _ Offline
      _Damian S_
      wrote on last edited by
      #2

      I thought you were hiding the password, then I read your explanation... :laugh: :laugh:

      Reminiscing just isn't what it used to be!! If you like cars, check out the Booger Mobile blog | If you feel generous - make a donation to Camp Quality!!

      1 Reply Last reply
      0
      • K kdgupta87

        my student write this code, and asking me why it is not working.

        String connectionString="Data Source=asd;Persist Security Info=True;User ID=system;Password=******;Unicode=True"
        SqlConnection sql = new SqlConnection(connectionString);
        sql.open();

        it takes me a gr8 time to explain why he cant give password value ****** in a cs codefile. he just got the connectionString from database properties and think ****** is password

        J Offline
        J Offline
        Jeroen De Dauw
        wrote on last edited by
        #3

        Bleh. Can I nominate how the whole database connection crap works in .Net as horror? I really don't like it...

        Jeroen De Dauw
        Blog ; Wiki

        K 1 Reply Last reply
        0
        • K kdgupta87

          my student write this code, and asking me why it is not working.

          String connectionString="Data Source=asd;Persist Security Info=True;User ID=system;Password=******;Unicode=True"
          SqlConnection sql = new SqlConnection(connectionString);
          sql.open();

          it takes me a gr8 time to explain why he cant give password value ****** in a cs codefile. he just got the connectionString from database properties and think ****** is password

          M Offline
          M Offline
          musefan
          wrote on last edited by
          #4

          By not working I assume you mean not compiling? due to the missing semi-colon :laugh: Besides, I would be more concerned about the hard-coded connection string and lack of error handling ;)

          Illogical thoughts make me ill

          K 1 Reply Last reply
          0
          • J Jeroen De Dauw

            Bleh. Can I nominate how the whole database connection crap works in .Net as horror? I really don't like it...

            Jeroen De Dauw
            Blog ; Wiki

            K Offline
            K Offline
            kdgupta87
            wrote on last edited by
            #5

            yeah, i know,but it was a database lab, they can choose there framework as they wish. i don't know why people like .net + oracle ,

            E 1 Reply Last reply
            0
            • M musefan

              By not working I assume you mean not compiling? due to the missing semi-colon :laugh: Besides, I would be more concerned about the hard-coded connection string and lack of error handling ;)

              Illogical thoughts make me ill

              K Offline
              K Offline
              kdgupta87
              wrote on last edited by
              #6

              no it was compiling i am the one who misplaced the semi-colon.

              1 Reply Last reply
              0
              • K kdgupta87

                yeah, i know,but it was a database lab, they can choose there framework as they wish. i don't know why people like .net + oracle ,

                E Offline
                E Offline
                Ed Nutting
                wrote on last edited by
                #7

                errmm....net? wats wrong with it exaclty...I mean I know that connecting to databases other than Microsoft Sequel Server is horrible but tbh I mostly use Microsoft Sequel Server and the Linq To Sql Class seems to make life incredibly easy..or has nobody noticed that new class yet? :P

                OriginalGriffO 1 Reply Last reply
                0
                • E Ed Nutting

                  errmm....net? wats wrong with it exaclty...I mean I know that connecting to databases other than Microsoft Sequel Server is horrible but tbh I mostly use Microsoft Sequel Server and the Linq To Sql Class seems to make life incredibly easy..or has nobody noticed that new class yet? :P

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

                  Connecting to databases other than MSSQL is not "horrible" - generally it is identical, but with different class names: MySqlConnection, or SqlCeConnection instead of SqlConnection and so forth. While it works well, the concept of SqlConnection and SqlCommand is visually difficult, needs to be encased in using blocks, and is prone to SQL Injection attacks if you don't do it properly. I agree that Linq to SQL does make this process easier, but it is another thing for people to learn - and not everybody does (I am only just started on learning the details of Linq myself, and I have been using .NET for a while now). I think what the complaint was about, was the use of Oracle as the DB when there are "better" alternatives rather than the use of SQL and .NET

                  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

                  K 1 Reply Last reply
                  0
                  • OriginalGriffO OriginalGriff

                    Connecting to databases other than MSSQL is not "horrible" - generally it is identical, but with different class names: MySqlConnection, or SqlCeConnection instead of SqlConnection and so forth. While it works well, the concept of SqlConnection and SqlCommand is visually difficult, needs to be encased in using blocks, and is prone to SQL Injection attacks if you don't do it properly. I agree that Linq to SQL does make this process easier, but it is another thing for people to learn - and not everybody does (I am only just started on learning the details of Linq myself, and I have been using .NET for a while now). I think what the complaint was about, was the use of Oracle as the DB when there are "better" alternatives rather than the use of SQL and .NET

                    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."

                    K Offline
                    K Offline
                    kdgupta87
                    wrote on last edited by
                    #9

                    and also setup oracle server in windows is hell of a job.

                    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