in reply to Can't execute sql

ct_cmd_alloc() failure is an internal failure in the Sybase libraries. It's a this shouldn't happen error that DBD::Sybase can't really do anything about.

The Sybase manual states that the most common reason for failure of ct_cmd_alloc() is lack of memory, however I've seen this in situations where the connection structure is invalid.

My guess is that your internal connection value (which is referenced by $$dbh) is somehow invalid, or has been corrupted. What does the script do before it gets to this point?

Michael