Welcome to KORG!

Take a look at some of the MapDrive functions that are available. The one on my web site is used in our Universal Login Script because it returns more information about the error than the Kix Use command. It might help you narrow down the problem faster.

Also, be sure to look at the error codes when you run the Use (or mapdrive) command.. change your code slightly..

Declare $Err and $ErrS variables, then - after each USE command, add
 Code:
If @ERROR $Err = @ERROR $ErrS =@SERROR EndIf
This saves the error state of the Use command. Next, for debugging, you can add this just before the EndFunction
 Code:
If $Err $ErrS @CRLF EndIf
Be sure to exit your function properly with
 Code:
Exit $Err
Glenn


_________________________
Actually I am a Rocket Scientist! \:D