| Author |
Topic |
|
Msandlana
Starting Member
33 Posts |
Posted - 2008-01-21 : 09:24:21
|
| He AllI Ive got this table [Person] And I want to Insert some value on the stored procedure. here's my codeSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =============================================-- Author: <Author,,Name>-- Create date: <Create Date,,>-- Description: <Description,,>-- =============================================ALTER PROCEDURE [dbo].[InsertPerson] 'Davids','davids@gmail.con','David','Scott','21-06-1983','(073) 101 1232','(040) 858 4544','(040) 898 7412',1,'830621 6521 082','Male',3,2,'scotty',332,4,getdate(),getdate(),'Sedick'( @varUserName varchar(100), @varEmailAddress varchar(100), @varFirstName varchar(256), @varSurname varchar(256), @varDateofBirth varchar(100), @varCellPhoneNumber varchar(20), @varWorkTelephoneNo varchar(20), @varHomeNumber varchar(20), @intIDTypeId int, @varIDNumber varchar(100), @varGender varchar(10), @intOccupationId int, @intStatusId int, @varPassword varchar(100), @intLoginCount int, @intLostPasswordCount int, @varUpdatedBy varchar(256))ASBEGININSERT INTO [Person] ([UserName], [EmailAddress], [FirstName], [Surname], [DateofBirth], [CellPhoneNumber], [WorkTelephoneNumber], [HomeTelephoneNumber], [IDTypeId], [IDNumber], [Gender], [OccupationId], [StatusId], [Password], [LoginCount], [LostPasswordCount], [DateCreated], [DateUpdated], [UpdatedBy]) VALUES (@varUserName, @varEmailAddress, @varFirstName, @varSurname, @varDateofBirth, @varCellphoneNumber, @varWorkTelephoneNo, @varHomeNumber, @intIDTypeId, @varIDNumber, @varGender, @intOccupationId, @intStatusId, @varPassword, @intLoginCount, @intLostPasswordCount, getdate(), getdate(), @varUpdatedBy)ENDGO |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-01-21 : 09:31:54
|
quote: Originally posted by Msandlana He AllI Ive got this table [Person] And I want to Insert some value on the stored procedure. here's my codeSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =============================================-- Author: <Author,,Name>-- Create date: <Create Date,,>-- Description: <Description,,>-- =============================================ALTER PROCEDURE [dbo].[InsertPerson] 'Davids','davids@gmail.con','David','Scott','21-06-1983','(073) 101 1232','(040) 858 4544','(040) 898 7412',1,'830621 6521 082','Male',3,2,'scotty',332,4,getdate(),getdate(),'Sedick'( @varUserName varchar(100), @varEmailAddress varchar(100), @varFirstName varchar(256), @varSurname varchar(256), @varDateofBirth varchar(100), @varCellPhoneNumber varchar(20), @varWorkTelephoneNo varchar(20), @varHomeNumber varchar(20), @intIDTypeId int, @varIDNumber varchar(100), @varGender varchar(10), @intOccupationId int, @intStatusId int, @varPassword varchar(100), @intLoginCount int, @intLostPasswordCount int, @varUpdatedBy varchar(256))ASBEGININSERT INTO [Person] ([UserName], [EmailAddress], [FirstName], [Surname], [DateofBirth], [CellPhoneNumber], [WorkTelephoneNumber], [HomeTelephoneNumber], [IDTypeId], [IDNumber], [Gender], [OccupationId], [StatusId], [Password], [LoginCount], [LostPasswordCount], [DateCreated], [DateUpdated], [UpdatedBy]) VALUES (@varUserName, @varEmailAddress, @varFirstName, @varSurname, @varDateofBirth, @varCellphoneNumber, @varWorkTelephoneNo, @varHomeNumber, @intIDTypeId, @varIDNumber, @varGender, @intOccupationId, @intStatusId, @varPassword, @intLoginCount, @intLostPasswordCount, getdate(), getdate(), @varUpdatedBy)ENDGO
Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
CShaw
Yak Posting Veteran
65 Posts |
Posted - 2008-01-22 : 01:01:32
|
| When you alter the stored procedure do it as the first reply suggested. Then when you are ready to insert the values that you added in there it should look something like this.Execute [dbo].[InsertPerson] 'Davids','davids@gmail.con','David','Scott','21-06-1983','(073) 101 1232','(040) 858 4544','(040) 898 7412',1,'830621 6521 082','Male',3,2,'scotty',332,4,getdate(),getdate(),'Sedick'The alter does not execute the code. It only changes it.Chris Shawwww.SQLonCall.com |
 |
|
|
|
|
|