asp page and a http500 internal server error
Please help!
This script works fine on my local server. IIS on windows 2000.
When I upload it to my free site at brinkster.com it gets an error message.
Is there something on this page that might be difficult for some servers to run?
The only thing I can think of offhand that I did differently on this page as opposed to others that have run fine is overwriting an array. But that couldn't be the problem, could it?
----------------------------
<?php
@ Language=VBScript
?>
<?php
option explicit
Response.Buffer=true
dim con,rs1,i,klass,sqlstr
klass="odd"
dim requested_institution
requested_institution=request.QueryString("institution")
dim ar_headers()
redim ar_headers(0)
redim ar_headers(4)
ar_headers(0)="Address"
ar_headers(1)="Town"
ar_headers(2)="Zip"
ar_headers(3)="Phone"
ar_headers(4)="Fax"
'**connection and recordset objects for local site***
set con=server.CreateObject("adodb.connection")
Con.open "provider=microsoft.jet.oledb.3.51;data source=c:\Joy of Life.mdb"
set rs1=server.CreateObject("adodb.recordset")
'**connection and recordset objects for brinkster site**
'set Con = Server.CreateObject("ADODB.Connection")
'con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\akohl\db\Joy of Life.mdb")
'set rs1 = server.CreateObject ("adodb.recordset")
sqlstr="SELECT * FROM institutions WHERE (((institutions.institution_id)="&requested_institution&"));"
rs1.Open sqlstr,con,3,3
?>
The Joy of Life - How to Tithe
Joy of Charity Recognized Charity
<?php
'response.write("<h1>"&rs1.fields("name")&"</h1>")
response.write("<h3>"&rs1.fields("name")&"</h3>")
response.write("<p>"&rs1.fields("aims_description")&"</p>")
response.write("<p> Click to visit "&rs1.fields("name")&"'s website at <a href='http://"&rs1.fields("website")&"'>"&rs1.fields("website")&"</a></p>")
response.write("<p>You may contact them by email at <a href='mailto:"&rs1.fields("email")&"'>"&rs1.fields("email")&"</a></p>")
response.write("<div align=center>")
Response.Write("<table border=3 bordercolor=#ccccff cellspacing=0 cellpadding=0 class=list>")
response.write("<col width=160><col width=100><col width=40><col width=70><col width=70>")
Response.Write("<tr><td colspan=5><p class=scrolled style='text-align: center;'>Contact Information</p></td></tr>")
Response.Write("<tr>")
for i=0 to ubound(ar_headers)
Response.Write("<th class=not_menu_header>")
Response.Write(ar_headers(i))
Response.Write("</th>")
next
Response.Write("</tr>")
rs1.movefirst()
do until rs1.EOF
Response.Write("<tr class=even>")
for i=0 to ubound(ar_headers)
select case true
case ar_headers(i)="Address"
Response.Write("<td border=1>"&rs1.Fields("address")&"</td>")
case ar_headers(i)="Town"
Response.Write("<td border=1>"&rs1.Fields("city")&"</td>")
case ar_headers(i)="Zip"
Response.Write("<td border=1>"&rs1.Fields("zip")&"</td>")
case ar_headers(i)="Phone"
Response.Write("<td border=1>"&rs1.Fields("telephone")&"</td>")
case ar_headers(i)="Fax"
Response.Write("<td border=1>"&rs1.Fields("fax")&"</td>")
end select
next
Response.Write("</tr>")
rs1.MoveNext
loop
Response.Write("</table>")
redim ar_headers(0)
redim ar_headers(1)
ar_headers(0)="Entity Number"
ar_headers(1)="File Number"
Response.Write("<table border=3 bordercolor=#ccccff cellspacing=0 cellpadding=3 class=list style='width: 160;'>")
response.write("<col width=80><col width=80>")
Response.Write("<tr><td colspan=2><p class=scrolled style='text-align: center;'>Tax Information</p></td></tr>")
Response.Write("<tr>")
for i=0 to ubound(ar_headers)
Response.Write("<th class=not_menu_header>")
Response.Write(ar_headers(i))
Response.Write("</th>")
next
Response.Write("</tr>")
rs1.movefirst()
do until rs1.EOF
Response.Write("<tr class=even>")
for i=0 to ubound(ar_headers)
select case true
case ar_headers(i)="Entity Number"
Response.Write("<td border=1>"&rs1.Fields("entity_number")&"</td>")
case ar_headers(i)="File Number"
Response.Write("<td border=1>"&rs1.Fields("file_number")&"</td>")
end select
next
Response.Write("</tr>")
rs1.MoveNext
loop
Response.Write("</table>")
response.write("</div>")
rs1.close()
set rs1=nothing
con.close()
set con=nothing
?>
Andy Kohlenberg
Jerusalem, Israel
akohl posted this at 16:05 — 1st August 2001.
They have: 117 posts
Joined: Feb 2001
Sorry for the false alarm.
I found the out of place apostrophe in the connection string.
I thought I had made the correction previously and the problem persisted.
I guess I just didn't save the change.
Bye
Andy Kohlenberg
Jerusalem, Israel
Mark Hensler posted this at 17:03 — 1st August 2001.
He has: 4,048 posts
Joined: Aug 2000
Doh!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.