MagicMan Your mainlog above
for 1 MagicMan if u hexedit the mainlogserver u will see its not asking for cKeyCode in Account_T...
form mainlog.
select * from CODE_T where cKEYCODE = '%s'
so theres your first mistake in your DB then if u search for select in mainlogserver.exe u will find all what u need for that , its the trick of adding it to db and haveing it COLLATE with your other records , but hey iam not a expert on MSSql , RageIlluminati is....but this is what i got ........
mainlogloginWorkswithasp - and its the whole file
Code: Select all
/****** Object: Database mainlogin Script Date: 9/4/2005 2:52:16 PM ******/
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'mainlogin')
DROP DATABASE [mainlogin]
GO
CREATE DATABASE [mainlogin] ON (NAME = N'mainlogin', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\mainlogin.mdf' , SIZE = 10, FILEGROWTH = 10%) LOG ON (NAME = N'mainlogin_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\mainlogin_log.LDF' , SIZE = 2, FILEGROWTH = 10%)
COLLATE Latin1_General_CI_AS
GO
ALTER DATABASE [mainlogin] ADD FILEGROUP [Second]
GO
ALTER DATABASE [mainlogin] ADD FILE(NAME = N'mainlogin_idx', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\mainlogin_idx.mdf' , SIZE = 10, FILEGROWTH = 10%) TO FILEGROUP [Second]
GO
exec sp_dboption N'mainlogin', N'autoclose', N'false'
GO
exec sp_dboption N'mainlogin', N'bulkcopy', N'false'
GO
exec sp_dboption N'mainlogin', N'trunc. log', N'false'
GO
exec sp_dboption N'mainlogin', N'torn page detection', N'true'
GO
exec sp_dboption N'mainlogin', N'read only', N'false'
GO
exec sp_dboption N'mainlogin', N'dbo use', N'false'
GO
exec sp_dboption N'mainlogin', N'single', N'false'
GO
exec sp_dboption N'mainlogin', N'autoshrink', N'false'
GO
exec sp_dboption N'mainlogin', N'ANSI null default', N'false'
GO
exec sp_dboption N'mainlogin', N'recursive triggers', N'false'
GO
exec sp_dboption N'mainlogin', N'ANSI nulls', N'false'
GO
exec sp_dboption N'mainlogin', N'concat null yields null', N'false'
GO
exec sp_dboption N'mainlogin', N'cursor close on commit', N'false'
GO
exec sp_dboption N'mainlogin', N'default to local cursor', N'false'
GO
exec sp_dboption N'mainlogin', N'quoted identifier', N'false'
GO
exec sp_dboption N'mainlogin', N'ANSI warnings', N'false'
GO
exec sp_dboption N'mainlogin', N'auto create statistics', N'true'
GO
exec sp_dboption N'mainlogin', N'auto update statistics', N'true'
GO
use [mainlogin]
GO
/****** Object: Table [dbo].[ACCOUNT_T] Script Date: 9/4/2005 2:52:17 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ACCOUNT_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ACCOUNT_T]
GO
/****** Object: Table [dbo].[CODE_T] Script Date: 9/4/2005 2:52:17 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CODE_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CODE_T]
GO
/****** Object: Table [dbo].[WS1_T] Script Date: 9/4/2005 2:52:17 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WS1_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[WS1_T]
GO
/****** Object: Table [dbo].[WS2_T] Script Date: 9/4/2005 2:52:17 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WS2_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[WS2_T]
GO
/****** Object: Login CDWRITER\CDWs Script Date: 9/4/2005 2:52:16 PM ******/
if not exists (select * from master.dbo.syslogins where loginname = N'CDWRITER\CDWs')
exec sp_grantlogin N'CDWRITER\CDWs'
exec sp_defaultdb N'CDWRITER\CDWs', N'master'
exec sp_defaultlanguage N'CDWRITER\CDWs', N'us_english'
GO
/****** Object: Login CDWRITER\CDWs Script Date: 9/4/2005 2:52:16 PM ******/
exec sp_addsrvrolemember N'CDWRITER\CDWs', sysadmin
GO
/****** Object: User dbo Script Date: 9/4/2005 2:52:17 PM ******/
/****** Object: Table [dbo].[ACCOUNT_T] Script Date: 9/4/2005 2:52:18 PM ******/
CREATE TABLE [dbo].[ACCOUNT_T] (
[cAccountID] [nchar] (10) COLLATE Latin1_General_CI_AS NOT NULL ,
[cPasswd] [nchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[iAccountID] [int] IDENTITY (1001, 1) NOT NULL ,
[cLoginIpAddress] [nchar] (20) COLLATE Latin1_General_CI_AS NULL ,
[IsGMAccount] [bit] NULL ,
[CreateDate] [smalldatetime] NULL ,
[LoginDate] [smalldatetime] NULL ,
[LogoutDate] [smalldatetime] NULL ,
[BlockDate] [smalldatetime] NULL ,
[cRealName] [nchar] (30) COLLATE Latin1_General_CI_AS NULL ,
[cSSN] [nchar] (20) COLLATE Latin1_General_CI_AS NULL ,
[cEmail] [nchar] (60) COLLATE Latin1_General_CI_AS NULL ,
[cCharRecord] [nchar] (100) COLLATE Latin1_General_CI_AS NULL ,
[cQuiz] [nchar] (45) COLLATE Latin1_General_CI_AS NULL ,
[cAnswer] [nchar] (20) COLLATE Latin1_General_CI_AS NULL ,
[ValidDate] [smalldatetime] NULL ,
[iValidTime] [int] NULL ,
[MaxUser] [int] NULL ,
[iShopID] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[CODE_T] Script Date: 9/4/2005 2:52:18 PM ******/
CREATE TABLE [dbo].[CODE_T] (
[iAccountID] [int] IDENTITY (1, 1) NOT NULL ,
[cCharName] [nchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[cKEYCODE] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[WS1_T] Script Date: 9/4/2005 2:52:18 PM ******/
CREATE TABLE [dbo].[WS1_T] (
[iAccountID] [int] NOT NULL ,
[cCharName] [nchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[cKEYCODE] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[WS2_T] Script Date: 9/4/2005 2:52:18 PM ******/
CREATE TABLE [dbo].[WS2_T] (
[iAccountID] [int] NOT NULL ,
[cCharName] [nchar] (10) COLLATE Latin1_General_CI_AS NOT NULL ,
[cKEYCODE] [nchar] (10) COLLATE Latin1_General_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CODE_T] WITH NOCHECK ADD
CONSTRAINT [IX_CODE_T] UNIQUE NONCLUSTERED
(
[iAccountID]
) WITH FILLFACTOR = 80 ON [PRIMARY]
GO
CREATE INDEX [WS1_IDX] ON [dbo].[WS1_T]([iAccountID]) WITH FILLFACTOR = 80, STATISTICS_NORECOMPUTE ON [Second]
GO
now for the WS1 db u have the same problem your useing [cKEYCODE] [nchar] (10) COLLATE Estonian_CI_AS NULL , but wait whats the statement form MainlogServer.exe ...
select * from CODE_T where cKEYCODE = '%s'
so that does not fit eather ?
heres mine.....
Code: Select all
/****** Object: Database ws1 Script Date: 6/2/2005 2:01:11 PM ******/
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'ws1')
DROP DATABASE [ws1]
GO
CREATE DATABASE [ws1] ON (NAME = N'ws1', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\ws1.mdf' , SIZE = 100, FILEGROWTH = 10%) LOG ON (NAME = N'ws1_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\ws1_log.LDF' , SIZE = 25, FILEGROWTH = 10%)
COLLATE Latin1_General_CI_AS
GO
ALTER DATABASE [ws1] ADD FILEGROUP [Second]
GO
ALTER DATABASE [ws1] ADD FILE(NAME = N'ws1_idx', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\ws1_idx.mdf' , SIZE = 10, FILEGROWTH = 10%) TO FILEGROUP [Second]
GO
exec sp_dboption N'ws1', N'autoclose', N'false'
GO
exec sp_dboption N'ws1', N'bulkcopy', N'false'
GO
exec sp_dboption N'ws1', N'trunc. log', N'false'
GO
exec sp_dboption N'ws1', N'torn page detection', N'true'
GO
exec sp_dboption N'ws1', N'read only', N'false'
GO
exec sp_dboption N'ws1', N'dbo use', N'false'
GO
exec sp_dboption N'ws1', N'single', N'false'
GO
exec sp_dboption N'ws1', N'autoshrink', N'false'
GO
exec sp_dboption N'ws1', N'ANSI null default', N'false'
GO
exec sp_dboption N'ws1', N'recursive triggers', N'false'
GO
exec sp_dboption N'ws1', N'ANSI nulls', N'false'
GO
exec sp_dboption N'ws1', N'concat null yields null', N'false'
GO
exec sp_dboption N'ws1', N'cursor close on commit', N'false'
GO
exec sp_dboption N'ws1', N'default to local cursor', N'false'
GO
exec sp_dboption N'ws1', N'quoted identifier', N'false'
GO
exec sp_dboption N'ws1', N'ANSI warnings', N'false'
GO
exec sp_dboption N'ws1', N'auto create statistics', N'true'
GO
exec sp_dboption N'ws1', N'auto update statistics', N'true'
GO
use [ws1]
GO
/****** Object: Stored Procedure dbo.sp_GetCrusadeLastLoser Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_GetCrusadeLastLoser]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_GetCrusadeLastLoser]
GO
/****** Object: Stored Procedure dbo.sp_GetCrusadeLastWinner Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_GetCrusadeLastWinner]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_GetCrusadeLastWinner]
GO
/****** Object: Stored Procedure dbo.sp_GetHeldenianLastLoser Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_GetHeldenianLastLoser]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_GetHeldenianLastLoser]
GO
/****** Object: Stored Procedure dbo.sp_GetHeldenianLastWinner Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_GetHeldenianLastWinner]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_GetHeldenianLastWinner]
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeDraw Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetCrusadeDraw]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetCrusadeDraw]
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeLoserAresden Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetCrusadeLoserAresden]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetCrusadeLoserAresden]
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeLoserElvine Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetCrusadeLoserElvine]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetCrusadeLoserElvine]
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeWinner Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetCrusadeWinner]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetCrusadeWinner]
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeWinnerAresden Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetCrusadeWinnerAresden]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetCrusadeWinnerAresden]
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeWinnerElvine Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetCrusadeWinnerElvine]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetCrusadeWinnerElvine]
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianDraw Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetHeldenianDraw]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetHeldenianDraw]
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianLoserAresden Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetHeldenianLoserAresden]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetHeldenianLoserAresden]
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianLoserElvine Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetHeldenianLoserElvine]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetHeldenianLoserElvine]
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianWinner Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetHeldenianWinner]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetHeldenianWinner]
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianWinnerAresden Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetHeldenianWinnerAresden]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetHeldenianWinnerAresden]
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianWinnerElvine Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_SetHeldenianWinnerElvine]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_SetHeldenianWinnerElvine]
GO
/****** Object: Table [dbo].[BANKITEM_T] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BANKITEM_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[BANKITEM_T]
GO
/****** Object: Table [dbo].[CHARACTER_T] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CHARACTER_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CHARACTER_T]
GO
/****** Object: Table [dbo].[CODE_T] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CODE_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CODE_T]
GO
/****** Object: Table [dbo].[CrusadeReportT] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CrusadeReportT]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CrusadeReportT]
GO
/****** Object: Table [dbo].[CrusadeResultT] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CrusadeResultT]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CrusadeResultT]
GO
/****** Object: Table [dbo].[GUILDMEMBER_T] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GUILDMEMBER_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GUILDMEMBER_T]
GO
/****** Object: Table [dbo].[GUILD_T] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GUILD_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GUILD_T]
GO
/****** Object: Table [dbo].[HeldenianReportT] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[HeldenianReportT]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[HeldenianReportT]
GO
/****** Object: Table [dbo].[HeldenianResultT] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[HeldenianResultT]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[HeldenianResultT]
GO
/****** Object: Table [dbo].[ITEM_T] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ITEM_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ITEM_T]
GO
/****** Object: Table [dbo].[SKILL_T] Script Date: 6/2/2005 2:01:13 PM ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SKILL_T]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[SKILL_T]
GO
/****** Object: User dbo Script Date: 6/2/2005 2:01:11 PM ******/
/****** Object: Table [dbo].[BANKITEM_T] Script Date: 6/2/2005 2:01:13 PM ******/
CREATE TABLE [dbo].[BANKITEM_T] (
[CharID] [int] NOT NULL ,
[sItemID] [smallint] NULL ,
[iCount] [int] NULL ,
[sItemType] [smallint] NULL ,
[sID1] [smallint] NULL ,
[sID2] [smallint] NULL ,
[sID3] [smallint] NULL ,
[sColor] [smallint] NULL ,
[sEffect1] [smallint] NULL ,
[sEffect2] [smallint] NULL ,
[sEffect3] [smallint] NULL ,
[iLifeSpan] [int] NULL ,
[iAttribute] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[CHARACTER_T] Script Date: 6/2/2005 2:01:14 PM ******/
CREATE TABLE [dbo].[CHARACTER_T] (
[cCharName] [nchar] (10) COLLATE Latin1_General_CI_AS NOT NULL ,
[cAccountID] [nchar] (10) COLLATE Latin1_General_CI_AS NOT NULL ,
[CharID] [int] NOT NULL ,
[sID1] [smallint] NULL ,
[sID2] [smallint] NULL ,
[sID3] [smallint] NULL ,
[sLevel] [smallint] NULL ,
[sStr] [smallint] NULL ,
[sVit] [smallint] NULL ,
[sDex] [smallint] NULL ,
[sInt] [smallint] NULL ,
[sMag] [smallint] NULL ,
[sChar] [smallint] NULL ,
[iExp] [int] NULL ,
[sUpStr] [smallint] NULL ,
[sUpVit] [smallint] NULL ,
[sUpDex] [smallint] NULL ,
[sUpInt] [smallint] NULL ,
[sUpMag] [smallint] NULL ,
[sUpChar] [smallint] NULL ,
[bGender] [bit] NULL ,
[sSkin] [smallint] NULL ,
[sHairStyle] [smallint] NULL ,
[sHairColor] [smallint] NULL ,
[sUnderWear] [smallint] NULL ,
[iApprColor] [int] NULL ,
[sAppr1] [smallint] NULL ,
[sAppr2] [smallint] NULL ,
[sAppr3] [smallint] NULL ,
[sAppr4] [smallint] NULL ,
[cNation] [nchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[cMapLoc] [nchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[sLocX] [smallint] NULL ,
[sLocY] [smallint] NULL ,
[cProfile] [nchar] (70) COLLATE Latin1_General_CI_AS NULL ,
[sAdminLevel] [smallint] NULL ,
[iContribution] [int] NULL ,
[iLeftSpecTime] [int] NULL ,
[cLockMapName] [nchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[iLockMapTime] [int] NULL ,
[FileSaveDate] [smalldatetime] NULL ,
[BlockDate] [smalldatetime] NULL ,
[cGuildName] [nchar] (20) COLLATE Latin1_General_CI_AS NULL ,
[iGuildID] [int] NULL ,
[sGuildRank] [smallint] NULL ,
[sFightNum] [smallint] NULL ,
[sFightDate] [smallint] NULL ,
[sFightTicket] [smallint] NULL ,
[sQuestNum] [smallint] NULL ,
[sQuestID] [smallint] NULL ,
[sQuestCount] [smallint] NULL ,
[sQuestRewType] [smallint] NULL ,
[sQuestRewAmount] [smallint] NULL ,
[bQuestCompleted] [bit] NULL ,
[iEventID] [int] NULL ,
[iWarCon] [int] NULL ,
[iCruJob] [int] NULL ,
[iCruID] [int] NULL ,
[iCruConstructPoint] [int] NULL ,
[iPopular] [int] NULL ,
[iHP] [int] NULL ,
[iMP] [int] NULL ,
[iSP] [int] NULL ,
[iEK] [int] NULL ,
[iPK] [int] NULL ,
[iRewardGold] [int] NULL ,
[sDownSkillIDX] [smallint] NULL ,
[sHunger] [smallint] NULL ,
[sLeftSAC] [smallint] NULL ,
[iLeftShutupTime] [int] NULL ,
[iLeftPopTime] [int] NULL ,
[iLeftForceRecallTime] [int] NULL ,
[iLeftFirmStaminarTime] [int] NULL ,
[iLeftDeadpenaltyTime] [int] NULL ,
[cMagicMastery] [nchar] (100) COLLATE Latin1_General_CI_AS NULL ,
[iPartyID] [int] NULL ,
[iGizoneItemUpgradeLeft] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[CODE_T] Script Date: 6/2/2005 2:01:15 PM ******/
CREATE TABLE [dbo].[CODE_T] (
[iAccountID] [int] NOT NULL ,
[cCharName] [nchar] (10) COLLATE Latin1_General_CI_AS NOT NULL ,
[cKEYCODE] [nchar] (10) COLLATE Latin1_General_CI_AS NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[CrusadeReportT] Script Date: 6/2/2005 2:01:15 PM ******/
CREATE TABLE [dbo].[CrusadeReportT] (
[startDate] [datetime] NOT NULL ,
[endDate] [datetime] NOT NULL ,
[winner] [char] (7) COLLATE Latin1_General_CI_AS NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[CrusadeResultT] Script Date: 6/2/2005 2:01:15 PM ******/
CREATE TABLE [dbo].[CrusadeResultT] (
[nation] [char] (7) COLLATE Latin1_General_CI_AS NOT NULL ,
[totalWin] [int] NULL ,
[lastWar] [char] (4) COLLATE Latin1_General_CI_AS NOT NULL ,
[lastResultCount] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[GUILDMEMBER_T] Script Date: 6/2/2005 2:01:15 PM ******/
CREATE TABLE [dbo].[GUILDMEMBER_T] (
[cGuildName] [nchar] (20) COLLATE Latin1_General_CI_AS NOT NULL ,
[cMemberName] [nchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[JoinDate] [smalldatetime] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[GUILD_T] Script Date: 6/2/2005 2:01:15 PM ******/
CREATE TABLE [dbo].[GUILD_T] (
[cGuildName] [nchar] (20) COLLATE Latin1_General_CI_AS NOT NULL ,
[iGuildID] [int] NULL ,
[cMasterName] [nchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[cLocation] [nchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[sMemberNO] [smallint] NULL ,
[CreateDate] [smalldatetime] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[HeldenianReportT] Script Date: 6/2/2005 2:01:15 PM ******/
CREATE TABLE [dbo].[HeldenianReportT] (
[startDate] [datetime] NOT NULL ,
[endDate] [datetime] NOT NULL ,
[winner] [char] (7) COLLATE Latin1_General_CI_AS NOT NULL ,
[type] [int] NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[HeldenianResultT] Script Date: 6/2/2005 2:01:15 PM ******/
CREATE TABLE [dbo].[HeldenianResultT] (
[nation] [char] (7) COLLATE Latin1_General_CI_AS NOT NULL ,
[totalWin] [int] NULL ,
[lastWar] [char] (4) COLLATE Latin1_General_CI_AS NOT NULL ,
[lastResultCount] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[ITEM_T] Script Date: 6/2/2005 2:01:15 PM ******/
CREATE TABLE [dbo].[ITEM_T] (
[CharID] [int] NOT NULL ,
[sItemID] [smallint] NULL ,
[iCount] [int] NULL ,
[sItemType] [smallint] NULL ,
[sID1] [smallint] NULL ,
[sID2] [smallint] NULL ,
[sID3] [smallint] NULL ,
[sColor] [smallint] NULL ,
[sEffect1] [smallint] NULL ,
[sEffect2] [smallint] NULL ,
[sEffect3] [smallint] NULL ,
[iLifeSpan] [int] NULL ,
[iAttribute] [int] NULL ,
[bItemEquip] [bit] NULL ,
[sItemPosX] [smallint] NULL ,
[sItemPosY] [smallint] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[SKILL_T] Script Date: 6/2/2005 2:01:15 PM ******/
CREATE TABLE [dbo].[SKILL_T] (
[CharID] [int] NOT NULL ,
[sSkillID] [smallint] NULL ,
[sSkillMastery] [smallint] NULL ,
[iSkillSSN] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CrusadeReportT] WITH NOCHECK ADD
CHECK ([Winner] = 'draw' or ([Winner] = 'elvine' or [Winner] = 'aresden'))
GO
ALTER TABLE [dbo].[CrusadeResultT] WITH NOCHECK ADD
CONSTRAINT [DF__CrusadeRe__total__4E88ABD4] DEFAULT (0) FOR [totalWin],
CONSTRAINT [DF__CrusadeRe__lastR__5070F446] DEFAULT (0) FOR [lastResultCount],
UNIQUE NONCLUSTERED
(
[nation]
) ON [PRIMARY] ,
CHECK ([lastWar] = 'draw' or ([lastWar] = 'win' or [lastWar] = 'lose')),
CHECK ([nation] = 'draw' or ([nation] = 'elvine' or [nation] = 'aresden'))
GO
ALTER TABLE [dbo].[HeldenianReportT] WITH NOCHECK ADD
CHECK ([Winner] = 'draw' or ([Winner] = 'elvine' or [Winner] = 'aresden'))
GO
ALTER TABLE [dbo].[HeldenianResultT] WITH NOCHECK ADD
CONSTRAINT [DF__Heldenian__total__5DCAEF64] DEFAULT (0) FOR [totalWin],
CONSTRAINT [DF__Heldenian__lastR__5FB337D6] DEFAULT (0) FOR [lastResultCount],
UNIQUE NONCLUSTERED
(
[nation]
) ON [PRIMARY] ,
CHECK ([lastWar] = 'draw' or ([lastWar] = 'win' or [lastWar] = 'lose')),
CHECK ([nation] = 'draw' or ([nation] = 'elvine' or [nation] = 'aresden'))
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_GetCrusadeLastLoser Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_GetCrusadeLastLoser
AS
SELECT * FROM CrusadeResultT WHERE lastWar='lose'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_GetCrusadeLastWinner Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_GetCrusadeLastWinner
AS
SELECT * FROM CrusadeResultT WHERE lastWar='win'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_GetHeldenianLastLoser Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_GetHeldenianLastLoser
AS
SELECT * FROM HeldenianResultT WHERE lastWar='lose'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_GetHeldenianLastWinner Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_GetHeldenianLastWinner
AS
SELECT * FROM HeldenianResultT WHERE lastWar='win'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeDraw Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetCrusadeDraw
AS
UPDATE CrusadeResultT SET totalWin=totalWin+1 WHERE nation='draw'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeLoserAresden Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetCrusadeLoserAresden
AS
UPDATE CrusadeResultT SET lastWar='lose', lastResultCount=0 WHERE nation='aresden' and lastWar='win'
UPDATE CrusadeResultT SET lastResultCount=lastResultCount+1 WHERE nation='aresden'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeLoserElvine Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetCrusadeLoserElvine
AS
UPDATE CrusadeResultT SET lastWar='lose', lastResultCount=0 WHERE nation='elvine' and lastWar='win'
UPDATE CrusadeResultT SET lastResultCount=lastResultCount+1 WHERE nation='elvine'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeWinner Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetCrusadeWinner
@Winner CHAR(7),
@StartDate DATETIME,
@EndDate DATETIME
AS
IF( @Winner = 'aresden' )
BEGIN
EXEC sp_SetCrusadeWinnerAresden
EXEC sp_SetCrusadeLoserElvine
END
ELSE IF ( @Winner = 'elvine' )
BEGIN
EXEC sp_SetCrusadeWinnerElvine
EXEC sp_SetCrusadeLoserAresden
ENd
ELSE IF ( @Winner = 'draw' )
BEGIN
EXEC sp_SetCrusadeDraw
END
INSERT INTO CrusadeReportT VALUES ( @StartDate, @EndDate, @Winner );
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeWinnerAresden Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetCrusadeWinnerAresden
AS
UPDATE CrusadeResultT SET lastWar='win', lastResultCount=0 WHERE nation='aresden' and lastWar='lose'
UPDATE CrusadeResultT SET lastResultCount=lastResultCount+1, totalWin=totalWin+1 WHERE nation='aresden'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetCrusadeWinnerElvine Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetCrusadeWinnerElvine
AS
UPDATE CrusadeResultT SET lastWar='win', lastResultCount=0 WHERE nation='elvine' and lastWar='lose'
UPDATE CrusadeResultT SET lastResultCount=lastResultCount+1, totalWin=totalWin+1 WHERE nation='elvine'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianDraw Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetHeldenianDraw
AS
UPDATE HeldenianResultT SET totalWin=totalWin+1 WHERE nation='draw'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianLoserAresden Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetHeldenianLoserAresden
AS
UPDATE HeldenianResultT SET lastWar='lose', lastResultCount=0 WHERE nation='aresden' and lastWar='win'
UPDATE HeldenianResultT SET lastResultCount=lastResultCount+1 WHERE nation='aresden'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianLoserElvine Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetHeldenianLoserElvine
AS
UPDATE HeldenianResultT SET lastWar='lose', lastResultCount=0 WHERE nation='elvine' and lastWar='win'
UPDATE HeldenianResultT SET lastResultCount=lastResultCount+1 WHERE nation='elvine'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianWinner Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetHeldenianWinner
@Winner CHAR(7),
@StartDate DATETIME,
@EndDate DATETIME,
@Type INT
AS
IF( @Winner = 'aresden' )
BEGIN
EXEC sp_SetHeldenianWinnerAresden
EXEC sp_SetHeldenianLoserElvine
END
ELSE IF ( @Winner = 'elvine' )
BEGIN
EXEC sp_SetHeldenianWinnerElvine
EXEC sp_SetHeldenianLoserAresden
ENd
ELSE IF ( @Winner = 'draw' )
BEGIN
EXEC sp_SetHeldenianDraw
END
INSERT INTO HeldenianReportT VALUES ( @StartDate, @EndDate, @Winner, @Type );
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianWinnerAresden Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetHeldenianWinnerAresden
AS
UPDATE HeldenianResultT SET lastWar='win', lastResultCount=0 WHERE nation='aresden' and lastWar='lose'
UPDATE HeldenianResultT SET lastResultCount=lastResultCount+1, totalWin=totalWin+1 WHERE nation='aresden'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/****** Object: Stored Procedure dbo.sp_SetHeldenianWinnerElvine Script Date: 6/2/2005 2:01:16 PM ******/
CREATE PROC sp_SetHeldenianWinnerElvine
AS
UPDATE HeldenianResultT SET lastWar='win', lastResultCount=0 WHERE nation='elvine' and lastWar='lose'
UPDATE HeldenianResultT SET lastResultCount=lastResultCount+1, totalWin=totalWin+1 WHERE nation='elvine'
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
And u see above i have it setup for ASP ......So someone signs up for a account it will create the account and give them a AccountID # lets say 1000 then next person who signs up will get 1001 and so on thats why i have it
[iAccountID] [int] IDENTITY (1001, 1) NOT NULL ,
start at 1001 add 1 for each new User 1002 , 1003 and so on.....Iam not that good at MSSQL but its not thathard to figure it out

OO and to make sure u all understand this still does not let u change your Password from Client but its the closet thing I think is correct so far.....Anyone who knows there shit please respond to this and correct me if u like .....