Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

odd DataAdapter behaviour

Status
Not open for further replies.

Zarcom

Programmer
May 7, 2002
1,275
CA
I ran across a rather odd behaviour I thought I would let the rest of you know about.

I had a dataAdapter - lets call it DA - Useing the Visual tools I dragged it onto my web service page, set it up using a stored proc. The problem came from the way VS set up the DA with it's table mappings.

My SProc has 3 select statments only two however are returned depending on an IF statment. So even though there are 3 statments only 2 are executed returning 2 recordsets.

VS however, interpreted the SPROC to returning 3 recordsets and set up a Table mapping for each of them. I didn't think nothing of it at the time. However, when the recordsets are actually returned they follow the table mappings in order. So when the 2nd recordset - 3rd Select in the SPROC - was bound into the dataset, VS intrepreted that to be the 2nd select in the SPROC.

Fortunately in my case the first two selects returned identical schema's so I merely manually cut out the designer added code for the second select and called the 3rd table mapping as the second one.

I am not sure of a true solution to this workaround but it does work.

If for some unnatural reason I have lost anyone - like my rambling sentences - Please feel free to post and ask me questions I will try to clear up any ambiguous parts.

Have fun That'l do donkey, that'l do
[bravo] Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top