Question about query

06/10/2012 23:57 LegendM#1
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 
06/11/2012 02:18 FoxRayz#2
PHP Code:
USE [SRO_VT_SHARD

Make sure this one is the same as your shard name :)
06/11/2012 02:22 Kape7#3
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?
06/11/2012 12:28 LegendM#4
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 ? <.<
06/11/2012 12:46 pH33n1x<3#5
it doesn't work.. i mean you can't add new data to _refregion from regioninfo.txt
06/11/2012 12:55 LegendM#6
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 :/
06/11/2012 12:55 Janick_#7
@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:p
06/11/2012 13:05 LegendM#8
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:p
Oh god,refregion.txt have 2 coloums.Db need much more then txt
06/11/2012 13:23 Janick_#9
Quote:
Originally Posted by LegendM View Post
Oh god,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 ..
06/11/2012 13:32 ahmed4ever2u#10
Code:
/**Have Fun **/
use SRO_VT_SHARd
delete from _RefRegion
BULK INSERT _RefRegion FROM 'c:\regioninfo.txt' WITH (FIELDTERMINATOR = '\t')
06/11/2012 13:54 LegendM#11
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
06/11/2012 16:49 Janick_#12
Quote:
Originally Posted by LegendM View Post
Can you show yours?

@ahmed

It need special query
[Only registered and activated users can see links. Click Here To Register...]

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