Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 16.06.2005, 11:40   #1
iamrend
Архивный участник
 
Join Date: May 2005
Posts: 315
Default DATABASE ERROR

I got this error when i try to change the name of a char.


that i need to do for solve it?
iamrend is offline  
Old 16.06.2005, 11:52   #2
EverCooL
Архивный участник
 
Join Date: Apr 2005
Posts: 76
Default

Try this
Open your query analyzer
Paste this as a query for DB lin2world

Quote:
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 !
EverCooL is offline  
Old 16.06.2005, 11:54   #3
Mr.Ravya
Архивный участник
 
Join Date: Apr 2005
Posts: 10
Default

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
Mr.Ravya is offline  
Old 16.06.2005, 12:03   #4
iamrend
Архивный участник
 
Join Date: May 2005
Posts: 315
Default

and for change a character to another account?
because i need to change account and userid
Quote:
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
iamrend is offline  
Old 16.06.2005, 12:32   #5
krapno
Архивный участник
 
Join Date: May 2005
Posts: 368
Default

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 !

Code:
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:
krapno is offline  
Old 16.06.2005, 12:57   #6
BiGBoY
Архивный участник
 
Join Date: May 2005
Posts: 216
Default

Quote:
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.
BiGBoY is offline  
Old 16.06.2005, 14:00   #7
iamrend
Архивный участник
 
Join Date: May 2005
Posts: 315
Default

and for ban a account i dunno that i can do, i get the same error. are any way to solve it?
iamrend is offline  
Old 16.06.2005, 14:25   #8
krapno
Архивный участник
 
Join Date: May 2005
Posts: 368
Default

yet posted, use search !!!

Code:
/* 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
krapno is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:30.