sorry. I've been working with this for 2 days am frustrated.
That piece of code is part of a processing script for a form which adds questions to a database. I am editing the code on a developmental server on our network. When i submit question the entire dev. server stops and must be restarted. It only happens when this segment of code is trying to exicute. The error message is server can not be reached.
entire code:<%
PageFunction=Request.Form("Pagefunction"

Choices=Request.Form("Choices"

ContentPage=Request.Form("Page"

Question=Request.Form("Question"

QNumb=Request.Form("QuestionChoice"

Dim Answer(10), Reason(10), Correct(10)
CorrectCounter=0
For a=1 to Choices
Answer(a)=Request.Form("Answer(" & a & "

"

Reason(a)=Request.Form("Reason(" & a & "

"

If Request.Form("Correct(" & a & "

"

="yes" Then
Correct(a)="correct"
CorrectCounter=CorrectCounter+1
Else
Correct(a)="*"
End If
Next
If CorrectCounter=0 Then
Response.Write("You have designated no answer as the correct answer.<BR>Please use the back button on the browser to return to the form and change your selections to one correct answer."

Else
If CorrectCounter>1 Then
Response.Write("You have designated more than one answer as the correct answer.<BR>Please use the back button on the browser to return to the form and change your selections to one correct answer."

Else
Set objConn = Server.CreateObject("ADODB.Connection"

objConn.Open "Content_and_Links"
If PageFunction<>"edit" Then
Set RS = objConn.Execute("INSERT INTO Questions (ContentPage, QNumb, question) VALUES ('" & ContentPage & "','" & QNumb & "','" & question & "')"

For a=1 to Choices
Set RS = objConn.Execute("INSERT INTO Answers (ContentPage, QNumb, order, correct, answer, reason) VALUES ('" & ContentPage & "','" & QNumb & "','" & a & "','" & Correct(a) & "','" & Answer(a) & "','" & Reason(a) & "')"

Next
Else
Set RS = objConn.Execute("UPDATE Questions SET question = ('" & question & "') WHERE (ContentPage, QNumb) = ('" & ContentPage & "','" & QNumb & "')"

For a=1 to Choices
Set RS = objConn.Execute("UPDATE Answers SET (order, correct, answer, reason) = ('" & a & "','" & Correct(a) & "','" & Answer(a) & "','" & Reason(a) & "') WHERE (ContentPage, QNumb) = ('" & ContentPage & "','" & QNumb & "')"

Next
End If
ObjConn.Close
Set ObjConn=nothing
End If
End If
%>
[sig]<p>Mike2<br><a href=mailto:chaos986@yahoo.com>chaos986@yahoo.com</a><br><a href=http//
Mike2 Website</a><br>also see my small busness work @ http:/www.michaelswgp.com[/sig]