You would normally get this error if you tried to execute something without first connecting, or after disconnecting. See here in DCX.
Typically, if the connection would dropped by the server or due to a network or other error, you would get the error "Communitions error" (see here), or possibly "Connection was terminated" (see here).
If it isn't obvious why you are getting an error, perhaps enabling -z -zr sql (communication diagnostics and request level logging server options) on the server and LogFile=file on the client will help.
answered 29 Jul '11, 08:49