• To catch those elusive error messages you could also try:

    Declare @SQL nVarChar(4000)

    Set @SQL=N'osql -Usa -P -Q"declare @t table(PKey Int not Null) insert @t select Null"'

    Exec xp_CmdShell @SQL

    and do whatever you want with the response



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.