473,597 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to expose a database from a Web Service?

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

Jul 18 '06 #1
1 1590
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.W ebControls.Obje ctDataSource linked to your classes
(DataObjectType Name 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 ObjectDataSourc e in MSDN for specifics and further
details.

HTH,
Cois

"MisterT" <Mi*****@discus sions.microsoft .comwrote in message
news:73******** *************** ***********@mic rosoft.com...
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

Jul 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1539
by: David | last post by:
Hello. Can anybody show me how can I expose method from my Windows Service application?
1
2421
by: Hank | last post by:
I am writing a windows service in C#.NET which will manage image capturing devices, when client connects to the service, at some point the service need to expose a device dialog to the client for setting some device specific parameters. According to MSDN docs, classes within the Windows Forms namespace are not supported for use within a Windows service. So How can I do that? Thanks! HELP: expose Windows dialog from Windows Service
1
1565
by: C | last post by:
Hi, I have a class withing my ASP.Net project which I want other applications to use so I am going to create a separate Assembly for this. In addition to this I want to know if it is possible to expose this Assembly as a web service that other companies can use?
6
4896
by: cipher | last post by:
I have some constant values in my web service that my client application will require. Having to keep server side and client side definitions insync is tedious. I am trying to do something like this: public __value enum Colors { Red = 1, Green = 2, Blue = 4, Yellow = 8 }; However, the resulting wsdl omits the actual flag values: - <s:simpleType name="Colors">
3
6313
by: Miguel Ferreira via .NET 247 | last post by:
Hi ! I have developed a class Library with several classes and methods. Its working fine with a windows forms test application, but now i need to create a webservice that will expose those methods. Do i have to create a method signature replica to all interfaces and methods, that will consume the internal class library, like this: <WebMethod()> _ Public Function Method1() As TypeDefinedInClassLibrary 'Call Method1 in class library...
0
1225
by: kostadin | last post by:
I want to expose the whole functionality of a library through a web service. In order to do that of course I've created web methods for all public methods in this library. Because only public data and no logic or private fields is transferred through web services, I need to know what is the correct pattern for invoking the methods of the proper objects. By now I've found two possible patterns: 1) Objects are created on the server and then...
0
1869
by: doron.grinstein | last post by:
A lot of architects tackle the issue of exposing internal web services and web applications to the Internet. How many times do you see a requirement such as "the application should be accessible to users behind the firewall (on the intranet) but also to users on the Internet"? Traditionally, architects had two choices - beg the network engineers and managers to "poke holes" in the firewall (unlikely), buy an expensive specialized...
5
9656
by: =?Utf-8?B?TWFuaQ==?= | last post by:
Hi, I have a webservice which uses a c# Dll,This Dll is a C# class library which contain few class . I am able to see the class when in the Web service but when i create a stubb class of the webservice using wsdl.exe then these classes are not exposed.Both the class are public. I tried for a while and found that if I use these class(one and two) as the parameter in the WebMethods the web service and generate the Stubb class then these...
3
3203
by: inga2005 | last post by:
Hi! Is there a way to expose all the methods in a .net dll written i C# as a web service without having to do it method by method but just as a transparent layer? /erik
0
7884
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8024
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8258
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5844
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5423
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3880
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3921
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2394
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.