Thanks Daniel,

For anyone using MSSQL with replication (and therefore having rowguid
columns added to farcry tables), DON'T use the COAPI Fix Tree
function, (especially without backing up first, of course).


In farcry_core/admin/admin/fixtree.cfm (approx line 310 in FC3.0):

                <cfquery name="qUpdateVals" datasource="#dsn#" >
                    insert into nested_tree_objects
                    select objectid, parentid, objectname, '#form.typename#'
as typename, nleft, nright, nlevel
                    from #temptablename#
                </cfquery>


Should probably be changed to:

                <cfquery name="qUpdateVals" datasource="#dsn#" >
                    insert into nested_tree_objects
                    (objectid, parentid, objectname, typename, nleft, nright, 
nlevel)
                    select objectid, parentid, objectname, '#form.typename#'
as typename, nleft, nright, nlevel
                    from #temptablename#
                </cfquery>

...to name insert columns explicitly (which is good SQL practice).

Without this change, the nested_tree_objects data is deleted, but not
reinserted
(result: misery).


On 12/30/05, Daniel Niklasson <[EMAIL PROTECTED]> wrote:
>
> Check this url..
>
> http://www.ibase.ru/devinfo/DBMSTrees/sqltrees.html
>
> nright and nleft are called lft and rgt in that document.
>
> It's a common thing that the tree gets screwed. It's mostly when
> somebody moves an tree node and don't let the page finish the reorder of
> the tree before moving another node.
>
> / Daniel
>
> Vorn wrote:
>
> >Something gone screwy with our tree and I'm trying to do a bit of
> >diagnostic work...
> >
> >I'm a bit confused - can someone explain to me how the nLeft and
> >nRight columns work in nested_tree_objects?
> >
> >
>

Reply via email to