Imports System.Data Imports System.Data.SqlClient Next, declare the public function, GetCustomers() as shown below: Public Class Customers Public Function GetCustomers(ByVal CompanyName As String) As DataSet Dim myConnection As SqlConnection = New SqlConnection "Data Source=SYS1;Integrated Security=SSPI;Initial Catalog=NorthWind") Dim cmdselect As New SqlCommand() Dim daCustomers As New SqlDataAdapter() Dim dsCustomers As New DataSet() Try With cmdselect .CommandText = "SearchCustomers" .CommandType = CommandType.StoredProcedure .Connection = myConnection .Parameters.Add(New SqlParameter("@CompanyName", SqlDbType.VarChar, 40, ParameterDirection.Input, True, CType(10, Byte), CType(0, Byte), "", DataRowVersion.Current, Nothing)) .Parameters("@CompanyName").Value = CompanyName End With With daCustomers .SelectCommand = cmdselect .Fill(dsCustomers, "Customers") End With GetCustomers = dsCustomers Catch excSQL As SqlException End Try End Function End Class
Imports System.Data Imports System.Data.SqlClient Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim objCusManager As New CustomersManager.Customers() Dim dsCustomers As DataSet dsCustomers = objCusManager.GetCustomers(TextBox1.Text) DataGrid1.DataSource = dsCustomers End SubAs you can see from the code, you first have to create a reference to your class library. We do this by using objCustomersManager variable and creating a new reference to the CustomersManager.GetCustomers class. Next, we need to create a DataGrid to store the results of the GetCustomers() method. You then use this DataSet to populate the DataGrid by using the DataSource property.
Azure Cloud is gaining popularity and is competing with Amazon Elastic Cloud and Google Cloud for a spot in the billion dollar Cloud computing space.
With this book learn how to use - Table (an Azure Table is different from a SQL Server Table), Queue, Blob storage services, use your local machine to create an Application and a Service, how Azure splits a Table to achieve Load Balancing, Scalability based on the Partition Key, AppFabric Service Bus, Access Control Service, role of Fabric Controller, features of Azure SQL Database and Content Delivery Network.
Many have mastered Cloud Programming and are enjoying the benefits. Why not you?
A foundation book to Master Accounting Software Development, VB.Net, C# and OOPs programming. Detailed explanation of the Accounting domain for programmers is included. SQL and ADO.Net is also covered in detail.
This book gives you a strong foundation in Application Development.
A thorough understanding of the contents will enable you to grasp the topics covered in the accompanying books quite easily. This is because, the accounting domain is dealt with great detail in this book.
The ideal book to get started with application development in the .Net world.
This book opens you to the Web. Using ASP.Net, C# and SQL Server as the tools, you will learn to build a Multi Tier Web Application as recommended by Microsoft. You will learn implementing inline GridView control, Transaction Management for a layered Web Application, build Data Access component and a Business Layer component.
Opens you to a world of opportunities. You will be able to develop a Web ERP application including all the five modules and learn how to use the TreeView control and GridView control to implement transactions such as Purchase Invoice, Sales Order and Sales Invoice.
Entity frameworks is the latest buzz in .Net programming and is the data access technology for Microsoft OS based hand held devices and web applications. Learn to integrate EF into an ASP.Net Application and MVC application. Create, explore and query the Entity Data Model. Learn how to use ObjectDataSource control and GridView control in an ASP.Net Application.
Also, learn to build Three-Tier ASP.Net application, create a business-class, implement methods in the class to perform CRUD operations and bind a GridView to the ObjectDataSource control. Learn how to handle concurrency and managing Transactions.