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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Stored Procedure

Stored Procedure

Scheduled Pinned Locked Moved C#
databasecsharpsql-serverannouncement
8 Posts 4 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.
  • A Offline
    A Offline
    ayuba asia
    wrote on last edited by
    #1

    I have a application that has is develop using c# B4 this all my data processing is done thourgh the tsql statment, now i want to switch the thing to stored procedure.. 1.) but my management wnt to know is they any way we can hide the code in stored from the database administrator like the 1 in the trigger where we can encrypt the trigger.. 2.) one more thing can we populate the stored procedure from c#.. so every update i will create 1 EXE for them to run and i will update the stored procedure without using any sql util... thanks... Jalil Jalil

    V C R 3 Replies Last reply
    0
    • A ayuba asia

      I have a application that has is develop using c# B4 this all my data processing is done thourgh the tsql statment, now i want to switch the thing to stored procedure.. 1.) but my management wnt to know is they any way we can hide the code in stored from the database administrator like the 1 in the trigger where we can encrypt the trigger.. 2.) one more thing can we populate the stored procedure from c#.. so every update i will create 1 EXE for them to run and i will update the stored procedure without using any sql util... thanks... Jalil Jalil

      V Offline
      V Offline
      Vikram A Punathambekar
      wrote on last edited by
      #2

      1. I'm sorry, I don't follow you. Are you trying to encrypt the contents of the database? If so, you can a) encrypt the contents before you store them in the database and/or b) restrict access to the database. 2. Yes, you can use stored procedures from C#. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconintroductiontodatacommandobjectsinvisualstudio.asp looks useful. HTH. :) Cheers, Vikram.


      "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.

      A 1 Reply Last reply
      0
      • A ayuba asia

        I have a application that has is develop using c# B4 this all my data processing is done thourgh the tsql statment, now i want to switch the thing to stored procedure.. 1.) but my management wnt to know is they any way we can hide the code in stored from the database administrator like the 1 in the trigger where we can encrypt the trigger.. 2.) one more thing can we populate the stored procedure from c#.. so every update i will create 1 EXE for them to run and i will update the stored procedure without using any sql util... thanks... Jalil Jalil

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        Abdul Jalil Mohamed wrote:

        we can hide the code in stored from the database administrator like the 1 in the trigger where we can encrypt the trigger

        Yes, you can encrypt stored procedures.

        Abdul Jalil Mohamed wrote:

        can we populate the stored procedure from c#..

        Yes, you can put your creation script in a SqlCommand object and ExecuteNonQuery() Does this help?


        My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

        A 1 Reply Last reply
        0
        • C Colin Angus Mackay

          Abdul Jalil Mohamed wrote:

          we can hide the code in stored from the database administrator like the 1 in the trigger where we can encrypt the trigger

          Yes, you can encrypt stored procedures.

          Abdul Jalil Mohamed wrote:

          can we populate the stored procedure from c#..

          Yes, you can put your creation script in a SqlCommand object and ExecuteNonQuery() Does this help?


          My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

          A Offline
          A Offline
          ayuba asia
          wrote on last edited by
          #4

          how do we encrypt stored procedure an example will be gooo thanks fot the reply

          C 1 Reply Last reply
          0
          • V Vikram A Punathambekar

            1. I'm sorry, I don't follow you. Are you trying to encrypt the contents of the database? If so, you can a) encrypt the contents before you store them in the database and/or b) restrict access to the database. 2. Yes, you can use stored procedures from C#. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconintroductiontodatacommandobjectsinvisualstudio.asp looks useful. HTH. :) Cheers, Vikram.


            "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.

            A Offline
            A Offline
            ayuba asia
            wrote on last edited by
            #5

            i'm trying t exncrypt the code inside stored procedure. so that when anyone open the stored procedure they can not read it or is the any where we can prevent the user from access the stored procedure even administratr cannt see the code..

            1 Reply Last reply
            0
            • A ayuba asia

              how do we encrypt stored procedure an example will be gooo thanks fot the reply

              C Offline
              C Offline
              Colin Angus Mackay
              wrote on last edited by
              #6

              See the documentation for CREATE PROCEDURE[^]


              My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

              A 1 Reply Last reply
              0
              • C Colin Angus Mackay

                See the documentation for CREATE PROCEDURE[^]


                My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

                A Offline
                A Offline
                ayuba asia
                wrote on last edited by
                #7

                Thanks guys this really help me thanks a lot

                1 Reply Last reply
                0
                • A ayuba asia

                  I have a application that has is develop using c# B4 this all my data processing is done thourgh the tsql statment, now i want to switch the thing to stored procedure.. 1.) but my management wnt to know is they any way we can hide the code in stored from the database administrator like the 1 in the trigger where we can encrypt the trigger.. 2.) one more thing can we populate the stored procedure from c#.. so every update i will create 1 EXE for them to run and i will update the stored procedure without using any sql util... thanks... Jalil Jalil

                  R Offline
                  R Offline
                  Russell Jones
                  wrote on last edited by
                  #8

                  you can declare your SQL Stored procs using the WITH ENCRYPTION statement, this will encrypt them in SysComments and they should execute fine. I have never tried using this but i have it on good authority that it works. Using WMI for SQL server you should be able to create stored procedures; create a management object and the execute your SP text using it. HTH Russ

                  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