[SQL Version] Update Database

smoochy boys on tour

Sanity

Legend
Legendary
Nov 7, 2007
3,809
115
300
Right Click CHERODB > All Tasks > Import Data
2ui840i.jpg


Click Next.


From drop down list, select Microsoft Access
2vlnznq.jpg


Browse to CT.mdb
67ocog.jpg


Click Next

Make sure CHERODB is selected.
f2rfom.jpg


Select Copy Tables
fmc8m.jpg


Click Select All.
You have to click the browse button all tables and do the following settings.
Create destination Table
Drop and re create destination table
Make sure you do this for all tables.
2dlotol.jpg


Then keep clicking next until it saves.

Once done, right click Tables and Refresh.

ID Fix:
Right Click Stditems.dbo > Design Table
Untick Allow Nulls for IDx and Name.
Right Click IDx and Set Primary Key
Save.

Human_Info_Add Fix:
Go to CHERODB > Stored Procedures.

Locate Human_Info_Add and double click to open it.

Select everything inside and replace with this.
Code:
CREATE PROCEDURE HUM_INFO_ADD
    @ACCOUNT   varchar(15) ,
    @NAME  varchar(15) ,
    @Hair tinyint ,
    @Sex tinyint ,
    @Job tinyint ,
              @YSMaster varchar(15)
AS
 DECLARE     @BinaryData binary(1647)
 
 IF EXISTS(SELECT ACCOUNT FROM D_HUM_INFO WHERE NAME=@NAME)
   RETURN(2)
ELSE
BEGIN
  if   @YSMaster=''   and      (SELECT Count(*) FROM D_HUM_INFO WHERE (ACCOUNT=@ACCOUNT)and (YSMaster='') and(boDelete=0) )>=3
      RETURN(3)
  INSERT INTO D_HUM_INFO
         (ACCOUNT,
    NAME,
             YsMaster,
    Hair  ,
    Sex  ,
    Job ,
BinaryData,
 boDelete,
boSelect,
UpDateTime 
 
          )
  VALUES (
@ACCOUNT,
    @NAME,
             @YsMaster,
    @Hair ,
    @Sex  ,
    @Job, 
             @BinaryData,
             0,
             0,
             GetDate()
     ) 
   RETURN(1)

END
GO
 

OxxpqxxO

Dentity
Veteran
Oct 25, 2012
331
44
55
All good so far,

Not going to select Create destination table, Drop and recreate destination table... what can I do?

Untitled.jpg
 
Last edited:

Sanity

Legend
Legendary
Nov 7, 2007
3,809
115
300
Did you first restore the ct.dat? and did you make sure CHERODB was selected on the 4th image?.

This isn't the way i do it tbh, it's the way it's ment be done but if you want my way this is what i do.

Delete .dbo tables stditems, Magic, Monster.
Follow the guide up to the part you are now.
Just select stditems, magic and monster tables.

Don't do the browse just click next, this should re make those tables.

The other tables are not edited anyway, no need to change.
 
Last edited:

OxxpqxxO

Dentity
Veteran
Oct 25, 2012
331
44
55
I did as you said but I found another problem.

Untitled.jpg
 
Last edited:

Sanity

Legend
Legendary
Nov 7, 2007
3,809
115
300
When you import the table stditems, click browse and untick null for name and IDx. Seems on your SQL version it won't let you change after the table is made.
 

OxxpqxxO

Dentity
Veteran
Oct 25, 2012
331
44
55
Ok, done... it is necessary to Set Primary Key for IDx?
 
Last edited: