Register for your free account! | Forgot your password?

You last visited: Today at 11:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Question about query

Discussion on Question about query within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2009
Posts: 671
Received Thanks: 288
Question about query

Well I got this query from epicsoul but cant get it work
I must change
AssocFile256 = 'xxx'
to
AssocFile256 = 'c:\regioninfo.txt'
But when I change nothing happened.Refregion table is still clean.How can I get it work

PHP Code:
USE [SRO_VT_SHARD]
GO
<-- for epvpers from epicsoul :)--->
/****** Object:  StoredProcedure [dbo].[_InsertRefRegion]    Script Date: 05/10/2012 22:45:19 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER    PROCEDURE 
[dbo].[_InsertRefRegion]
@
RegionID        as smallint,
@
X_NotUsed        as int,
@
Z_NotUsed        as int,
@
Continent        as varchar(128),
@
AreaName        as varchar(128),
@
IsBattleField        as tinyint,
@
ClimateID        as int,
@
Capacity        as int
as
begin transaction
begin
    
declare @_x    tinyint
    
declare @_z    tinyint
    
if (@RegionID 0)
    
begin
        set 
@_x = @RegionID 256
        set 
@_z = @RegionID 256
    end
    
else
    
begin
        set 
@_x 0
        set 
@_z 0
    end
    
if (exists(select wRegionID from _RefRegion where wRegionID = @RegionID))
    
begin
        update _RefRegion 
        set     X 
= @_x= @_zContinentName = @ContinentAreaName = @AreaNameIsBattleField = @IsBattleField,
            
Climate = @ClimateIDMaxCapacity = @CapacityAssocObjID 0,
        <-- 
insert the refregion path here-->
            
AssocFile256 'xxx'
        
where wRegionID = @RegionID
    end
    
else
    
begin
        insert into _RefRegion
(wRegionIDXZContinentNameAreaNameIsBattleFieldClimateMaxCapacityAssocObjIDAssocServerAssocFile256)
        
values (@RegionID, @_x, @_z, @Continent, @AreaName, @IsBattleField, @ClimateID, @Capacity00'xxx')
    
end
    
     
if (@@error <> 0)
    
begin
        raiserror
('리젼정보 추가 [혹은 갱신] 실패했다! [RID: %d]' ,  116, @RegionID)
        
rollback transaction
        
return
    
end
    commit transaction
end 
LegendM is offline  
Old 06/11/2012, 02:18   #2
 
FoxRayz's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 1,715
Received Thanks: 892
PHP Code:
USE [SRO_VT_SHARD

Make sure this one is the same as your shard name
FoxRayz is offline  
Old 06/11/2012, 02:22   #3
 
Kape7's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,301
That makes no sense, that query is from the vsro files and it is not used for insert the info from the regioninfo file. Also for what you need it?
Kape7 is offline  
Old 06/11/2012, 12:28   #4
 
elite*gold: 0
Join Date: Aug 2009
Posts: 671
Received Thanks: 288
Quote:
Originally Posted by Synx7 View Post
That makes no sense, that query is from the vsro files and it is not used for insert the info from the regioninfo file. Also for what you need it?
I want add new regions using this query?So I cant ? <.<
LegendM is offline  
Old 06/11/2012, 12:46   #5
 
elite*gold: 505
Join Date: Nov 2008
Posts: 600
Received Thanks: 522
it doesn't work.. i mean you can't add new data to _refregion from regioninfo.txt
pH33n1x<3 is offline  
Old 06/11/2012, 12:55   #6
 
elite*gold: 0
Join Date: Aug 2009
Posts: 671
Received Thanks: 288
Quote:
Originally Posted by pH33n1x<3 View Post
it doesn't work.. i mean you can't add new data to _refregion from regioninfo.txt
But this query exactly for that :/
LegendM is offline  
Old 06/11/2012, 12:55   #7
 
Janick_'s Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 992
Received Thanks: 195
@LegendM, just copy them from the refregion.txt on client , should take some time but not that long.

Ctrl+a, ctrl+c then ctrl+v in _RefRegion table should do the job
Janick_ is offline  
Old 06/11/2012, 13:05   #8
 
elite*gold: 0
Join Date: Aug 2009
Posts: 671
Received Thanks: 288
Quote:
Originally Posted by Janick_ View Post
@LegendM, just copy them from the refregion.txt on client , should take some time but not that long.

Ctrl+a, ctrl+c then ctrl+v in _RefRegion table should do the job
Oh ***,refregion.txt have 2 coloums.Db need much more then txt
LegendM is offline  
Old 06/11/2012, 13:23   #9
 
Janick_'s Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 992
Received Thanks: 195
Quote:
Originally Posted by LegendM View Post
Oh ***,refregion.txt have 2 coloums.Db need much more then txt
I don't know how your refregion.txt looks but mines have the same amount of collumns as the db, only difference is that the linking is not done there and they all say NULL there. Just take that txt, put it into excel, replace all NULL's with 0's with search and replace, place it into ur database, and execute the producure that links the regions ..
Janick_ is offline  
Old 06/11/2012, 13:32   #10
 
ahmed4ever2u's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,515
Received Thanks: 891
Code:
/**Have Fun **/
use SRO_VT_SHARd
delete from _RefRegion
BULK INSERT _RefRegion FROM 'c:\regioninfo.txt' WITH (FIELDTERMINATOR = '\t')
ahmed4ever2u is offline  
Old 06/11/2012, 13:54   #11
 
elite*gold: 0
Join Date: Aug 2009
Posts: 671
Received Thanks: 288
Quote:
Originally Posted by Janick_ View Post
I don't know how your refregion.txt looks but mines have the same amount of collumns as the db, only difference is that the linking is not done there and they all say NULL there. Just take that txt, put it into excel, replace all NULL's with 0's with search and replace, place it into ur database, and execute the producure that links the regions ..
Can you show yours?

@ahmed

It need special query
LegendM is offline  
Old 06/11/2012, 16:49   #12
 
Janick_'s Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 992
Received Thanks: 195
Quote:
Originally Posted by LegendM View Post
Can you show yours?

@ahmed

It need special query


It only shows 3 rows on that screen, idk why, but thats how it looks.
Janick_ is offline  
Reply


Similar Threads Similar Threads
Query Question!!!
12/22/2010 - EO PServer Hosting - 1 Replies
we can use 1077 as MYSQL command and data as 5 so we can SELECT name FROM cq_user WHERE id=1000000 and we can use 101 and %iter_var_data5 so we can see the result but the problem is the %iter_var_data << can handle only numbers so it's always giving me a ruslt of 0 is there a way to get a value of text from aonther table i hope you got it!!?
[Question]Query
06/22/2010 - EO PServer Hosting - 4 Replies
Guys, i got some problem here can check my query. I try to add new eudemon CancerQueen but eudemon can't hatch. Here my query.
SQL query question
05/09/2010 - Shaiya Private Server - 1 Replies
Lock this or delete lol i found my answer :)
[QUESTION]Auto Query
05/08/2010 - EO PServer Hosting - 4 Replies
I have got asaved query but i need to know if it can run auto after i close the server without runing it ?
Quick MSQL query question
11/26/2008 - EO PServer Hosting - 4 Replies
In my cq_goods I have 13xx lines and I need to change owner id to 1207 for shopping mall. Is there a query that can be made to just alter the owner id and not effect anything else?



All times are GMT +1. The time now is 11:06.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.