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. Database & SysAdmin
  3. Database
  4. Stored Procedure

Stored Procedure

Scheduled Pinned Locked Moved Database
databasecsharpsql-serverannouncement
5 Posts 3 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

    C D 2 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

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

      Abdul Jalil Mohamed wrote:

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

      Yes, you can encrypt stored procedures

      Abdul Jalil Mohamed wrote:

      i will create 1 EXE for them to run and i will update the stored procedure without using any sql util

      Yes, you can create an exe that runs SQL against the database. You can do this by using the SqlCommand object in a .NET application and then ExecuteNonQuery() I have an example on my blog where the SQL Script is stored as a resource inside an EXE file then run against the database. You might find it useful: http://blogs.wdevs.com/colinangusmackay/archive/2004/10/15/857.aspx[^]


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

      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

        D Offline
        D Offline
        Daniel Santillanes
        wrote on last edited by
        #3

        1.) use WITH ENCRYPTION statement before AS --Stored procedure statements Do make sure to have a backup of the stored procedure somewhere since, you're not going to see that text once you applay the statement and close the editor. 2.) you can... create stored procedures from C#... theoretically yes, you can execute a SQL command with a CREATE PROCEDURE statement, and then use the SP. daniero

        C 1 Reply Last reply
        0
        • D Daniel Santillanes

          1.) use WITH ENCRYPTION statement before AS --Stored procedure statements Do make sure to have a backup of the stored procedure somewhere since, you're not going to see that text once you applay the statement and close the editor. 2.) you can... create stored procedures from C#... theoretically yes, you can execute a SQL command with a CREATE PROCEDURE statement, and then use the SP. daniero

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

          daniero wrote:

          theoretically yes

          It is not a theory, it is a fact. You can do this so long as you log on to the database as a user with ddl_admin, db_onwer or sysadmin privileges.


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

          D 1 Reply Last reply
          0
          • C Colin Angus Mackay

            daniero wrote:

            theoretically yes

            It is not a theory, it is a fact. You can do this so long as you log on to the database as a user with ddl_admin, db_onwer or sysadmin privileges.


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

            D Offline
            D Offline
            Daniel Santillanes
            wrote on last edited by
            #5

            Thanks for clearing that up. I need to write it down :doh: :). daniero

            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