.NET
  Home arrow .NET arrow Page 6 - Dealing with .NET Enterprise Services: .NE...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

Dealing with .NET Enterprise Services: .NET Remoting, Web Services and Service Components
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 13
    2006-02-08

    Table of Contents:
  • Dealing with .NET Enterprise Services: .NET Remoting, Web Services and Service Components
  • Working with the Remoting Client and Remoting Object
  • Working with a basic COM application
  • Working with a database-based COM application
  • Working with Web Services
  • Working with database based Web Services

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Dealing with .NET Enterprise Services: .NET Remoting, Web Services and Service Components - Working with database based Web Services


    (Page 6 of 6 )

    Even this part is very similar to what I discussed in the previous section.  Let's see the code:

    <WebMethod()> _
        Public Function getInfo(ByVal strSQL As String) As DataSet
            Dim cn As New SqlConnection("Data Source=.;Initial
    Catalog=Northwind;User ID=sa")
            cn.Open()
            Dim adp As New SqlDataAdapter(strSQL, cn)
            Dim ds As New DataSet
            adp.Fill(ds)
            adp.Dispose()
            cn.Close()
            Return ds
        End Function

    You can observe that it is very similar to a fundamental data access program, but preceded with “<WebMethod()>” at the front.

    And to access the above web service, the client could be something like the following:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
    As System.EventArgs) Handles Button1.Click
            Dim srv As New MyService.DBService
            Dim ds As DataSet
            ds = srv.getInfo(Me.txtSQL.Text)
            Me.DataGrid1.DataSource = ds
            Me.DataGrid1.DataMember = ds.Tables(0).TableName
        End Sub

    “dataset” and “datatable” work as offline data.  The internal architecture of both of them is made up of XML.  And thus I can receive a dataset or data table from the web service and assign it as a data source to data grid!

    Remarks

    All the sample code attached to this article can also be reused in your applications.  But please be aware that the proper configuration is necessary before you attach real time applications.  You need to thoroughly test the code before you deploy it at the production level.

    Any comments, suggestions, ideas, improvements, bugs, errors, feedback etc. are highly appreciated at jag_chat@yahoo.com.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Hai, the article guides you in working with .NET enterprise distributed computing. ...
     

    .NET ARTICLES

    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF
    - Grouping and Aggregating When Querying LINQ ...
    - Commands, Input and the WPF
    - Keyboard and Ink Input with WPF
    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT