Listing 1

private const string SQL_SELECT_ACCOUNT = "SELECT Account.Email, Account.FirstName,
 Account.LastName, Account.Addr1, Account.Addr2, Account.City, Account.State, Account.Zip,
  Account.Country, Account.Phone, Profile.LangPref, Profile.FavCategory, Profile.MyListOpt,
   Profile.BannerOpt FROM Account,Profile, SignOn WHERE Account.UserId = Profile.UserId AND
    Account.UserId = SignOn.UserName AND SignOn.UserName = :UserId AND SignOn.Password =
	 :Password";

private const string SQL_SELECT_ADDRESS = "SELECT Account.FirstName, Account.LastName,
 Account.Addr1, Account.Addr2, Account.City, Account.State, Account.Zip, Account.Country,
  Account.Phone FROM Account WHERE Account.UserId = :UserId";

private const string SQL_INSERT_SIGNON = "INSERT INTO SignOn VALUES (:UserId, :Password)";

private const string SQL_INSERT_ACCOUNT = "INSERT INTO Account VALUES(:UserId, :Email,
 :FirstName, :LastName, 'OK', :Address1, :Address2, :City, :State, :Zip, :Country,
  :Phone)";

Listing 2

if (parms == null) {
	parms = new OracleParameter[] 
		new OracleParameter(PARM_ORDER_ID, OracleType.Number, 10),
		new OracleParameter(PARM_USER_ID, OracleType.VarChar, 80),
		new OracleParameter(PARM_DATE, OracleType.DateTime),
		new OracleParameter(PARM_SHIP_ADDRESS1, OracleType.VarChar, 80),
		new OracleParameter(PARM_SHIP_ADDRESS2, OracleType.VarChar, 80),
		new OracleParameter(PARM_SHIP_CITY, OracleType.VarChar, 80),
		new OracleParameter(PARM_SHIP_STATE, OracleType.VarChar, 80),
		new OracleParameter(PARM_SHIP_ZIP, OracleType.VarChar, 50),
		new OracleParameter(PARM_SHIP_COUNTRY, OracleType.VarChar, 50),
		new OracleParameter(PARM_BILL_ADDRESS1, OracleType.VarChar, 80),
		new OracleParameter(PARM_BILL_ADDRESS2, OracleType.VarChar, 80),
		new OracleParameter(PARM_BILL_CITY, OracleType.VarChar, 80),
		new OracleParameter(PARM_BILL_STATE, OracleType.VarChar, 80),
		new OracleParameter(PARM_BILL_ZIP, OracleType.VarChar, 50),
		new OracleParameter(PARM_BILL_COUNTRY, OracleType.VarChar, 50),
		new OracleParameter(PARM_TOTAL, OracleType.Number),
		new OracleParameter(PARM_BILL_FIRST_NAME, OracleType.VarChar, 80),
		new OracleParameter(PARM_BILL_LAST_NAME, OracleType.VarChar, 80),
		new OracleParameter(PARM_SHIP_FIRST_NAME, OracleType.VarChar, 80),
		new OracleParameter(PARM_SHIP_LAST_NAME, OracleType.VarChar, 80),
		new OracleParameter(PARM_CARD_NUMBER, OracleType.VarChar, 80),
		new OracleParameter(PARM_CARD_EXPIRATION, OracleType.VarChar, 10),
		new OracleParameter(PARM_CARD_TYPE, OracleType.VarChar, 80)};
}

Listing 3

orderParms[1].Value = order.UserId;
orderParms[2].Value = order.Date;
orderParms[3].Value = order.ShippingAddress.Address1;
orderParms[4].Value = order.ShippingAddress.Address2;
orderParms[5].Value = order.ShippingAddress.City;
orderParms[6].Value = order.ShippingAddress.State;
orderParms[7].Value = order.ShippingAddress.Zip;
orderParms[8].Value = order.ShippingAddress.Country;
orderParms[9].Value = order.BillingAddress.Address1;
orderParms[10].Value = order.BillingAddress.Address2;
orderParms[11].Value = order.BillingAddress.City;
orderParms[12].Value = order.BillingAddress.State;
orderParms[13].Value = order.BillingAddress.Zip;
orderParms[14].Value = order.BillingAddress.Country;
orderParms[15].Value = order.OrderTotal;
orderParms[16].Value = order.BillingAddress.FirstName;
orderParms[17].Value = order.BillingAddress.LastName;
orderParms[18].Value = order.ShippingAddress.FirstName;
orderParms[19].Value = order.ShippingAddress.LastName;
orderParms[20].Value = order.CreditCard.CardNumber;
orderParms[21].Value = order.CreditCard.CardExpiration;
orderParms[22].Value = order.CreditCard.CardType;


Listing 4

