
October 27th, 2004, 11:46 AM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Scripting help needed
Hi guys...
I'm wondering if someone can assist me with this little problem I'm having. The following code is for a job posting page for the site I'm building. Now, I only want records whose PostOnWeb value is -1 (for some reason, that is the value that MS Access uses for true when using Yes/No fields) and where the PostedUntil is greater than or equal to today's date. Any help would be appreciated.
Code:
<%
Dim JobsParam, JobsParam2
JobsParam = "-1"
JobsParam2 = "01/01/2000"
If (Request("MM_EmptyValue") <> "") Then
JobsParam = Request("MM_EmptyValue")
End If
If (Request("MM_EmptyValue") <> "") Then
JobsParam2 = Date()
End If
%>
<%
Dim Jobs, Jobs_numRows
Set Jobs = Server.CreateObject("ADODB.Recordset")
Jobs.ActiveConnection = MM_mands_STRING
Jobs.Source = "SELECT JobID, Department, PositionTitle, PostedUntil, PostOnWeb, JobLink, FROM jobs WHERE PostOnWeb = " + Replace(Jobs__MMColParam, "'", "''") + " AND PostedUntil = " + Replace(Jobs__MMColParam2, "'", "''") + ""
Jobs.CursorType = 0
Jobs.CursorLocation = 2
Jobs.LockType = 1
Jobs.Open()
Jobs_numRows = 0
%>
|