 | |
07-21-2003, 12:16 AM
|
#1 (permalink)
| | Registered User
Join Date: Oct 2001 Location: Sweden
Posts: 1,260
| » 
ASP / Access etc...
So I've re-hacked the webshop I made during my ASP-class in school last spring, and it will now serve as an ordering system for internal computer-orders here at work. The basics work, but there's still lots to deal with. So I thought I'd put a post up to see if anyone can help me with any cool solutions to the remaining problems. Here we go.
* The database connection. Since I'm using an Access 2000 database(there is no need for anything bigger, it's a small system), I've been thinking about the security sides of the database connection. It'll be an internal system, so it's not that big of a deal, but I still want a fairly secure system. I've read something about using the IIS Metabase to connect to databases, what's that all about?
* Right now, the orders are registered in the database, and then nothing more happens with them. I'd like to have the orders be sent in an email to someone (the one who actually makes the order). Any ideas?
I'm sure I can think of more things that need to be tweaked and added, but this'll do for now.
|
| |
07-21-2003, 12:53 AM
|
#2 (permalink)
| | Registered User
Join Date: Oct 2001 Location: TOO close to Wash DC
Posts: 7,956
|
* Never heard of using the metabase, I've always preferred using a system DSN to connect with or just a simple connection string.
* EMail - http://www.emailarchitect.net/webapp...mtpservice.asp
Install the IIS SMTP service and you're good to go.
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
|
| |
07-23-2003, 01:42 AM
|
#3 (permalink)
| | Registered User
Join Date: Oct 2001 Location: Sweden
Posts: 1,260
|
Ok, here's the thing. I need help with this:
So once the order is complete, this is sent to the database(Not real db names):
table1(Ordertable): CustomerID, OrderID, Date
table2(OrderRow): OrderID, ProductID, Howmany
Now I'm trying to figure out how to use this information to grab the Product Name and Price and put together a nice order confirmation (that one can print out) AND send the same information in an email. What I can't figure out is how to grab the product name and price for each product ID that's listed. |
| |
07-23-2003, 01:47 AM
|
#4 (permalink)
| | Registered User
Join Date: Oct 2001 Location: TOO close to Wash DC
Posts: 7,956
|
Umm where are you fetching the price from? I don't see that in the table.
Hmmm
There needs to be a Product table
You'll join the product table with table2 on ProductID
You have a customer table that lists all of thier orders
you have an orders table that lists all of the items on that order by product id
now you need a table that lists those product names/prices by product id
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
|
| |
07-23-2003, 01:55 AM
|
#5 (permalink)
| | Registered User
Join Date: Oct 2001 Location: Sweden
Posts: 1,260
|
Yeah there's a product table. Sorry for leaving that information out. There's a table with product id, name, info and price.
|
| |
07-23-2003, 08:13 AM
|
#6 (permalink)
| | Registered User
Join Date: Oct 2001 Location: TOO close to Wash DC
Posts: 7,956
|
assuming table3 is the product table
SELECT table2.OrderID, table3.ProductID, table3.ProductName, table3.Info, table3.Price, table2. HowMany
FROM table2
INNER JOIN table3
ON table2.ProductID = table3.ProductID
WHERE Table2.OrderId = 2432343
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
|
| |
07-24-2003, 12:02 AM
|
#7 (permalink)
| | Registered User
Join Date: Oct 2001 Location: Sweden
Posts: 1,260
|
Coolness, I have to try that out.
|
| |
08-05-2003, 12:46 AM
|
#8 (permalink)
| | Registered User
Join Date: Oct 2001 Location: Sweden
Posts: 1,260
|
Uhm...there has to be a table 1 too. Ihave the order divided into two tables:
table1: oderid, customerid, date
table2(what's in the order): orderid, productid, howmany
..still trying to figure this out...
Edit: Hm, I think I got it now vass...
Last edited by Agent_Embryo; 08-05-2003 at 12:53 AM.
|
| |
08-05-2003, 01:17 AM
|
#9 (permalink)
| | Registered User
Join Date: Oct 2001 Location: Sweden
Posts: 1,260
|
Now I just need to figure out how to pass the OrderID variable from one subroutine to another. Should I maybe have a global variable to store it in? How should I do it?
|
| |
08-05-2003, 01:23 AM
|
#10 (permalink)
| | Registered User
Join Date: Oct 2001 Location: TOO close to Wash DC
Posts: 7,956
|
Depends on how you're calling the subroutine.
Dim aVar
Dim bVar
do some stuff...
bVar = FunctionCall(aVar)
OtherFunction bVar
Private Function(psVar)
do some other stuff
psVar = psVar + 1
End Function
Private Sub(psOtherVar)
Response.Write psOtherVar
End Sub
Something like that?
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | Most Active Discussions  | | | | | Recent Discussions  | | | | | |