foreach (LineItemInfo item in order.LineItems) {
completeOrderParms[index] = 
new OracleParameter(PARM_ORDER_ID + i, OracleType.Number);
	completeOrderParms[index++].Value = orderId;		
	completeOrderParms[index] = 
	new OracleParameter(PARM_LINE_NUMBER + i, OracleType.Number);
	completeOrderParms[index++].Value = item.Line;
	completeOrderParms[index] = 
	new OracleParameter(PARM_ITEM_ID + i, OracleType.Char, 10);
	completeOrderParms[index++].Value = item.ItemId;
	completeOrderParms[index] = 
	new OracleParameter(PARM_QUANTITY + i, OracleType.Number);
	completeOrderParms[index++].Value = item.Quantity;
	completeOrderParms[index] = 
	new OracleParameter(PARM_PRICE + i, OracleType.Number);
	completeOrderParms[index++].Value = item.Price;

Listing 5

DataStore ordernumDataStore = 
new DataStore ( "OracleDWADOdal.pbl", "d_ordernum" );
	ordernumDataStore.SetTransaction ( SQLCA ) ;
	DataStore orderDataStore = 
	new DataStore ( "OracleDWNativeDAL.pbl", "d_orders" );
	orderDataStore.SetTransaction ( SQLCA ) ;
	DataStore orderstatusDataStore = 
	new DataStore ( "OracleDWNativeDAL.pbl", "d_orderstatus" );
	orderstatusDataStore.SetTransaction ( SQLCA ) ;
	DataStore orderitemsDataStore = 
	new DataStore ( "OracleDWNativeDAL.pbl", "d_lineitem" );
	orderitemsDataStore.SetTransaction ( SQLCA ) ;

Listing 6

	rows = orderDataStore.InsertRow ( 0 );
	orderDataStore.SetItemDouble   ( 1, "orderid", orderId ) ;
	orderDataStore.SetItemString   ( 1, "userid", order.UserId ) ;
	orderDataStore.SetItemDateTime ( 1, "orderdate", order.Date ) ;
	orderDataStore.SetItemString   ( 1, "shipaddr1", order.ShippingAddress.Address1 ) ;
	orderDataStore.SetItemString   ( 1, "shipaddr2", order.ShippingAddress.Address2 ) ;
	orderDataStore.SetItemString   ( 1, "shipcity", order.ShippingAddress.City ) ;
	orderDataStore.SetItemString   ( 1, "shipstate", order.ShippingAddress.State ) ;
	orderDataStore.SetItemString   ( 1, "shipzip", order.ShippingAddress.Zip ) ;
	orderDataStore.SetItemString   ( 1, "shipcountry", order.ShippingAddress.Country ) ;
	orderDataStore.SetItemString   ( 1, "billaddr1", order.BillingAddress.Address1 ) ;
	orderDataStore.SetItemString   ( 1, "billaddr2", order.BillingAddress.Address2 ) ;
	orderDataStore.SetItemString   ( 1, "billcity", order.BillingAddress.City ) ;
	orderDataStore.SetItemString   ( 1, "billstate", order.BillingAddress.State ) ;
	orderDataStore.SetItemString   ( 1, "billzip", order.BillingAddress.Zip ) ;
	orderDataStore.SetItemString   ( 1, "billcountry", order.BillingAddress.Country ) ;
	orderDataStore.SetItemDouble   ( 1, "totalprice", (double)order.OrderTotal ) ;
	orderDataStore.SetItemString   ( 1, "billtofirstname", order.BillingAddress.FirstName )
	 ;
	orderDataStore.SetItemString   ( 1, "billtolastname", order.BillingAddress.LastName ) ;
	orderDataStore.SetItemString   ( 1, "shiptofirstname", order.ShippingAddress.FirstName
	 ) ;
	orderDataStore.SetItemString   ( 1, "shiptolastname", order.ShippingAddress.LastName )
	 ;
	orderDataStore.SetItemString   ( 1, "creditcard", order.CreditCard.CardNumber ) ;
	orderDataStore.SetItemString   ( 1, "exprdate", order.CreditCard.CardExpiration ) ;
	orderDataStore.SetItemString   ( 1, "cardtype", order.CreditCard.CardType ) ;
	orderDataStore.UpdateData() ;

Listing 7

	foreach (LineItemInfo item in order.LineItems) 
	{
	rows = orderitemsDataStore.InsertRow ( 0 ) ;
		orderitemsDataStore.SetItemDouble ( rows, "orderid", 
		 orderId ) ;
		orderitemsDataStore.SetItemDouble ( rows, "linenum", 
		 item.Line ) ;
		orderitemsDataStore.SetItemString ( rows, "itemid", 
		 item.ItemId ) ;
		orderitemsDataStore.SetItemDouble ( rows, "quantity", 
		 item.Quantity ) ;
		orderitemsDataStore.SetItemDouble ( rows, "unitprice", 
		 (double)item.Price ) ;
	}
	orderitemsDataStore.UpdateData() ;

Listing 8

	//Oracle provider
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection();
conn.ConnectionString = "Provider=OraOLEDB.Oracle;User ID=mspetshop;Data
 Source=oracle;Password=password;OLEDB.NET=True;";
conn.Open();

//ASA provider
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection();
conn.ConnectionString = "Provider=ASAProv.90;User ID=mspetshop;Data
 Source=asademo9;Password=password;" ;
conn.Open();

Additional Code - zip file