Multiple tables from single sproc in 2005 (2.0)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In VS2003, I was able to create a dataset with multiple tables from a stored
procedure by dragging that stored procedure onto the dataset canvas. I use a
single stored procedure to grab a snapshot of the currently relevant data and
cache it locally to reduce the number of calls to the database to 1 per day.

In VS2005 RC, doing the same steps, I can only get the first table to load.

Is this a limitation of what the framework can represent, or just a
short-fall of the editor? And if it's just the editor, will this be
addressed? And how can I configure the Dataset file manually?

Thanks,

Jason
 
I have not tried drag and drop, so it is possible this is a fubar in the RC
build. There are a couple of ways around this.

1. Open the strongly typed DataSet (XSD) created and add the extra tables in
the designer.

2. Hand code the DataSet and use WriteXmlSchema to create the STD. Copy the
tables in the XSD created to the XSD created from drag and drop.

Hopefully, this is fixed in RTM.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Without being able to specify a connection string and stored procedure
parameters, many of the advantages of the automatic databinding are lost.
With your suggested methods, I'm stuck "manually" filling the dataset each
time, right?

Thanks,

Jason
 
But the visual studio 2005 strongly-typed dataset editor only recognizes the
first table of those returned by a stored procedure.

If I load that same stored procedure with code (instead of autogenerated)
into a dataset, all tables are returned. I can DataSet.WriteXMLSchema(), but
this does not create TableAdapters in XML the same way the auto-generation
does.

I can't figure out how to manually create a TableAdapter in the XSD which
knows that its source is
MultiResultTableStoredProcedure1[INT_CURRENT_TABLE_NUMBER]

Jason
 
Back
Top