VB6 has tools T-SQL
Directly use Query Analyzer to debug it, after you write a stored procedure, call this stored procedure via EXEC plus parameter, if an error, add Print ('ok') in the corresponding place; as if Delphi breakpoint Same, if there is no string OK in the stored procedure, it is proved that it has not been executed here, and then the statement is forwarded, you can also set multiple breakpoints (PRINT (' String ')), patiently can find the wrong error. This is a tip that debug stored procedures, of course, if there is a related tool, but this is almost the principle of setting breakpoints.
Good luck