>Again, thank you for taking the time to explain. As you can see I didn't realize that the line [ds = null] created a new instance. I thought that the new instance has to be created with declaration like:
>>Dataset dsName;
>
>
>This is what was confusing that without declaring I was creating new instance.Yes, I can see how that might be confusing. Look at it this way: anytime you use "object = whatever;" in your method, you are pointing that object to a new spot in memory and you've lost your original reference. That's the important thing to remember about passing objects by reference.
~~Bonnie