SQLSTATE:42000, Diagnosis error problem

Results 1 to 8 of 8
  1. #1
    Newbie daezugun is offline
    MemberRank
    Feb 2011 Join Date
    127.0.0.1Location
    787Posts

    SQLSTATE:42000, Diagnosis error problem

    SQLSTATE:42000, Diagnosis:[Microsoft][ODBC SQL Server Driver][SQL Server]
    Could not find stored procedure 'WZ_DISCONNECT_MEMB'.
    and Could not find stored procedure 'WZ_GetItemSerial'
    and
    Could not find stored procedure WZ_CreateCharacter!

    anyone knows how to solved this? i cant create character in game..
    or can you give me a query to create a table for these on my Sql?
    Last edited by daezugun; 07-12-12 at 04:58 PM.


  2. #2
    TheGhost pquintal is offline
    MemberRank
    May 2009 Join Date
    Funchal-PTLocation
    205Posts

    Re: SQLSTATE:42000, Diagnosis error problem

    Quote Originally Posted by daezugun View Post
    SQLSTATE:42000, Diagnosis:[Microsoft][ODBC SQL Server Driver][SQL Server]
    Could not find stored procedure 'WZ_DISCONNECT_MEMB'.
    and Could not find stored procedure 'WZ_GetItemSerial'
    and
    Could not find stored procedure WZ_CreateCharacter!

    anyone knows how to solved this? i cant create character in game..
    or can you give me a query to create a table for these on my Sql?
    Apply This in query analyzer
    Use MuOnline

    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WZ_CreateCharacter]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
    drop procedure [dbo].[WZ_CreateCharacter]
    GO

    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_NULLS ON
    GO

    CREATE Procedure [dbo].[WZ_CreateCharacter]
    @AccountID varchar(10),
    @Name varchar(10),
    @Class tinyint
    AS
    Begin
    SET NOCOUNT ON
    SET XACT_ABORT ON
    DECLARE @Result tinyint
    SET @Result = 0x00
    If EXISTS ( SELECT Name FROM Character WHERE Name = @Name )
    begin
    SET @Result = 0x01
    GOTO ProcEnd
    end
    If EXISTS ( SELECT Name FROM BotPet WHERE Name = @Name )
    begin
    SET @Result = 0x01
    GOTO ProcEnd
    end
    BEGIN TRAN
    If NOT EXISTS ( SELECT Id FROM AccountCharacter WHERE Id = @AccountID )
    begin
    INSERT INTO dbo.AccountCharacter(Id, GameID1, GameID2, GameID3, GameID4, GameID5, GameIDC)
    VALUES(@AccountID, @Name, NULL, NULL, NULL, NULL, NULL)
    SET @Result = @@Error
    end
    else
    begin
    Declare @g1 varchar(10), @g2 varchar(10), @g3 varchar(10), @g4 varchar(10), @g5 varchar(10)
    SELECT @g1=GameID1, @g2=GameID2, @g3=GameID3, @g4=GameID4, @g5=GameID5 FROM dbo.AccountCharacter Where Id = @AccountID
    if( ( @g1 Is NULL) OR (Len(@g1) = 0))
    begin
    UPDATE AccountCharacter SET GameID1 = @Name
    WHERE Id = @AccountID
    SET @Result = @@Error
    end
    else if( @g2 Is NULL OR Len(@g2) = 0)
    begin
    UPDATE AccountCharacter SET GameID2 = @Name
    WHERE Id = @AccountID
    SET @Result = @@Error
    end
    else if( @g3 Is NULL OR Len(@g3) = 0)
    begin
    UPDATE AccountCharacter SET GameID3 = @Name
    WHERE Id = @AccountID
    SET @Result = @@Error
    end
    else if( @g4 Is NULL OR Len(@g4) = 0)
    begin
    UPDATE AccountCharacter SET GameID4 = @Name
    WHERE Id = @AccountID
    SET @Result = @@Error
    end
    else if( @g5 Is NULL OR Len(@g5) = 0)
    begin
    UPDATE AccountCharacter SET GameID5 = @Name
    WHERE Id = @AccountID
    SET @Result = @@Error
    end
    else
    begin
    SET @Result = 0x03
    GOTO TranProcEnd
    end
    end
    if( @Result <> 0 )
    begin
    GOTO TranProcEnd
    end
    else
    begin
    INSERT INTO dbo.Character(AccountID, Name, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Inventory,MagicList,
    Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, Leadership,money )
    SELECT @AccountID As AccountID, @Name As Name, Level, 0, @Class As Class,
    Strength, Dexterity, Vitality, Energy, Inventory,MagicList, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY,
    getdate() As MDate, getdate() As LDate, Quest, DbVersion, Leadership,0
    FROM DefaultClassType WHERE Class = @Class
    SET @Result = @@Error
    end
    TranProcEnd: -- GOTO
    IF ( @Result <> 0 )
    ROLLBACK TRAN
    ELSE
    COMMIT TRAN
    ProcEnd:
    SET NOCOUNT OFF
    SET XACT_ABORT OFF
    SELECT
    CASE @Result
    WHEN 0x00 THEN 0x01
    WHEN 0x01 THEN 0x00
    WHEN 0x03 THEN 0x03
    ELSE 0x02
    END AS Result
    End
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS ON
    GO

    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WZ_GetItemSerial]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
    drop procedure [dbo].[WZ_GetItemSerial]
    GO

    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_NULLS ON
    GO


    CREATE procedure [dbo].[WZ_GetItemSerial]
    as
    BEGIN
    DECLARE @ItemSerial int
    set nocount on
    begin transaction

    update GameServerInfo set @ItemSerial = ItemCount = ItemCount+1

    if ( @@error <> 0 )
    begin
    rollback transaction
    select -1
    end
    else
    begin
    commit transaction
    select @ItemSerial
    end
    END


    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS ON
    GO

    f exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WZ_DISCONNECT_MEMB]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
    drop procedure [dbo].[WZ_DISCONNECT_MEMB]
    GO

    CREATE PROCEDURE WZ_DISCONNECT_MEMB
    @memb___id varchar(10)
    AS
    Begin
    set nocount on
    Declare @find_id varchar(10)
    Declare @ConnectStat tinyint
    Declare @FechaIngreso datetime
    Declare @FechaEgreso datetime
    Set @ConnectStat = 0 -- Fija ConnectStat a 0
    Set @find_id = 'NOT'
    select @find_id = S.memb___id from MEMB_STAT S INNER JOIN MEMB_INFO I ON S.memb___id = I.memb___id
    where I.memb___id = @memb___id

    if( @find_id <> 'NOT' ) -- Realizado por TheGhost -- CP Team Development Group
    begin
    update MEMB_STAT set ConnectStat = @ConnectStat, DisConnectTM = getdate()
    where memb___id = @memb___id
    select @FechaIngreso = (select ConnectTM from memb_stat where memb___id = @memb___id)
    select @FechaEgreso = (select DisConnectTM from memb_stat where memb___id = @memb___id)
    update MEMB_STAT set OnlineHours = OnlineHours + (DATEDIFF(Hour, @FechaIngreso, @FechaEgreso))
    where memb___id = @memb___id
    end
    end
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS ON
    GO

  3. #3
    Newbie daezugun is offline
    MemberRank
    Feb 2011 Join Date
    127.0.0.1Location
    787Posts

    Re: SQLSTATE:42000, Diagnosis error problem

    Quote Originally Posted by pquintal View Post
    Apply This in query analyzer
    Ow yes! Thanks you very much for the help my friend, gonna apply it now...
    i really appreciate this one..

    my friend i think all of my stored table procedures has gone.. it solved the problem but it was lacking some tables..

    it shows i have not WZ_CONNECT_MEMB.. gimme another one again bro?
    Last edited by daezugun; 07-12-12 at 05:57 PM.

  4. #4
    Apprentice aecrimch is offline
    MemberRank
    Dec 2007 Join Date
    842Posts

    Re: SQLSTATE:42000, Diagnosis error problem

    here it is:
    USE [MuOnline]
    GO


    /****** Object: StoredProcedure [dbo].[WZ_CONNECT_MEMB] Script Date: 12/07/2012 20:02:38 ******/
    SET ANSI_NULLS ON
    GO


    SET QUOTED_IDENTIFIER ON
    GO


    CREATE PROCEDURE [dbo].[WZ_CONNECT_MEMB]
    @memb___id varchar(10),
    @ServerName varchar(20),
    @IP varchar(15)
    AS
    Begin
    set nocount on
    Declare @find_id varchar(10)
    Declare @ConnectStat tinyint
    Set @find_id = 'NOT'
    Set @ConnectStat = 1 -- A¢¼O »óÅA °ª 1 = A¢¼O, 0 = A¢¼OX
    select @find_id = S.memb___id from MEMB_STAT S INNER JOIN MEMB_INFO I ON S.memb___id = I.memb___id
    where I.memb___id = @memb___id
    if( @find_id = 'NOT' )
    begin
    insert into MEMB_STAT (memb___id,ConnectStat,ServerName,IP,ConnectTM)
    values(@memb___id, @ConnectStat, @ServerName, @IP, getdate())
    end
    else
    update MEMB_STAT set ConnectStat = @ConnectStat,
    ServerName = @ServerName,IP = @IP,
    ConnectTM = getdate()
    where memb___id = @memb___id
    end


    GO
    but, if you have any SQL missing procedure or table, better run TitanDBUpdater.exe

    and WZ_DISCONNECT_MEMBER with TIMEONLINE MOD by john_d

    USE [MuOnline]
    GO


    /****** Object: StoredProcedure [dbo].[WZ_DISCONNECT_MEMB] Script Date: 12/07/2012 20:01:08 ******/
    SET ANSI_NULLS OFF
    GO


    SET QUOTED_IDENTIFIER OFF
    GO


    CREATE PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]
    @memb___id varchar(10)
    AS
    Begin
    set nocount on
    Declare @find_id varchar(10)
    Declare @con_tm DATETIME
    Declare @ConnectStat tinyint
    Set @ConnectStat = 0
    Set @find_id = 'NOT'
    select @find_id = S.memb___id, @con_tm = S.ConnectTM from MEMB_STAT S INNER JOIN MEMB_INFO I ON S.memb___id = I.memb___id
    where I.memb___id = @memb___id
    if( @find_id <> 'NOT' )
    begin
    update MEMB_STAT set ConnectStat = @ConnectStat, DisConnectTM = getdate(), TotalTime = TotalTime+(DATEDIFF(mi,ConnectTM,getdate()))
    where memb___id = @memb___id
    -- TIMEONLINE MOD by john_d
    update character set TotalTime = TotalTime+(DATEDIFF(mi,@con_tm,getdate()))
    from character as c INNER join AccountCharacter as ac ON
    c.Name = ac.GameIDC where c.accountid = @memb___id
    end
    end


    GO


  5. #5
    Newbie daezugun is offline
    MemberRank
    Feb 2011 Join Date
    127.0.0.1Location
    787Posts

    Re: SQLSTATE:42000, Diagnosis error problem

    Quote Originally Posted by aecrimch View Post
    here it is:


    but, if you have any SQL missing procedure or table, better run TitanDBUpdater.exe
    thanks aecrimch, i really appreciate this one too. ;)

    aecrimch i already add these queries and run the titan updater, but it shows something about "null" when i tries to create another character and never created it from the server side.
    01:30:35 WZ_CreateCharacter 'admin', 'gsdgg', '96'
    SQLSTATE:23000, Diagnosis:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'Resets', table 'MuOnline.dbo.Character'; column does not allow nulls. INSERT fails.
    01:30:44 SELECT * FROM AccountCharacter WHERE Id='admin'

  6. #6
    Apprentice aecrimch is offline
    MemberRank
    Dec 2007 Join Date
    842Posts

    Re: SQLSTATE:42000, Diagnosis error problem

    you should make Resets to Allow Nulls...

    edit table Character in Design mode and change Resets
    Allow Nulls = Yes

  7. #7
    Newbie daezugun is offline
    MemberRank
    Feb 2011 Join Date
    127.0.0.1Location
    787Posts

    Re: SQLSTATE:42000, Diagnosis error problem

    Quote Originally Posted by aecrimch View Post
    you should make Resets to Allow Nulls...

    edit table Character in Design mode and change Resets
    i changed it but when i logged in, all my characters are bugged cant go in game itis not responding at all.
    and i was noticed in my web that all the characters are deleted except for all the accounts have been created was left. :/
    02:38:16 SELECT cLevel, Class, LevelUpPoint, Experience, Strength, Dexterity, Vitality, Energy, Money, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MapDir, PkCount, PkLevel, PkTime, CtlCode, DbVersion, Leadership, ChatLimitTime, FruitPoint, SCFExtInventory, SCFUpdatedPShop FROM Character WHERE Name='Daezugun' AND AccountID='admin'
    02:38:16 EXEC WZ_DISCONNECT_MEMB 'admin'
    [Player] admin has been deleted
    [JoinServer] Connection Closed, dwIoSize == 0 (Index:0)
    [DataServer1] Connection Closed, dwIoSize == 0 (Index:0)
    [WzExDB] Connection Closed, dwIoSize == 0 (Index:1)
    [DataServer2] Connection Closed, dwIoSize == 0 (Index:0)
    [PostServer] Connection Closed, dwIoSize == 0 (Index:0)
    Ok now i have just restored my database, everything is fine now except not let me getting or making another character?
    does anyone knows why or how to solved it?

  8. #8
    Apprentice aecrimch is offline
    MemberRank
    Dec 2007 Join Date
    842Posts

    Re: SQLSTATE:42000, Diagnosis error problem

    strange...
    what server files you use?



Advertisement