Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Whats is wrong with this MULTIPLE POST/INSERTS

Author  Topic 

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2005-03-20 : 11:32:43
hello, i have the following ASP Page that receives input for a bulk blast of sms messages, My provider requested that for each sms sent by the user.

I should create a loop to post each message as one instead of all at once.

however when i create a loop such as

phone = Split(request.Form("phone_nu"), ",")
For i = 0 to UBound(phone)
'Assemble the sms string e.g.
'Call a stored proceedure to run multiple inserts
provider = "http://www.smsprovider.com/send.asp?user="&phone(i)&... etc

response.redirect(provider)
next


Now if a user sends 2messages, it would loop twice, however, when i tried to test for 200 messages. I got the error below. What is wrong and how could i fix it ? knowing that if its a function of the IIS timeout property, then i would have to virtually set it to loop forever

2. Is it right to call a SP to continue to loop for each insert, becasue it appears to be slow ?

Active Server Pages error 'ASP 0113' 

Script timed out

/welcome/welcome/messages/1.asp

The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.

nr
SQLTeam MVY

12543 Posts

Posted - 2005-03-20 : 15:36:23
Probably easiest to create a text file and bulk insert them.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -