Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

If I have a Stored Procedure and use the SqlDataSource to connect to it, my grid (MS or Infragistics) picks up the schema no problem and gives all the columns a basic formatting with what it believes the schema is intending. Not always perfect, but it's a starting point.

 

Now I take the same Stored Procedure and access it through a WebService or an SQLServer Endpoint (turns a stored procedure into a web service call) and I add the WebReference to my project. Everything is looking fine and when I view the ASMX file (for the WebService) I get a list of methods and when I Invoke one, I see a schema prior to the returned information.

 

But I connect an ObjectDataSource to a WebMethod on the WebService and connect a grid to the ObjectDataSource I get nothing. Just a blank grid. It's not showing the schema at all.

 

All the examples I find of a GridView consuming a WebService shows it being bound in code, which doesn't allow you any designtime support and the GridView then displays all columns with default types and column names.

 

How do you actually consume a Web Service correctly so that it conveys the schema?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...