SEARCH YOUR SOLUTION HERE  

Delete items help



i am working on shopping cart using sessions and here is my code for delete items in the cart

Code: UBound(arr, 2) Then Response.Write("Out of Bounds") Exit Sub Else ReDim newArray((UBound(arr) - 1), UBound(arr, 2)) Dim hasSkipped, r, c hasSkipped = False For r = 1 To 4 If r = int Then hasSkipped = True End If For c = 1 To 4 If (c > UBound(newArray, 2)) Or (c > UBound(arr, 2)) Then Exit For If hasSkipped = False Then newArray(r, c) = arr(r, c) Else newArray((r - 1), c) = arr(r, c) End If Next Next Session("cart") = newArray Erase newArray Erase arr End If Else Response.Write("No cart!") End If End Sub %> its giving an error like this

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'lbound'

/store/mainwebsite/removeitems.asp, line 34

and line 34 is this one

For i = lbound(CartArray,2) to UBound(CartArray,2) i tried doing like this

For i = LBound(CartArray,2) to UBound(CartArray,2) but it still gives the same error

can someone tell me what i am doing wrong

any help is highly appreciated

Posted On: Friday 26th of October 2012 04:51:43 AM Total Views:  361
View Complete with Replies




Related Messages:

Need help deleteing recoreds from a asp file   (338 Views)
I am working a page taht will allow you to add modifiy and delete hyperlinks. I have the add and modify but i just need the delete. I have no idea how to go about this i keep getting errors and if some one could get this straightend out for me taht would be great Here is my code so far, there is a lot of it'
ASP and ASP.net cookies - delete it   (386 Views)
Hi all, During the development, I need to test cookies (ASP and ASP.net). For the first time I test (First username), it writes the cookies into my computer using the First username, and when I want to test second time, using another user name (Second username), it wont't show up the login page, but instead it automatically let me access the protected page (using the first test username). Question: I want to delete this cookies! How I have searched: Temporary folder, and can't find it. Document and settings (W2000 Professional), and can't find it as well. Help needed.
Using Chekbox to delete multiple records   (296 Views)
Originally posted by : Lydia (lydia_chin@hotmail.com)I trying to delete the checked record by using "checkbox". That's mean if the checkbox was checked, then, the record should be deleted in the next page when the page was posted. This the page where to list the checkbox... Product ID Product Name Product Type this page to performe the deletion. the Details of this Promotion has been deleted ...anyhow, I can delete it... What I should do.. I already hanged up at this step for a week....
FSO delete file works only for PDFs   (267 Views)
HI,I have c:\invoices folder on WIN XP PRO SP2For some reason my FSO script can delete only PDF files from this or any folder on C: driveTrying to delete DOC, XLS or TXT files gives me: Microsoft VBScript runtime (0x800A0046)Permission deniedTurning anti-virus & firewall off doesn't helpAny ideas why only PDFs can be delete
Double table delete in MySQL 4+   (279 Views)
On MySQL.com it mentions you can do two table delete by first joining the table like so then deletingDELETE from table1,table2, WHERE table1.id=table2.idWhat I need to know is how to do something like this DELETE from table1,table2, WHERE table1.id=table2.id WHERE table1.id in (1,2,4,6)Basicly i want to delete records pertaining to table 1 that are in table 2 without having to do two delete connections.- Jason www.vzio.com ASP WEB DEVELOPMENT
delete   (255 Views)
,I know this is the asp forum, but i posted this in the javascript forum, but not getting any feedback.At this page:http://www.irvineceltic.com/cart_frames.htmlWhen you click on add to cart, it adds the product to the cart, but i want the user to have the option of removing it from the cart, even if the remove button is in the shopping cart page, instead of the products page, but the products page would be better
Why Does File.delete hang?   (316 Views)
I have the following code:CODEdim fs,fnameset fs=Server.CreateObject("Scripting.FileSystemObject")set fname=fs.GetFile("c:\why.txt")Response.Write fname.namefname.Deleteset fname=nothingset fs=nothingThis code once worked, is unchnaged, and now the web application just hangs. fname.Delete, force does not work either.if I do the following:CODEdim fs,fnameset fs=Server.CreateObject("Scripting.FileSystemObject")set fname=fs.GetFile("c:\why.txt")fname.name = "C:\whynot.txt"Response.Write fname.nameset fname=nothingset fs=nothingThe file name does change.So here's the deal:This sucker will rename, move, etc... but will NOT delete, Browser just hangs. Can anyone tell me what might be going on Folder permissions are set to all for . The file is not readonly or hidden. IIS service is started.I have changed browser security options since I can last verify that this worked, but I've tested on three sepparate machines with different levels of secuirty and nothin'.
delete record and attach files   (474 Views)
dear ....e.g i have records in my oracle db. for each record there is an attach file. what i want is when the prog. delete the record in the database, the attach file will also be deleted. the fields in my db is action and attach. the attach field store the path to the attach file which is stored somewhere else in the same server.Please help...
delete button   (231 Views)
I have a table generated from our database on the customer page. On that page I want to create a DELETE button. After user click DELETE button, the row which user just selected will be deleted from the table. How can I capture which row the user selected
Can't delete the record.   (294 Views)
. I was trying to make a asp page to erase the record file. But it's running at the begining but when i check it to the database the data still there. I still trying to find the problem but i couldn't. The question is : Why it happen, and which one from the script that cause that problem.. Here is the firs script Code: :: Administrator Area :: A:hover {color:#FF7300;} A { text-decoration: none; color:000000; font-size: 10; font-family: verdana; font:900; } TD{ FONT-SIZE:11; FONT-FAMILY:verdana; COLOR:000000; } input{ FONT-SIZE:11; FONT-FAMILY:verdana; COLOR:000000; } font.bold{font:900;color:ffffff} font.right{color:ffffff} font.left{font-size:12} .style1 {color: #33FFFF} .style3 {color: #999999} .style8 {font-size: 10px} .style9 {font-size: 10}           id Password Nama Nama Belakang Alamat Kota Negara No.Telepon Email Kode Pos Fax     Cari    Hapus   Update Powered by : Pancasona Technology      ::: Pancasona I :: Jln. Jamin ginting no.309 Padang bulan Medan Telp. : (061)844777 Fax : (061) 8555444 Email : support@pancasona.com :: Pancasona II :: Jln. Jamin ginting no. 109 Padang bulan Medan Telp. : (061)844777 Fax : (061) 8555444 :: Pancasona III :: Jln. Tanjung sari no. 290 Padang bulan Medan Telp. : (061)884322 HOME    ABOUT US    PRODUCT    GALLERY    ADMIN    HELP Copyright 2007 Pancasona.com Inc. rights reserved. and this is the second : Code: Untitled Document data telah terhapus =========== Error Type: Microsoft JET Database Engine (0x80040E14) Syntax error in UPDATE statement. /TA/leve/leve/html/updatesuccess.asp, line 15 update ------------- :: Administrator Area :: A:hover {color:#FF7300;} A { text-decoration: none; color:000000; font-size: 10; font-family: verdana; font:900; } TD{ FONT-SIZE:11; FONT-FAMILY:verdana; COLOR:000000; } input{ FONT-SIZE:11; FONT-FAMILY:verdana; COLOR:000000; } font.bold{font:900;color:ffffff} font.right{color:ffffff} font.left{font-size:12} .style1 {color: #33FFFF} .style3 {color: #999999} .style8 {font-size: 10px} .style9 {font-size: 10}             id Password Nama Nama Belakang Alamat Kota Negara No.Telepon Email Kode Pos Fax       Data Baru Pengganti Data yang Lama Password Nama Nama Belakang alamat kota Negara No.Telepon Email Kode pos Fax     Cari    Hapus   Update Powered by : Pancasona Technology      ::: Pancasona I :: Jln. Jamin ginting no.309 Padang bulan Medan Telp. : (061)844777 Fax : (061) 8555444 Email : support@pancasona.com :: Pancasona II :: Jln. Jamin ginting no. 109 Padang bulan Medan Telp. : (061)844777 Fax : (061) 8555444 :: Pancasona III :: Jln. Tanjung sari no. 290 Padang bulan Medan Telp. : (061)884322 HOME    ABOUT US    PRODUCT    GALLERY    ADMIN    HELP Copyright 2007 Pancasona.coma rights reserved.
Auto delete record after certain time?   (372 Views)
all, I'm trying to build a web page that will automatically delete records (in Access 2k) after a certain amount of time. I need to delete records that are older than a month of the current date. I've searched all over the internet trying to find examples of how to do this and the few that I've found don't seem to work for me. Does anyone have an example that works Either using an sql query or programmatically. I'm using Classic ASP (VBScript).
Problem with delete   (255 Views)
hi there: I am having query in my program which deletes a record.Following is the query which gets activated if you press the delete button.. if request.form("delete")"" then de="Delete * from login where FirstName='"&request.querystring("FirstName")&"'" objConn.Execute(de) response.write "Record deleted.Please close the window and refresh the main window" end if this is the error which i am getting: Error Type: Microsoft JET Database Engine (0x80020009) Record is deleted. /changelogin.asp funny part is that the record is getting delted but it displays this message on the screen which i dont want to.. please help!
Insert,Update,delete data from a table   (312 Views)
I have created a page and passing the tablename and values of the field to another page using post method. now on this page i have accepted the values but i dont know how to insert these into the table. i have done this so far. Code: sql ="Insert into"& tablename sql = sql & "(" sql = sql & "Day,Time,Location,Checkpoint_Details" sql = sql & ")" sql = sql & "Values" sql = sql & "(" sql = sql & "& day , & time , & location , & details" sql = sql & ")" Set RS = conn.Execute( sql ) note that day,time,location,details and tablename are variables. socan anyone help.
HELP! edit and delete   (286 Views)
anyone in here got an idea how i can edit and delete records
ASP multiple update/delete in 1 table   (286 Views)
how can i do multiple delete/update in 1 table like the shoping cart. because my code have error. hope someone can help me to settle the problem thanks you. below is my source code: TT // When the value in a textfield is changed, notice the onChange="RecUpdate('')" // on each of the textfields, the value of the Record ID associated with that field // is passed to the RecUpdate function. First the value is surounded with 2 asterisks e.g. *6* // This is so that *1* can be distinguished from *10*, *11* etc. function RecUpdate(id){ var ThisID = "*" + (id) + "*" if (document.form1.hidRecIDs.value == ""){ // If the hidden field is empty document.form1.hidRecIDs.value = (ThisID) // Store the value in the hidden field (hidRecIDs) as it is. } if (document.form1.hidRecIDs.value != ""){ // If the hidden field isn't empty var str = document.form1.hidRecIDs.value; // Store the contents of the hidden field in the variable str var pos = str.indexOf(ThisID); // Search str to see if this RecID is allready in it. if (pos == -1) { // If the position returned is -1 it isn't allredy in there, document.form1.hidRecIDs.value = document.form1.hidRecIDs.value + ", " + (ThisID) } // so add ", " and this ID to what is already in hidRecIDs } // to create a list like this *2*, *5*, *8* etc. }    
Either BOF or EOF is True, or the current record has been deleted. Requested operatio   (272 Views)
I have a code here with 2 if conditions... they work separately but if i put htem together i get this error when i click the remove from family button... i know this code is big but then error is in second part of the if statement... i know this may be an error in the logic... ples help me this is real urgent this is the code         &n bsp;        Parts associated with other families Family Name Part Number and this is the error i am getting... Error Type: ADODB.Field (0x80020009) Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /updatefamily.asp sorry ... this is real urgent and i am no good programmer to debug this... thanx Brat
Help - delete record   (281 Views)
I'm sure there's a fairly easy answer to this (all you ASP gurus). I'm simply trying to check if the categoryid is currently being used by any catalogue/product items. Ok, I've created a mini site content management system and I'm stuck on this function that will ensure data integrity... I'm trying to check if the categoryid I'm trying to delete has any related 'catalogue' items (products); and if so display a message 'Sorry, there are items currently listed under this category. Move the items before trying to delete'. Basically disallow the delete function if any catalogue items share the categoryid. That's it! Simple... right Code: Catalogue Categories Simply select an item to edit. Check the delete box and then select 'submit' to delete. To add a new category click here. Category Name Edit Delete Edit ID No.
Best way to delete a certain line from file?   (352 Views)
I have a file in a format like this that holds records (month, day, year, and event name on that date): 4|||12|||2005|||Spring Fling 4|||19|||2005|||Kappa Eta Meeting Scheduled 4|||21|||2005|||Some Event 4|||22|||2005|||Another EventOn a form, it shows up as follows, and the user selects which date they want to delete: Spring Fling Kappa Eta Meeting Scheduled Some Event Another EventSo, for example, let's say that the user selected "Some Event." If so, then the file should then be as follows: 4|||12|||2005|||Spring Fling 4|||19|||2005|||Kappa Eta Meeting Scheduled 4|||22|||2005|||Another EventI have some code that gets the job done, but it ends up adding a bunch of unnecessary blank lines and whatnot. I've tried for weeks to get it working, and rather than showing you my messy code, I was wondering if anybody knew a good way to get this done off the top of their heads.
Compressing arrays after having deleted one of the middle posts?   (371 Views)
I have an array that I can increase and delete records from by clicking on objects on the screen. Now I wonder how I can compress the array after I have deleted a record from the middle of the array. I have this code which I guess moves the empty record to the last spot in the array. However, when the counter "i" reaches the last position in the array "i+1" that causes an "out of range" problem. How can I solve this At last, when I know that the last post in the array is empty I redim the array and thus removes that post completely. Well, I hope you understand what my problem is and have a nice solution to it.
delete file from server   (300 Views)
what r things that I have to do to let the client browser to delete a file on the server... I'm running my server on WIN2000 pro, IIS 5.0 I've stored my website and server in a virtual directory.. This is the code i use to delete a file from the server folder Code: Function delete_file(exceldb) '***************** Delete********************** Set fso = CreateObject("Scripting.FileSystemObject") Set fileObject = fso.GetFile(Server.MapPath("..\upload2\uploads\"& exceldb)) fileObject.Delete Set fileObject = Nothing Set fso = Nothing ' Deletes exceldb End Function please do help... thanx a lot