[thelist] stuck in a loop (classic asp/mssql)

Matt Warden mwarden at gmail.com
Mon Aug 22 10:01:13 CDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Brian,

Brian Cummiskey wrote:
> I split it all out into a nice string...
> 
> for i = 1 to Request.Form.Count
>   if (inStr(1,Request.Form.Key(i),"recordid")) then

It has been a *long* time since I've done any serious ASP work, but I
am fairly certain that you can do:

foo = Request.Form('foo')

where 'foo' is the name of a number of checkboxes, and classic ASP
will return you a Collection. So, you should be able to simplify your
code and avoid the for loop.

>     totalNumbers = totalNumbers + 1
>     if (numbersToNotCall = "") then
>       numbersToNotCall = "'" & Request.Form.Item(i) & "'"
>     else
>       numbersToNotCall = numbersToNotCall & ",'" & Request.Form.Item(i)
> & "'"
>     end if
...
> Anyone have any suggestions on how to approach the multiple updates
> across multiple servers in multiple locations?

Use different connection objects.

Can you give us a little more information on exactly what the problem
you're experiencing is? I know you said you aren't really getting
anywhere, but where are you currently and where do you want to be?
What is the above code not doing that you want it to do, basically.

Thanks,

- --
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFDCei5AQ0d4HGyPE8RAkxsAJ92uHrEwIV2omFt6Kr+zAXFpinx1ACdEgZP
dM9vdjNyAZJPp8GxMeNRV2g=
=TI6q
-----END PGP SIGNATURE-----


More information about the thelist mailing list