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
M

Martin Arapovic

@Martin Arapovic
About
Posts
2
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Preventing all web methods from being viewed when browsing to a wcf service from the browser
    M Martin Arapovic

    Hi, I think that you need to set httpGetEnable to false.

    Vote and/or accept if it was useful for you... ---------------------------------------------- Martin Arapovic

    WCF and WF csharp wcf question

  • Little help needed with a Stored Proc
    M Martin Arapovic

    I think this is what you need. Just fill the blanks....

    -- =============================================
    -- Author:		Martin Arapovic
    -- Create date: 19.01.2011
    -- Description:	....
    -- =============================================
    CREATE PROCEDURE InsertUserData 
    	(
    		-- Add the parameters for the stored procedure here
    		-- Define needed parameters
    		-- Contact Input Data
    		@Street VARCHAR(50), 
    		@City VARCHAR(50), 
    		@State VARCHAR(50), 
    		@EmailAddress VARCHAR(50),
    		--Users Input Data
    		@UserName VARCHAR(25), 
    		@Password VARCHAR(25),
    		-- User Input Data
    		@FirstName varchar(50),
    		@LastName varchar(50),
    		@Sex varchar(50)
    		-- Add other paramas if you have any
    	)
    AS
    BEGIN
    	-- SET NOCOUNT ON added to prevent extra result sets from
    	-- interfering with SELECT statements.
    	SET NOCOUNT ON;
    
    	DECLARE @ContactID INT 
    	DECLARE @AuthenticationID INT 
    	
    	--
    	-- Note: This is only skeleton of the proc that you want to implement
    	
    	--
    	-- Do all in one transaction
    	
    	BEGIN TRANSACTION
    	
    	--
        -- Insert Contact data and get ContactID
        INSERT INTO [Contact]
               ([Street]
               ,[City]
               ,[State]
               ,[EmailAddress])
         VALUES
               (@Street
               ,@City
               ,@State
               ,@EmailAddress)
               
        -- GET CointactID 
        SET @ContactID = SCOPE_IDENTITY() 
         
        --
        -- Insert Authentication data and get AuthenticationID
        INSERT INTO [Authentication]
               ([UserName]
               ,[Password])
         VALUES
               (@UserName
               ,@Password)
               
        -- GET Authentication 
        SET @AuthenticationID = SCOPE_IDENTITY() 
         
        -- 
        -- Insert Users data into users table.
        INSERT INTO [Users]
               ([FirstName]
               ,[LastName]
               ,[Sex]
               ,[AuthenticationID]
               ,[ContactID])
         VALUES
               (@FirstName
               ,@LastName
               ,@Sex
               ,@AuthenticationID
               ,@ContactID)
    
         -- Commit
         COMMIT TRANSACTION
         
         -- This is the general example and you need to add error handling and 
         -- other bussines logic if you have any... :)
               	
    END
    GO
    
    Database database security help question career
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups