PDA

View Full Version : Recordset Variable error


fullyii
04-06-2005, 09:40 PM
Can anyone help me with the syntax. I am trying to add a form variable start_dt and I keep getting an oracle error 01741: illegal zero length identifier. The problem is in red.


<%
Dim Recordset1__start_dt
Recordset1__start_dt = "01-jan-2005"
If (request.form("start_dt") <> "") Then
Recordset1__start_dt = request.form("start_dt")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_Pathways_Completion_STRING
Recordset1.Source = "SELECT Distinct PERSON.PERS_LOGIN_ID ""Associate Person ID"", PERSON.PERS_LAST_NAME ""Associate Last Name"", PERSON.PERS_FIRST_NAME ""Associate First Name"", HIER.LOCAL_CD ""Hierarchy"", CURRIC_COURSES.CURRIC_CD ""Curriculum Code"", CURRICULUM.TTL ""Curriculum Title"", CURRICULUM.STATUS_CD ""Curriculum Status Code"", PERSON.PERS_EMAIL_ADR ""Associate Email"", CURRICULUM.LOCAL_CD ""Curriculum ID"", PERSON_CURRIC_ASSIGNMENT.ADDED_DT ""Enrollment date"", PERSON_CURRIC.COMPLETED_DT ""Completion Date"", PERSON.ADDRESS_CITY ""Associate Location City"", PERSON.ADDRESS_STATE ""Associate Location State"", MANAGER.PERS_LOGIN_ID ""Manager Person ID"", MANAGER.PERS_LAST_NAME ""Manager Last Name"", MANAGER.PERS_FIRST_NAME ""Manager First Name"", MANAGER.PERS_EMAIL_ADR ""Manager Email"", RESP_ORG.LOCAL_CD ""Responsible_Org"", RESP_ORG.TTL ""Responsible_Org_Name"" FROM TEDSCBM.CURRICULUM , TEDSCBM.CURRIC_COURSES , TEDSCBM.PERSON , TEDSCBM.PERSON MANAGER, TEDSCBM.PERSON_CURRIC , TEDSCBM.PERSON_CURRIC_ASSIGNMENT , TEDSCBM.PERS_HIER , TEDSCBM.HIER , TEDSCBM.HIER RESP_ORG WHERE ( (CURRICULUM.CURRIC_CD = CURRIC_COURSES.CURRIC_CD) AND (PERSON.PERS_SUPER_ID = MANAGER.PERS_ID) AND (PERSON.PERS_ID = PERSON_CURRIC.PERS_ID) AND (PERSON_CURRIC.PERS_ID = PERSON_CURRIC_ASSIGNMENT.PERS_ID) AND (PERSON_CURRIC_ASSIGNMENT.CURRIC_CD = CURRIC_COURSES.CURRIC_CD) AND (PERSON.PERS_ID = PERS_HIER.PERS_ID) AND (PERS_HIER.HIER_CD = HIER.CD) AND (CURRICULUM.RESPONSIBLE_ORGANIZATION = RESP_ORG.CD) AND (RESP_ORG.LOCAL_CD like 'CROG') AND (CURRICULUM.STATUS_CD like '%') AND (HIER.CHILDREN = 0) AND <span style='color:red'>(PERSON_CURRIC_ASSIGNMENT.ADDED_DT > '" + Replace(Recordset1__start_dt, "'", "''") + "') </span> AND (PERSON_CURRIC_ASSIGNMENT.ADDED_DT < '31-DEC-2005') AND (CURRIC_COURSES.CURRIC_CD like '%') AND (PERSON.PERS_LOGIN_ID like '%') AND (MANAGER.PERS_LOGIN_ID like '%') AND (PERSON.ADDRESS_CITY Like '%') AND ( PERSON.ADDRESS_STATE Like '%') )"