Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have the following code... [cod

Status
Not open for further replies.

tylerjones

Programmer
Jan 4, 2002
10
US
I have the following code...
Code:
sqlTmp = "Select EducationComment, RelocationComment, Resume, Comments FROM dbo.JobSeeker JS WHERE (Downloaded = 0) AND (AgencyID = '" & session("agencyID") & "') AND (JobSeekerID = " & userID & ")"

		set tmpRS = server.createobject("adodb.recordset")
		tmpRS.ActiveConnection = conn
		tmpRS.open sqlTmp, , adopenforwardonly, adLockReadOnly

		if not tmpRS.eof then
			EducationComment = trim(rs("EducationComment") & "")
			RelocationComment = trim(rs("RelocationComment") & "")
			ResumeField = trim(rs("Resume") & "")
			Comments = trim(rs("Comments") & "")
		end if

		tmpRS.close
		set tmpRS = nothing
All the fields are text fields in a SQL Server 7 database. As soon as I try to assign the values to a variable I get an exception has occurred error. Does anyone have any ideas why? It doesn't seem to matter whether the field actually contains data or is null... I get the error either way. Thanks.
 
You're using rs instead of tmpRS...


if not tmpRS.eof then
EducationComment = trim([red]rs[/red]("EducationComment") & "")
RelocationComment = trim([red]rs[/red]("RelocationComment") & "")
ResumeField = trim([red]rs[/red]("Resume") & "")
Comments = trim([red]rs[/red]("Comments") & "")
end if


Mark The law, in its majestic equality, forbids the rich, as well as the poor, to sleep under the bridges, to beg in the streets, and to steal bread.

Anatole France
 
Ah, you're right. But unfortunately, that was not the problem. Thanks for pointing that out though. However, I'm still getting the same exception occurred error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top