473,385 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

HTTP 500 error - ASP + javascript

Hi,

This script runs at college on the test site.

I cannot get any SQL query to run at work, even though
the same script runs at college????

I always get a HTTP 500 internal server error.

Can anyone point out what I am doing wrong????

Thanks

Clive

++++++++++++++++++++++++
<html>
<body>

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(("E:\Website\Test\ASP\test.mdb"))

set rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT ClientID, Address FROM Employees", conn
%>

<table border="1" width="100%">
<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields%>
<td><%Response.Write(x.value)%></td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
</table>

</body>
</html>

Jul 23 '05 #1
2 2585
Clive wrote on 22 mrt 2005 in comp.lang.javascript:
I always get a HTTP 500 internal server error.


first switch off "show friendly errors" in your IE browser
and then tell us the real error numbers and texts.

Your code is ASP serverside VBscript [not javascript] DB,
so posting it in this javascript NG won't do.

Restate this question in the best NG for this Q:

microsoft.public.inetserver.asp.db

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #2
Ooopps put the wrong bit of code in.
This is client-side NOT server-side (right)??

The ASP pages shows-up.
The Access database is there & field - NO error BUT the ListBox is
empty????

<% @Language=Javascript %>
<%
var strTemp = " ";
var intClient = 0;
var intTemp = 0;
var strProvider = " ";
var strQuery = " ";
var rstClient;
var rstEmpProj;

intTemp = Request("cmbClients");
if (intTemp >= 1) intClient=intTemp;
else intClient = -1;
%>

<html>
<head>
<title>Scapegoat Employee/Client Relationships</title></head>

<body>

<h1 align="center"><font color="#006699">Scapegoat Employee/Client
Relationships</font></h1>
<form name="frmClient" method="POST" action="mydefault.asp">
<p align="center">Please select a client from from the list:
<select size="1" name="cmbClients">

<%
strTemp = " ";
if (intClient == -1) {
strTemp="<option selected value='-1'>";
strTemp +="Select Client..</option>";
}

strProvider="DRIVER={Microsoft Access Driver (*.mdb)}; ";
strProvider += "DBQ=E:\\Website\\Test\\ASP\\test.mdb;";
strQuery="SELECT * FROM Clients ORDER BY LastName ASC";
rstClient=Server.CreateObject("ADODB.recordset");
rstClient.Open(strQuery, strProvider);
while (! rstClient.EOF) {
intTemp = 0;
intTemp += rstClient("ClientID");
if (intTemp==intClient) strTemp += "<option selected ";
else strTemp += "<option ";
strTemp +="value='"+intTemp+"'>"+rstClient("LastName")+" ,
"+rstClient("FirstName")+"</option>";
rstClient.MoveNext();
}
Response.Write(strTemp);
%>
</select><input type="submit" value="GO" name="cmdGo"></p>
</FORM>

<%
if (intClient > 0) {
strTemp="<p align='center'>Employees working for: <b>";
strQuery="SELECT * FROM Clients WHERE ClientID=" + intClient;
rstClient=Server.CreateObject("ADODB.recordset");
rstClient.Open (strQuery, strProvider);
if (! rstClient.EOF) strTemp += rstClient("ClientID");
else strTemp += "<i>Unknown Client</i>";
strTemp += "</b></p><p align='center'>";
strQuery="SELECT * FROM Clients WHERE ClientID=";
strQuery += intClient;
rstEmpProj=Server.CreateObject("ADODB.recordset");
rstEmpProj.Open(strQuery, strProvider);
while (! rstEmpProj.EOF) {
strTemp += rstEmpProj ("FirstName") + ", ";
strTemp += rstEmpProj ("LastName")+ "<BR>";
rstEmpProj.MoveNext();
}
strTemp += "</p>";
Response.Write(strTemp);
}
%>

</body>
</html>

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: RK | last post by:
I am getting the "HTTP /1.1 405 - method not allowed" error when I am sending XML string over Msxml2.XMLHTTP object. I am sending data in POST, also passing querystring variable and here is the...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
14
by: Rich | last post by:
I am converting my enterprise solution from VS 2003 (.NET v1.1.4322) to VS 2005 (.NET v2.0.50727). The entire solution uses serveral technologies - Windows Server 2003 (AD, SQL Server 2000, IIS,...
3
by: Prash | last post by:
IIS serving javascript files, gives me error 4/21/2006 6:48 AM Guys/Gals, I am using IIS as a server to serve the javascript files. But it is giving me the error as "Object doesn't support this...
7
by: John | last post by:
Hi Everyone, I'm having this extremely annoying problem with Internet Explorer 6, giving me an error message saying "unknown runtime error" whenever I try to alter the contents of a <divelement...
7
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am trying to set this up using asp code and IIS configuration. But it seems not working. Here it is the way I am doing. In IIS I set up a virtual directory with secure communication, I...
3
by: sjohnson1984 | last post by:
Hello all, thanks for taking the time out to read this. I have a javascript function, the purpose of which is to compare 2 form values and redirect the user if two values are met - however,...
1
by: KRISHNA PRAVI | last post by:
the error is "runtime error object expected" here is the code....................................................................................... <script language="javascript"...
9
by: ahilar12 | last post by:
1. <head> 2. <script type="text/javascript"> 3. </script> 4. </head> 5. <body> 6. <form> 7. <select name="team" id="mylist" > 8. <option></option> 9....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.