I'm working on the samething and I've been at this for 10+ years. it's all a matter of structure. If you structure it right you dont need to code around it. This is what I've come up with. Use a basic sql statement to get what your want. "select * from table1;. Plug it into the sp and go from there.