471,309 Members | 1,077 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,309 software developers and data experts.

create a newrow in distributed application?


I have just started c# .net about 3 months ago and have recently (last week)
upgraded to 2005 and hoping for some
assistance understanding the best approach to adding new records to a table.

The application that I am creating is a distributed application that has an
Oracle DB, an XML WebService, and a
Windows Forms application front end - similar to:

I am trying to gain a better understanding of how to create a new row in a
table, and the steps that I think I should
be doing are outlined below - if anyone can comment on as to whether or not
I am on the right track or otherwise I
would be very grateful.

On the WebService:


Create a DataSet that contains multiple datatables using the wizard.

This becomes an <dataset>.xsd file.


Now want to create a new row and display this to the user for editing on a
WinApp. (webmethod: createNewRow())

What I think I should be doing is creating a dataset that is an instance of
the <dataset>.xsd class file,
create an instance of the datatable (unpopulated) that is the table within
this dataset that I want to create
the new row for, then create the newrow object as a row of this table.

I would do this on the web service so as to be able to initialise a couple
of fields before displaying it on the form (
eg id field).


Then from the WinApp it would be cool to be able to reference the datatable
that has the new row that was just created
and allow editing from here...however I think I have to pass datasets rather
than datatables as it seems you cant pass
datatables to a web service?

This appears like it *should* be fairly straightforward however I am new to
..Net and am hoping for some
advice/comments. Are there alternative ways to do this that I have not
thought of?

If this seems like the best approach I will go ahead and implement it and
post the code to the group, as I myself have
had a bit of trouble finding something that achieves this in 2005.


Dec 21 '05 #1
0 893

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Constandinos Mavromoustakis | last post: by
10 posts views Thread by Jim Hubbard | last post: by
3 posts views Thread by Joris Dobbelsteen | last post: by
4 posts views Thread by tsui | last post: by
4 posts views Thread by noagbodjivictor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.