Welcome to Office Zealot Sign in | Join | Help

Avalon Adventures Part 1

NorthWind Avalon Part 1 – Data Access

 

Code for this demo can be found in the downloads section of www.dashpoint.com

 

The first item to discuss in this application is the data access layer. Basically this layer consists of a single class with a bunch of Shared (static for you C# heads) functions.

 

The data access layer uses a shared library called Library. This class library has two functions you will need to manipulate.

 

The first one is IsSQLServer(). If you are using the Visual FoxPro version of northwind change the Return statemement False.

 

The second function you will need to manipulate is the GetSQLConnectionString() or the GetFoxConnectionString() depending on your data. Change the return values to point at your SQL Server or Visual FoxPro data.

 

All of the functions in the DataAccess class return DataSet objects.

 

The Data Access Class has the following Methods

 

GetCustomerList() returns all data from the customer table

GetCustomer(CustomerID) returns a dataset with the customer’s information

GetCustomerOrders(CustomerID) returns a dataset with a customer’s orders.

GetCustomerOrder(OrderID) returns a dataset with a single order.

GetOrderLineItems(OrderID) returns a dataset with an orders lineitems.

GetShipperList() returns the list of shippers

GetCountryList() returns the list of countries.

Etc……

 

A sample call to the data access layer is as follows:

 

Dim CustomerData as dataset = DataAccess.GetCustomerList()

 

Next chapter will discuss basic data binding in Avalon….

 

 

 

 

 

 

 

Published Saturday, December 04, 2004 10:49 AM by rod

Comments

No Comments

Anonymous comments are disabled