um..if you have to change alter to create you have some realy big problems!
um..if you have to change alter to create you have some realy big problems!
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?
FIXED.
Check the first 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..??
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
thank it work..it easy :)..thank so much...![]()
That Problem at
just change it toINSERT 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)
it shuld work i think~:irvine: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)
hmmm, good job, works better then the solution i made xD
I do found a little bug,, normal grenades doesn't get eqquipt.
credits to myself for coming up with the fix.
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?
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