Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / July 2006

Tip: Looking for answers? Try searching our database.

How to expose a database from a Web Service?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MisterT - 18 Jul 2006 17:31 GMT
Hello,
I have a web service that updates an SQL database thru a web service.  I
would like to expose the database table so I can easily add it as a Data
Source in VS 2005 to program the web service client.

Any ideas how to do this?

Thank you,
Tom
Francois Bonin [C# MVP] - 19 Jul 2006 04:25 GMT
1) Your web service will need to have a complete set of methods for working
with your database table (retrieval, update , deletion, insertion).

2) You create a class that contains properties representing the fields in
your data table

3) You create a class that will have methods for inserting, deleting,
retrieving and updating the rows in your database table. Those methods will
accept objects of the class created in step 2 as parameters and will be
wrappers around your webservice calls.

4) Within your application, you can use a
System.Web.UI.WebControls.ObjectDataSource linked to your classes
(DataObjectTypeName property will be the name of the class created in step
2, TypeName property will be the name of the class created in step 3)

You should have a look at ObjectDataSource in MSDN for specifics and further
details.

HTH,
Cois

> Hello,
> I have a web service that updates an SQL database thru a web service.  I
[quoted text clipped - 5 lines]
> Thank you,
> Tom

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.