Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Who has file open
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01382579
Message ID:
01382753
Vues:
44
Hi Vladimir,

Did you change the second YourServerName to your server name?

BTW, I got the exact same error, but right at the top.

>Hi Hugo,
>I got this error message when I try
>check attached file
>
>* Open Sessions
>local loConnection, loSessions, loSession
>lcServer            = "zografski"
>loConnection            = GetObject("WinNT://" + lcServer + "/LanmanServer")
>loSessions            = loConnection.Sessions()
>
>create cursor C_Sessions ;
>    ( ;
>        PK            I         autoinc    , ;
>        Computer        C(64)            , ;
>        ConnectedTime        I            , ;
>        IdleTime        I            , ;
>        Name            C(64)            , ;
>        User            C(64)              ;
>    )
>
>For Each loSession in loSessions
>    wait window 'Adding: ' + loSession.Name nowait
>    with loSession
>        try
>            insert into C_Sessions ;
>                    (    ;
>                        Computer                , ;
>                        ConnectedTime            , ;
>                        IdleTime                , ;
>                        Name                    , ;
>                        User                      ;
>                    ) ;
>                values ;
>                    ( ;
>                        .Computer                , ;
>                        .ConnectTime            , ;
>                        .IdleTime                , ;
>                        .Name                    , ;
>                        .User                      ;
>                    )
>        catch
>        endtry
>    endwith
>endfor
>
>wait window 'Creating indexes...' nowait
>
>index on    PK            tag PK
>index on    Computer    tag Computer
>index on    Name        tag Name
>index on    User        tag User
>
>wait clear
>
>
>* Open Files
>local loConnection, loResources, loResource, llValid
>
>lcServer            = "YourServerName"
>loConnection            = GetObject("WinNT://" + lcServer + "/LanmanServer")
>loResources            = loConnection.Resources()
>
>create cursor C_Resources ;
>    ( ;
>        PK        I Autoinc        , ;
>        Name    C(240)            , ;
>        User    C(64)            , ;
>        Path    C(240)            , ;
>        ADsPath    C(240)            , ;
>        GUID    C(64)            , ;
>        Schema    C(240)            , ;
>        Locks    I                  ;
>    )
>        
>For Each loResource in loResources
>    with loResource
>        try
>            lcPath                    = .Path
>            llValid                    = .t.
>        catch
>            llValid                    = .f.
>        endtry
>        if llValid
>            wait window 'Adding resource: ' + .Path nowait
>            insert into C_Resources ;
>                    ( ;
>                        User                , ;
>                        Name                , ;
>                        Path                , ;
>                        Locks                  ;
>                    ) ;
>                values ;
>                    ( ;
>                        .User                , ;
>                        .Name                , ;
>                        .Path                , ;
>                        .LockCount              ;
>                    )
>        endif
>    endwith
>endfor
>
>wait window 'Creating indexes...' nowait
>
>index on    PK        tag PK
>index on    Path        tag Path
>index on    User        tag User
>BROWSE NORMAL
>wait clear
>
>
>>Take a look at this message to see if it helps you http://www.foxite.com/archives/0000209756.htm
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform