[FIX]Character creation

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 37
  1. #16
    Banned MAXTRAXv3 is offline
    BannedRank
    Jan 2007 Join Date
    Perth, WesternLocation
    2,252Posts

    Re: [FIX]Character creation

    um..if you have to change alter to create you have some realy big problems!

  2. #17
    Account Upgraded | Title Enabled! RepublicOfAstra is offline
    MemberRank
    Dec 2006 Join Date
    1,122Posts

    Re: [FIX]Character creation

    Quote Originally Posted by Rotana View Post
    remove your old procedure and change alter to create
    It's easier just to modify an existing spInsertChar with this though.

  3. #18
    Enthusiast nghiemyeuthao is offline
    MemberRank
    Apr 2005 Join Date
    37Posts

    Re: [FIX]Character creation

    Server: Msg 8101, Level 16, State 1, Procedure spInsertChar, Line 22
    An explicit value for the identity column in table 'Character' can only be specified when a column list is used and IDENTITY_INSERT is ON.

    how to fix it?

  4. #19
    Proficient Member Nekroido is offline
    MemberRank
    Mar 2007 Join Date
    『サイレンLocation
    185Posts

    Re: [FIX]Character creation

    FIXED.

    Check the first post. =]

  5. #20
    Enthusiast nghiemyeuthao is offline
    MemberRank
    Apr 2005 Join Date
    37Posts

    Re: [FIX]Character creation

    sorry...i can't fix..when run in query it error..."Server: Msg 8101, Level 16, State 1, Procedure spInsertChar, Line 22
    An explicit value for the identity column in table 'Character' can only be specified when a column list is used and IDENTITY_INSERT is ON."
    how to fix it?please help me..anyone..??

  6. #21
    Proficient Member Nekroido is offline
    MemberRank
    Mar 2007 Join Date
    『サイレンLocation
    185Posts

    Re: [FIX]Character creation

    Quote Originally Posted by nghiemyeuthao View Post
    sorry...i can't fix..when run in query it error..."Server: Msg 8101, Level 16, State 1, Procedure spInsertChar, Line 22
    An explicit value for the identity column in table 'Character' can only be specified when a column list is used and IDENTITY_INSERT is ON."
    how to fix it?please help me..anyone..??
    Delete that procedure, change to "CREATE PROCEDURE" and execute.
    Maybe it'll help.

  7. #22
    Enthusiast nghiemyeuthao is offline
    MemberRank
    Apr 2005 Join Date
    37Posts

    Re: [FIX]Character creation

    I has been delete produce..But when create produce
    CREATE PROCEDURE [dbo].[spInsertChar]
    @nAID INT,
    @nCharIndex INT,
    @szName nvarchar(32),
    @nSex INT,
    @nHair INT,
    @nFace INT,
    @nCostume INT
    AS
    BEGIN
    SET NOCOUNT ON;

    DECLARE @cnt INT
    SELECT @cnt=COUNT(*)
    FROM Character
    WHERE AID = @nAID

    DECLARE @cid INT
    SELECT @cid=COUNT(*)
    FROM Character

    INSERT INTO Character
    VALUES(@nAID,@szName,@cnt,1,@nSex,@nCostume,@nFace,@nHair,NULL,0,'1,000',0,0,0,0,0,0,0,0,0,0,0,0,@cnt,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,getdate(),getdate(),0)
    END
    GO

    error...Server: Msg 8101, Level 16, State 1, Procedure spInsertChar, Line 22
    An explicit value for the identity column in table 'Character' can only be specified when a column list is used and IDENTITY_INSERT is ON.
    I don't understand???please help me...thank so much

  8. #23
    Proficient Member Nekroido is offline
    MemberRank
    Mar 2007 Join Date
    『サイレンLocation
    185Posts

    Re: [FIX]Character creation

    Quote Originally Posted by nghiemyeuthao View Post
    I has been delete produce..But when create produce
    CREATE PROCEDURE [dbo].[spInsertChar]
    @nAID INT,
    @nCharIndex INT,
    @szName nvarchar(32),
    @nSex INT,
    @nHair INT,
    @nFace INT,
    @nCostume INT
    AS
    BEGIN
    SET NOCOUNT ON;

    DECLARE @cnt INT
    SELECT @cnt=COUNT(*)
    FROM Character
    WHERE AID = @nAID

    DECLARE @cid INT
    SELECT @cid=COUNT(*)
    FROM Character

    INSERT INTO Character
    VALUES(@nAID,@szName,@cnt,1,@nSex,@nCostume,@nFace,@nHair,NULL,0,'1,000',0,0,0,0,0,0,0,0,0,0,0,0,@cnt,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,getdate(),getdate(),0)
    END
    GO

    error...Server: Msg 8101, Level 16, State 1, Procedure spInsertChar, Line 22
    An explicit value for the identity column in table 'Character' can only be specified when a column list is used and IDENTITY_INSERT is ON.
    I don't understand???please help me...thank so much
    Use this, I guess.

    Code:
    INSERT INTO Character
    VALUES(@nAID,@szName,@cnt,1,@nSex,@nCostume,@nFace ,@nHair,NULL,0,1000,0,0,0,0,0,0,0,0,0,0,0,0,@cn t,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, NULL,getdate(),getdate(),0)
    END
    GO

  9. #24
    Enthusiast nghiemyeuthao is offline
    MemberRank
    Apr 2005 Join Date
    37Posts

    Re: [FIX]Character creation

    thank it work..it easy :)..thank so much...

  10. #25
    Proficient Member Nekroido is offline
    MemberRank
    Mar 2007 Join Date
    『サイレンLocation
    185Posts

    Re: [FIX]Character creation

    Quote Originally Posted by nghiemyeuthao View Post
    thank it work..it easy :)..thank so much...
    lol, thanx for thanxing ;)

  11. #26
    Newbie kn95951135 is offline
    MemberRank
    Nov 2005 Join Date
    MalaysiaLocation
    388Posts

    Re: [FIX]Character creation

    That Problem at
    INSERT INTO Character
    VALUES(@nAID,@szName,@cnt,1,@nSex,@nCostume,@nFace ,@nHair,NULL,0,'1,000',0,0,0,0,0,0,0,0,0,0,0,0,@cn t,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, NULL,getdate(),getdate(),0)
    just change it to
    INSERT INTO Character
    VALUES(@nAID,@szName,@cnt,1,@nSex,@nCostume,@nFace ,@nHair,NULL,0,1000,0,0,0,0,0,0,0,0,0,0,0,0,@cn t,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, NULL,getdate(),getdate(),0)
    it shuld work i think~:irvine:

  12. #27
    Account Upgraded | Title Enabled! bepetemish is offline
    MemberRank
    Nov 2006 Join Date
    The NetherlandsLocation
    384Posts

    Re: [FIX]Character creation

    hmmm, good job, works better then the solution i made xD

    I do found a little bug,, normal grenades doesn't get eqquipt.

  13. #28
    Member etiolated is offline
    MemberRank
    Aug 2006 Join Date
    CanadaLocation
    97Posts

    Re: [FIX]Character creation

    credits to myself for coming up with the fix.

  14. #29

    Re: [FIX]Character creation

    At the line:

    VALUES(@nAID,@szName,@cnt,1,@nSex,@nCostume,@nFace,@nHair,NULL,0,1000,0,0,0,0,0,0,0,0,0,0,0,0,@cnt,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,getdate(),getdate(),0)

    I think I should remove ,getdate(),getdate(),0). But will it affect anything?

  15. #30
    Enthusiast cpk is offline
    MemberRank
    Mar 2007 Join Date
    41Posts

    Re: [FIX]Character creation

    sorry i don't know where you put this code.

    "Just open your database, than new SQL-editor window, copy-paste the code"

    I am the database now where



Page 2 of 3 FirstFirst 123 LastLast

Advertisement