Multiple record delete me ASP

v-_-s

Primus registratum
Multiple record delete me ASP

Po mundohem te bej nje web faqe ne ASP, dhe me duhet tu mundesoj vizitoreve qe te bejne fshierjen e me teper rekordeve duke i selektuar ato me ane te checkbox-ave.
A mund te me ndihmoje ndonje se si ta bej, kam gjetur disa menyra me ane te DreamWeaver dhe ASPX, mirepo me duhet dicka ne ASP te paster.
A mund te me ndihmoje dikush?
 

POMPACIU

Forumium praecox
Re: Multiple record delete me ASP

Shiko ne lidhjen me poshte, shpjegohet shtjellueshem ajo qe kerkon:
http://www.webthang.co.uk/tuts/tuts_dmx/rob3/rob3.asp

Kurse, duke shikuar ne nje forum dikush kishte shkruar si me poshte:
Code:
I created a form that lists all records in 
a table from the database that matches a users 
query. Within the table I also added a check box 
with the value of the records primary key so that 
I user can select it and then delete it. However,
when the data is passed, it is passed 
as a string of numbers which is comma delimited. 
So that if the user picks three records and their primary keys 
are 1, 2, and 3 then the string passed is "1, 2, 3". 

I was wondering if there is a parsing function 
in ASP so that I can seperate create three seperate values,
rather than just one so that I can delete them. 

However, if anyone else has a more efficent way 
on how to delete multiple records that is user 
selectable please let me know. 

Thanks, 
KS


!---------------PERGJIGJET----------------!


Arrays. 

strVals = "1,2,3"
arrVals = Split (strVals, ",")

Now you have ... 

arrVals(0) = 1 
arrVals(1) = 2 
arrVals(2) = 3 


!------------------------------------------!


The VBScript functions Split(), Join(), and 
UBound() would be perfect for you, although if 
all you're looking for is to delete the values,
you can just use the SQL statement to do the work for you... 


DELETE * FROM TableName WHERE PK_Column IN (1, 2, 3, 4, 5) 


Simple enough right? If you needed to do more 
processing with those unqiue records, use the 
functions. 
[url]http://www.google.com/search?q=vbscript+split+join[/url]
 
Top