You are right. I wish I could give you solution stars for this thread (not that you need them <g>). Thank you so much. The strange thing was that my code relied in so many places on this cursor (adding record, replacing, etc.). And I guess my error handler was eating all those errors and somehow the procedure would get to the end and return success. I never thought about the error handler.
Maybe, if you don't mind, I can ask you another question. The reason I was commenting this line that was creating a cursor is I am trying to find an operation in the stored procedure that would return error "Invalid path of file name." But so far nothing I do creats this error. Can you think of what might create this type of error.
Again, thank you for your help.
>Maybe you've error handler in place that eats all errors?
>
>>I even rebooted the computer and still no error. I also added an no existing alias line :
>>
>>select FSDFDS
>>
>>
>>And the code goes over this line like no problem. I also inserted some lines that create token files so that I know that the code runs in this stored procedure. The token files are created. But no error message on line that try to open non-existing alias.
>>I just don't know what to try ...
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham