|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi everyone ....
I am having a huge problem trying to find a soluation to an on-going error when I run my shoppingcart I am developing. The Error occurs when I have more than one user logged in and tries to put the exact same product into their shoppingcart right after the first shopper added it successfully without Error. I have set it up where all new shoppers get their own unique shopperID and their own unique shoppingcartID. When they are ordering items, all items being placed into their shoppingcart are held in a temp table before going to CheckOut where the items in the cart will then be placed into a permanent order table. Critical Situation as follows ::: 1st shopper puts an item in their shopping cart successfully, right after the 2nd shopper orders the exact same item but when the got to place it in their shopping cart (add to cart), using their own unique ID shoppingcart, it Errors to this >>> Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again. addprod.asp, line 24 Here is the code in ASP that shows were there maybe a problem with line 24 in my addprod.asp >> If shopperid = 0 then 'Crate shopperid fist 'call openConn() strsql = "insert into shopper(shoppingid) values ( 0 )" conn.execute strsql strsql = "select max(shopperid) as shopperids from shopper" dim rs set rs = Server.CreateObject("ADODB.Recordset") set rs =conn.execute(strsql) if not rs.eof then Session("Shopperid") = rs("shopperids") Else Response.Redirect "error.asp?msg=" & Server.URLEncode ("We encountered technical difficulty of connecting database: Creating Shopperid. Please email webmaster!") End If rs.close I have gone into my database, making double sure over and over that I do not have any fields or tables named the same, as well as looked at my ASP code to make sure it is string together right. Can anyone help me here with possible soluations to fix this on-going Error occuring? ((hope I explained the above with understanding of this Error message)) It is a IIS server too, btw ... in case you need to know this Much appreciated, Wolfe |
|
#2
|
||||
|
||||
|
Can you give some idea on how the database is designed? It seems that the product column is not setup right
|
|
#3
|
|||
|
|||
|
Database
All the tables I have within the Access Database ...
categories - ID and Description customers - information on the customer themselves oderitems - item information order - information for payment and shipping ... billing of customer's order products - information of items, like price etc cartinfo (which is a temp holding for items being placed in the cart) shipmethods - shipping costs shopper - shopper's ID assigned to them shoppingcart - shopping cart ID assigned to the Shopper (ID) All the tables have primary keys as well I do have queries ... but they are not executed before the customer finishes shopping ![]() |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Access Database 2000 & ASP problem HELP ! asap |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|