Creating the Required Tables Using SQL
Introduction. We
are developing this functioning web under fairly minimal
assumptions. For example, we are assuming that you do not have
superuser sorts of capabilities on the host server. This is the
reason for using a tool like Homesite for development, some sort of FTP
for uploading files and DSN-less connections. We are also assuming
that you are going to need to make use of SQL to create, update, and
select from tables rather than using some sort of direct connection
interface tool. I prefer this approach because it is more
minimalist and I think your learning is more complete. You don't
have some sort of overly developed IDE hiding all kinds of issues from
you.
Now we are about to go through what may seem like a limitless number of ASP files just to create our tables with fields and keys. After these ASPs have been executed once in your web they cannot be used again since the tables will have been created. The Endless Code. Since you have essentially seen all of this code when working with SQL Server databases you should copy each into a file. All in all there are 16 tables to create. Upload each of them and run them each once to create the tables. After you have gotten through all of these ASPs you are very likely going to want to delete them from your web account, but definitely not from your client computer. In fact, I would put them all in their own directory out of the way of your more often used code. |
Table Name | ASP File |
Attributes | CreateAttributes.asp |
AttributesCategory | CreateAttributesCategory.asp |
Basket | CreateBasket.asp |
BasketItem | CreateBasketItem.asp |
Department | CreateDepartment.asp |
DepartmentProducts | CreateDepartmentProducts.asp |
FreeShip | CreateFreeShip.asp |
OrderData | CreateOrderData.asp |
OrderStatus | CreateOrderStatus.asp |
PaymentData | CreatePaymentData.asp |
ProductAttibute | CreateProductAttribute.asp |
Products | CreateProducts.asp |
RelatedProducts | CreateRelatedProducts.asp |
Shipping | CreateShipping.asp |
Shopper | CreateShopper.asp |
Tax | CreateTax.asp |
This is the code you should call CreateAttributes.asp and upload it to your cisdev account and run it once. |
<%@ Language=VBScript %> |
Now you want to copy this code into the CreateAttributesCategory.asp and run it on your web. |
<%@ Language=VBScript %> |
The next set of code you want to call CreateBasket.asp and do the usual with it.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate) |
The next set of code you should call CreateBasketItem.asp
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate) connfoxFire.Close |
The next set of code you should call CreateDepartment.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate) connfoxFire.Close |
The next set of code you should call CreateDepartmentProducts.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate) connfoxFire.Close |
The next set of code you should call CreateFreeShip.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate) connfoxFire.Close |
The next set of code you should call CreateOrderData.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate)
connfoxFire.Close |
The next set of code you should call CreateOrderStatus.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate)
connfoxFire.Close |
The next set of code you should call CreatePaymentData.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate)
connfoxFire.Close |
The next set of code you should call CreateProductAttribute.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate)
connfoxFire.Close |
The next set of code you should call CreateProducts.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate)
connfoxFire.Close |
The next set of code you should call CreateRelatedProducts.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate)
connfoxFire.Close |
The next set of code you should call CreateShipping.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate)
connfoxFire.Close |
The next set of code you should call CreateShopper.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate)
connfoxFire.Close |
The next set of code you should call CreateTax.asp.
<%@ Language=VBScript %> connfoxFire.execute(strSQLCreate)
connfoxFire.Close |
Once you have uploaded each of these and executed them you can remove them from your web.