PDA

View Full Version : DATABASE ERROR


iamrend
16.06.2005, 11:40
I got this error when i try to change the name of a char.
http://img20.paintedover.com/uploads/20/errorsql.jpg

that i need to do for solve it?

EverCooL
16.06.2005, 11:52
Try this
Open your query analyzer
Paste this as a query for DB lin2world

UPDATE lin2world.dbo.user_data SET char_name='<new_char_name>' WHERE char_name='[list=1]'

Replace the <new_char_name> and [list=1] and don't forget the '

Best of luck !

Mr.Ravya
16.06.2005, 11:54
run Query Analyzer and copy this

use lin2world;
update user_data set char_name = 'new_char_name' where char_name = 'old_char_name';

then press F5

iamrend
16.06.2005, 12:03
and for change a character to another account?
because i need to change account and userid
UPDATE lin2world.dbo.user_data SET account_name='<new_acc_name>' WHERE char_name='[list=1]'

UPDATE lin2world.dbo.user_data SET account_='<new_id_name>' WHERE char_name='[list=1]'


Thanks :)

krapno
16.06.2005, 12:32
1) Dont change anything manually editing tables when server is running
2) Maybe u should use "MS-SQL Server's SQL Query Anaylyzer" and run this SQL script:

NB: Replace 666 by your char_id and noob by any new name you want, u cannot have 2 chars with same name !

USE lin2world
DECLARE @NewCharName as varchar(50);
DECLARE @OldCharID as int;
SET @NewCharName = 'noob';
SET @OldCharID = 666;
IF NOT EXISTS (SELECT char_name FROM user_data WHERE char_name = @NewCharName)
BEGIN
UPDATE user_data
SET user_data.char_name = @NewCharName
WHERE user_data.char_id = @OldCharID;
PRINT 'char_id ' + CAST(@OldCharID AS varchar(5)) + ' updated successfully !';
END
ELSE
BEGIN
PRINT 'CHARNAME "' + @NewCharName + '" IS IN USE BY ANOTHER CHAR!';
END

Regards :wink:

BiGBoY
16.06.2005, 12:57
NB: Replace 666 by your char_id and noob by any new name you want, u cannot have 2 chars with same name ! ROFLMAO nice ex

Anyhow, u can do it manualy thou. To bypass firehose mode all u need to do is select another row and hit the run button.Take a look at icon in the beginning of the row u r editing. U will notice it change depending on mode.

iamrend
16.06.2005, 14:00
and for ban a account i dunno that i can do, i get the same error. are any way to solve it?

krapno
16.06.2005, 14:25
yet posted, use search !!!

/* BAN ACCOUNT */
USE lin2db

/* BAN 1 ACCOUNT */ UPDATE user_account SET pay_stat = 0 WHERE uid = 666;
/* UNBAN 1 ACCOUNT */ UPDATE user_account SET pay_stat = 1 WHERE uid = 666;

/* BAN 3 ACCOUNTS */ UPDATE user_account SET pay_stat = 0 WHERE uid IN (666,777,888);
/* UNBAN 2 ACCOUNTS */ UPDATE user_account SET pay_stat = 1 WHERE uid IN (666,777,888);

Replace 666,777,888 by uid accounts u want ban !
This way ban all chars on 666,777,888 accounts and a message will appear on their client like they have to pay to continue to play :D