473,466 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help for Access Temp Database

Hi,
I'm building an ecommerce website. When a user logs into my site, I want to
create a temporary table (say called 'ShoppingCart') in my database. I'm
currently using MS Access, but may use SQL in the future. Since I cannot
create a temporary table in Access, I want to create the table and then
delete it (drop it) at the end of the session.

My question: If I call the table 'ShoppingCart', for example, will this
create a problem if multiple users simultaneously access the website and
have their own temporary table called 'ShoppingCart'? ...or do I need to
figure out some way to give the tablename a unique name for each user? Any
suggestions doing this would be appreciated.

Also, what is the best way to delete the table at the end of the user
session? I
am using ASP VBscript. Thanks.
Nov 12 '05 #1
3 7744
I would expect severe problems if the web site you are developing would
ever start selling well. Creating temp tables in a file server system
even for 30 simultaneous users! Others will correct me if I'm wrong, but
using an Access db is not optimal here.

Pavel

Thunder wrote:

Hi,
I'm building an ecommerce website. When a user logs into my site, I want to
create a temporary table (say called 'ShoppingCart') in my database. I'm
currently using MS Access, but may use SQL in the future. Since I cannot
create a temporary table in Access, I want to create the table and then
delete it (drop it) at the end of the session.

My question: If I call the table 'ShoppingCart', for example, will this
create a problem if multiple users simultaneously access the website and
have their own temporary table called 'ShoppingCart'? ...or do I need to
figure out some way to give the tablename a unique name for each user? Any
suggestions doing this would be appreciated.

Also, what is the best way to delete the table at the end of the user
session? I
am using ASP VBscript. Thanks.

Nov 12 '05 #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It would be easier to have one ShoppingCart table for ALL shoppers and
give a unique ID for each shopper. E.g.:

Table: ShoppingCart
Fields:
ShopperID Long (AutoNumber or something else?)
ItemID Long -- the product
Qty Integer -- how many requested

Then when the transaction is complete/cancelled, the records for that
shopper would be transferred to the Order table/deleted.

I'm not sure if you can Delete from VBScript - probably only if it is
a server-side command.

HTH,

MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP75Jr4echKqOuFEgEQLUHwCgnyKo/HVtp9JpIrlfcKMDs4R1k7oAoJx2
CUbCEWTinYJbRIrpUYKBuFyz
=7ptb
-----END PGP SIGNATURE-----
Thunder wrote:
Hi,
I'm building an ecommerce website. When a user logs into my site, I want to
create a temporary table (say called 'ShoppingCart') in my database. I'm
currently using MS Access, but may use SQL in the future. Since I cannot
create a temporary table in Access, I want to create the table and then
delete it (drop it) at the end of the session.

My question: If I call the table 'ShoppingCart', for example, will this
create a problem if multiple users simultaneously access the website and
have their own temporary table called 'ShoppingCart'? ...or do I need to
figure out some way to give the tablename a unique name for each user? Any
suggestions doing this would be appreciated.

Also, what is the best way to delete the table at the end of the user
session? I
am using ASP VBscript. Thanks.

Nov 12 '05 #3
Your best bet here is to add two fields to the order table
isOrder - Boolean(Yes/No)
DateStamp - Date/Time

then set the DateStamp default value to Date()

When a user starts a shopping cart the DateStamp field would be the date.
If the user places an order, the set the isOrder field to true.

Call a script for every user that starts a Shopping Cart that deletes all
orders that are older than 1-day or whatever you decide.
Example:

Set ShoppingCart = "Select * From OrderTable Where DateStamp > (Date() + 1)
and isOrder = False"
Do Until ShoppingCart.eof = True
With ShoppingCart
..delete
End With
ShoppingCart.MoveNext
Loop

Good Luck
--
Andy Austin

"Thunder" <di*******@pacbell.net> wrote in message
news:eJ******************@newssvr13.news.prodigy.c om...
Hi,
I'm building an ecommerce website. When a user logs into my site, I want to
create a temporary table (say called 'ShoppingCart') in my database. I'm
currently using MS Access, but may use SQL in the future. Since I cannot
create a temporary table in Access, I want to create the table and then
delete it (drop it) at the end of the session.

My question: If I call the table 'ShoppingCart', for example, will this
create a problem if multiple users simultaneously access the website and
have their own temporary table called 'ShoppingCart'? ...or do I need to
figure out some way to give the tablename a unique name for each user? Any
suggestions doing this would be appreciated.

Also, what is the best way to delete the table at the end of the user
session? I
am using ASP VBscript. Thanks.

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: cooldv | last post by:
i am running a website on Windows 2000 server with ASP 3 webpages and Access 2000 database. (with a hosting company) traffic is slow at this time but expect to grow. lately i have been reading...
17
by: Jon Ole Hedne | last post by:
I have worked on this problem some hours now (read many-many...), and I can't solve it: In vba-code I create a table with Connection.Execute, and add some data to it. This table is saved in the...
3
by: Terry Block | last post by:
We have an Access 97 database app that we'd like to enable (not convert) for Access 2003. We still have users running 97 and are not prepared to upgrade everyone who uses this database to the 2003...
5
by: Chand | last post by:
Private Sub tbDate_AfterUpdate() Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset rst.CursorLocation = adUseClient Set cnn = CurrentProject.Connection rst.Open "SELECT * FROM...
2
by: John Thomas Smith | last post by:
I have an Access 97 database I would like to distribute, and provide a compiled program for those who don't have Access I do have the Access 97 developer tools CD and runtime, but the install...
4
by: robert d via AccessMonster.com | last post by:
When my app starts up, it creates a temporary database. This temp database is created from a 'model' database that is in the same folder as the application. Because there is a model, the creation...
1
by: GregZ | last post by:
I have an Access 97 database that I have uploaded to the internet. I have created a DSN for it with the hosting company and can now access it using .asp code. Everything here works fine. But, I...
14
Sakalicek
by: Sakalicek | last post by:
Hi all, could you please help me with my big problem? I have WebService on IIS. This WebService has methods to control database stored on server. I am using Postgre database and to access to...
2
by: suzanne | last post by:
I have a database that had been stable until 3 weeks ago. The Access 2003 database occasionally (a couple of times a week) gets corrupted when the last user exits the application. At least, that's...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.