From: Les Juby on
On Sat, 30 Jan 2010 06:16:07 -0500, "Neil Gould"
<neil(a)myplaceofwork.com> wrote:

>Hi Les,
>
>Les Juby wrote:
>> Hi
>>
>> I've had this problem before in other apps, and hacked off on a
>> workaround, but I think I'm trapped this time.....
>>
>> Basically, a list of found records is presented to the visitor for
>> previewing before a set email message is sent to each of the found
>> records.
>>
>> But I need to give the visitor the ability to remove at least several
>> of the records before firing off the emails.
>>
>> Ideally, a checkbox alongside each record and a [Delete Marked] button
>> would be great.!
>>
>> Can anyone please suggest a resource where this is explained - or
>> maybe some pointers on how to achieve it.?
>>
>> What would the basic code be to remove items from the current
>> recordset, as opposed to messing with writing back to the database and
>> getting a new recordset.?
>>
>If I follow what you're trying to do, it sounds to me that you are confusing
>a number of tasks... the first is to let the visitor choose which records to
>delete from a database by selecting items presented in a form by selecting a
>checkbox. This is mainly an HTML task, so I would point you to a search with
>the terms "HTML Forms" + checkbox. This will give you some ideas about how
>to construct your form.
>
>The first ASP task is a matter of how the returned checkbox array can be
>parsed for the next task, which is deleting records from your database.




I think that this is where I have confused people. probably don't
have to delete from the recordset, rather I need to make an extra
field part of the recordset.

I was wanting to create a screen where the user is presented with a
screen showing, say, 50 records returned by the SQL statement. This
is generated by looping through the recordset. A checkbox is
presented alongside each record and the user can mark, say, 20 records
that are not to be processed in the next step. In this case, they
would not be receiving an email message.

What I can't figure out is how to get the value for the checkbox to be
part of the recordset. Once I've got that figured, then I can cycle
through the recordset again and ignore the checked items and fire off
the emails.

I seem to have some mental block here.........

.les.



>There are many examples of how to do this on such sites as ASP101.com, but
>the general idea is that, depending on how your database is set up, you can
>use a loop to select the item from the array and delete the corresponding
>record.
>
>The next ASP task is sending off an email, and depending on the content of
>the email, you could build the portion that references database records
>within the above loop, then add whatever other material is necessary to the
>CDO message.
>
>Hope this helps...
>
>Neil
>
>

From: Roger on
"Les Juby" <lesjuby(a)anti-spam.iafrica.com> wrote in message
news:4b743746.552906(a)localhost...
> On Sat, 30 Jan 2010 06:16:07 -0500, "Neil Gould"
> <neil(a)myplaceofwork.com> wrote:


>
> I was wanting to create a screen where the user is presented with a
> screen showing, say, 50 records returned by the SQL statement. This
> is generated by looping through the recordset. A checkbox is
> presented alongside each record and the user can mark, say, 20 records
> that are not to be processed in the next step. In this case, they
> would not be receiving an email message.
>
> What I can't figure out is how to get the value for the checkbox to be
> part of the recordset. Once I've got that figured, then I can cycle
> through the recordset again and ignore the checked items and fire off
> the emails.

Hi Les,

You display your records in a form like this

do until rs.eof
%><input type="checkbox" name="chk1" value=<%=rs.id%>> etc <%
rs.movenext
loop

Where rs.id is a unique id.
Once the user has clicked a few and posted the form, you retrieve them like
this

request.form("chk1")

Roger