>Hi,
>
>I've found a problem with the SYS(0) function. I work on an in-house database system, which most users use in a network setting, with a few working on stand-alone computers.
>
>I've been using SYS(0) to get the user and computer names which has been working fine until now. One of the stand-alone users had a problem with copying files from their computer to another and had to restart their computer. After that, we found that the SYS(0) function is returning a blank for the username.
>
>Does anyone know where SYS(0) looks? Alternatively, is there another way of getting this information?
>
>Thanks,
>
>Stewart
Stewart,
This is documented. If it's standalone then username would be empty.
I don't know the exact one but it's mapping to WNetGet* API.
You could workaround it by checking return value and poking HDD serial or say user name got from a login dialog as appropriate.
Cetin