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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Long: ASP.NET questions

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm working on a project;actually my final year project for college and these are the things I'm haveing a problem with:

I have created a small WebService which basically takes the items table from My database and sets them up in a datagrid. Now which was would be the best to manipulate this datagrid? Would I be better off writing functions inside this service to manipulate the data and return exactly what is wanted e.g. making a select command on the datagrid and return those specific rows wanted? Or would I be better to write a seperate Webservice to manipulate this webservice(hmmmm, that actually sounds a bit stupid thinking about it). Also, normal database commands work with the datagrid i.e. select, insert etc.

Cheers
 
Hey John,

What I would do is have your webservice only return the actual data (which could be in a datatable)

Then your aspx page (where the datagrid lies) only has to bind to the data and go from there.

jack
 
Cheers Jack,

So what your basically saying is have my WebService Return all the data and my actual aspx page(that is calling the webservice) do the selection of data to display?

hmmm, datatable, I don't really know much about them, would it be worth my while using that in the webservice instead of a datagrid?
 
Hey Johnner,

It really depends what you're trying to do I guess.

Just as an example, lets say that I'm a food supplier for some restaurant, and my clients can search my catalog by logging into my webservice and telling me what they want to see.

So they have some way to enter "Chicken Pieces". My web service would compile a set of data based on their criteria, and return it to them in some form (xml or possibly, if its a .NET app for sure calling the web service, a data table).

Back at the client's app or web page, there is code to take the returning data and display it. So the webservice isn't returning all the data, only the data requested.

thats how I would tackle that instance but I'm not sure what your situation is. As far as the datatable, instead of old school recordsets, .NET has Datasets, which can hold data tables, which in turn hold data rows, etc. etc.

When you bind a datagrid to a dataset, you're actually binding it to a data table within that data set. Hence, you could skip the dataset object all together (unless you wanted to return more than one table, which is where the dataset really comes into play.)

Anyway, this is getting long, but I hope it helped somewhat. let me know if you need anything else.
:)

Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top