I worked on the BlackPearl tutorial for the Sales Orders....
In MSSQl Run the following commands to build my Tables....
CREATE TABLE Regions
(
RegionID int IDENTITY(1,1) PRIMARY KEY,
RegionName varchar(255) NOT NULL,
RegionVPLoginName varchar(255) NOT NULL
)
CREATE TABLE ADSalesPeople
(
ID int IDENTITY(1,1) PRIMARY KEY,
Name varchar(255) NOT NULL,
Email varchar(255) NOT NULL,
Manager varchar(255) NOT NULL
)
CREATE TABLE Customers
(
CustomerID int IDENTITY(1,1) PRIMARY KEY,
CustomerName varchar(255) NOT NULL,
ContactPerson varchar(255) NOT NULL,
AccountManager int NOT NULL,
Region int NOT NULL
)
CREATE TABLE Products
(
ProductID int IDENTITY(1,1) PRIMARY KEY,
ProductName varchar(255) NOT NULL,
Description text,
Cost decimal(10,2),
ListPrice decimal(10,2),
Discontinued bit NOT NULL
)
CREATE TABLE SalesOrderItems
(
SalesOrdItemsID int IDENTITY(1,1) PRIMARY KEY,
HeaderID int NOT NULL,
Product text NOT NULL,
Quantity int NOT NULL,
UnityPrice decimal(10,2),
RowTotal decimal(10,2)
)
CREATE TABLE SalesOrderHeader
(
SalesOrdHeaderID int IDENTITY(1,1) PRIMARY KEY,
Region varchar(255) NOT NULL,
Customer varchar(255) NOT NULL,
Sales Person varchar(255) NOT NULL,
OrderDate date,
ShipDate date,
PONumber varchar(255) NOT NULL,
Tax decimal(10,2),
SubTotal decimal(10,2),
Comments text,
Status varchar(255) NOT NULL
)
One thing I noticed is when creating the View From the Simple Sales Orders in List and Form return the ID instead of the Name, because that is what is stored in the Databse
This is what the Sales People looks like:
Shows the ID's of the Account Manager and the Region... instead of display the correct name.
I wonder if there is a reverse function within the List to indicate to retrieve the Name of the Foreign Table instead of the ID stored in the Database.
THX Dino.