Good Afternoon,
I am trying to write change some code, that i was given on this forum, to display all the records in a table corresponding to a particular user, to add formatting, and display the results in table, with the results in a text area, to allow the user then to update their entries.
I am getting the following error msg:
Line 99 is highlighted with ***********
This is the code I am having the problems with.
Any help would be great!
Cheers
Richard Noon
I am trying to write change some code, that i was given on this forum, to display all the records in a table corresponding to a particular user, to add formatting, and display the results in table, with the results in a text area, to allow the user then to update their entries.
I am getting the following error msg:
Code:
Microsoft VBScript runtime error '800a000d'
Type mismatch
/JobProfile.asp, line 99
Line 99 is highlighted with ***********
This is the code I am having the problems with.
Code:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="common.asp" -->
<%
'File: profile.asp
'Description: Profile Page
Dim strSQL 'Database query sring
Dim strUserName 'Holds the user name
Dim strFirst_Name 'Holds the user First Name
Dim User2 ' Who Sees the Profile
Dim Rand ' Random Key
Dim JobStart 'Job Start Date
Dim JobFinsih 'Job Finish Date
Dim EmployerName 'Employer name
strUserName = Request.QueryString("UserID")
strFirst_Name = Request.Form("First_Name")
User = Request.QueryString("User2")
rand = Request.Cookies("Zone")("Key")
JobStart = Request.Form("JobStart")
if strUserName = "" then
strUserName = Request.Cookies("Zone")("UserID")
if NOT rand = Request.Cookies("Zone")("Key") OR strUserName= "" then
response.redirect("cookie.asp?rm=expire&.rand=" & rand & "")
End if
End If
set conn = Server.CreateObject("ADODB.Connection")
conn.Provider = "Microsoft.Jet.OLEDB.4.0"
conn.Open "D:/Websites/richard/admin/db/users.mdb"
strSQL = "Select * From tblJob WHERE UserID ='" & strUsername & "'"
Set rsCheckUser = conn.Execute(strSQL)
%>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="[URL unfurl="true"]http://www.w3.org/TR/REC-html40">[/URL]
</style>
<link rel="stylesheet" type="text/css" href="css.css">
<xml><o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml>
<body>
<p align="center">
<h1>
<img height="110" src="images/BARLogo.gif" width="125" border="0">BAR - Job
Profile</h1>
<h2><%= strFirst_Name %>(Logged in as <%= strUsername %>)</h2>
<table cols="2" width="500" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="250"></td>
<td width="250"></td>
</tr>
<%
If NOT rsCheckUser.EOF Then
While NOT rsCheckUser.EOF
strUserName = rsCheckUser("UserID")
If strUserName <> strOldUserName Then
Response.Write "<tr><td colspan='2'><h2>" & strUserName & "</h2></td></tr>" & vbcrlf
End If
Response.Write "<td><p>" & rsCheckUser("JobStart") & "</p></td><td><p>" & rsCheckUser("JobFinish") & "</p></td><td><p>" & rsCheckUser("EmployerName") & "</p></td><td><p>" & rsCheckUser("JobRole") & "</p></td><td><p>" & rsCheckUser("JobDetail") & "</p></td></tr>"
strOldUserName = strUserName
rsCheckUser.MoveNext
Wend
Else
Response.Write "<tr><td colspan='2'><p>No records found</p></td></tr>" & vbcrlf
End If
Set rsCheckUser = Nothing
conn.Close
Set conn = Nothing
%>
</table>
<table height="44" width="100%" align="left" id="table1">
<tr>
<td align="right" width="50%" height="40">
<table BORDER=1 height="44" width="994" id="table2">
<form name="test" method="post" action="privatepageJob.asp?.rand=<%= Md5Hash %>">
<tr id=baseRow>
<td height="38">Start Date
<p>
****** <input name="JobStart" size="8" value="<%= rsCheckUser("JobStart") %>"></p> ***********
</td>
<td height="38">End Date
<p><input name="JobFinish" size="8"></p>
</td>
<td height="38">Organisation Name
<p><input name="EmployerName" size="25"></p>
</td>
<td height="38">Your Role
<p><textarea rows="3" name="JobRole" cols="23"></textarea></p>
</td>
<td height="38">More Detail
<p><textarea rows="3" name="JobDetail" cols="22"></textarea></p>
</td>
<td height="38">
<p align="center">Not Deletable</p>
</td>
</tr>
</table>
Any help would be great!
Cheers
Richard Noon