• Dude, that was a mistake in changing the name of the table, before copying the piece of the code and removing company specific info and other parts, not concerned with the problem.

    I found out the issue any way. Whenever I executed the stored procedure, I didn't notice that I got a warning which said, "Warning! The maximum key length is 900 bytes. The index 'IX_PhyPathTemp' has maximum length of 1024 bytes. For some combination of large values, the insert/update operation will fail.".

    When I removed the line where I created index on the table, I didnot face the problem and I could get a resultset in the COM function.

    But Seth, how come I got the warning, as the index is created on a single column with a length of 512 bytes?

    Thanks in advance,

    Renuka Prasad.