Guest_imported
New member
- Jan 1, 1970
- 0
Does anyone know what is wrong with this? I keep getting and unspecified error at the end.
data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
("\\cpweb2\fpdb\30pers.mdb"
sqlalignment = "SELECT dbo_t_EMPLOYEES.CurrentComp," &_
"dbo_t_EMPLOYEES.LAST_NAME, " &_
"dbo_t_EMPLOYEES.FIRST_NAME, " &_
"dbo_t_EMPLOYEES.STATUS, " &_
"dbo_t_EMPLOYEES.POSITION, " &_
"dbo_t_EMPLOYEES.PROGRAM, " &_
"dbo_t_GOVERNMENT.JOB_SERIES, " &_
"dbo_t_GOVERNMENT.GRADE, " &_
"Left([CurrentComp],3) AS Comp, " &_
"dbo_t_EMPLOYEES.EmployeeID, " &_
"[LAST_NAME]&', '&[FIRST_NAME] AS Name, " &_
"FROM dbo_t_EMPLOYEES JOIN dbo_t_GOVERNMENT ON dbo_t_EMPLOYEES.EmployeeID = dbo_t_GOVERNMENT.EmployeeID, " &_
"GROUP BY dbo_t_EMPLOYEES.CurrentComp, dbo_t_EMPLOYEES.LAST_NAME, dbo_t_EMPLOYEES.FIRST_NAME, " &_
"dbo_t_EMPLOYEES.STATUS, dbo_t_EMPLOYEES.POSITION, dbo_t_EMPLOYEES.PROGRAM, dbo_t_GOVERNMENT.JOB_SERIES, " &_
"dbo_t_GOVERNMENT.GRADE, Left([CurrentComp],3), dbo_t_EMPLOYEES.EmployeeID, [LAST_NAME]&', '&[FIRST_NAME], " &_
"HAVING (((dbo_t_EMPLOYEES.LAST_NAME) Not Like 'VAC%') AND , " &_
"((dbo_t_EMPLOYEES.STATUS) Like 'perman%' Or (dbo_t_EMPLOYEES.STATUS) Like '%term%')) , " &_
"OR (((dbo_t_EMPLOYEES.LAST_NAME) Not Like 'vac%') AND ((dbo_t_EMPLOYEES.STATUS) Like 'perman%', " &_
" Or (dbo_t_EMPLOYEES.STATUS) Like 'term%')), " &_
"ORDER BY dbo_t_EMPLOYEES.CurrentComp, dbo_t_EMPLOYEES.LAST_NAME "
Set rs = SERVER.CreateObject("ADODB.Recordset"
rs.Open sqlalignment, data_source
data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
("\\cpweb2\fpdb\30pers.mdb"
sqlalignment = "SELECT dbo_t_EMPLOYEES.CurrentComp," &_
"dbo_t_EMPLOYEES.LAST_NAME, " &_
"dbo_t_EMPLOYEES.FIRST_NAME, " &_
"dbo_t_EMPLOYEES.STATUS, " &_
"dbo_t_EMPLOYEES.POSITION, " &_
"dbo_t_EMPLOYEES.PROGRAM, " &_
"dbo_t_GOVERNMENT.JOB_SERIES, " &_
"dbo_t_GOVERNMENT.GRADE, " &_
"Left([CurrentComp],3) AS Comp, " &_
"dbo_t_EMPLOYEES.EmployeeID, " &_
"[LAST_NAME]&', '&[FIRST_NAME] AS Name, " &_
"FROM dbo_t_EMPLOYEES JOIN dbo_t_GOVERNMENT ON dbo_t_EMPLOYEES.EmployeeID = dbo_t_GOVERNMENT.EmployeeID, " &_
"GROUP BY dbo_t_EMPLOYEES.CurrentComp, dbo_t_EMPLOYEES.LAST_NAME, dbo_t_EMPLOYEES.FIRST_NAME, " &_
"dbo_t_EMPLOYEES.STATUS, dbo_t_EMPLOYEES.POSITION, dbo_t_EMPLOYEES.PROGRAM, dbo_t_GOVERNMENT.JOB_SERIES, " &_
"dbo_t_GOVERNMENT.GRADE, Left([CurrentComp],3), dbo_t_EMPLOYEES.EmployeeID, [LAST_NAME]&', '&[FIRST_NAME], " &_
"HAVING (((dbo_t_EMPLOYEES.LAST_NAME) Not Like 'VAC%') AND , " &_
"((dbo_t_EMPLOYEES.STATUS) Like 'perman%' Or (dbo_t_EMPLOYEES.STATUS) Like '%term%')) , " &_
"OR (((dbo_t_EMPLOYEES.LAST_NAME) Not Like 'vac%') AND ((dbo_t_EMPLOYEES.STATUS) Like 'perman%', " &_
" Or (dbo_t_EMPLOYEES.STATUS) Like 'term%')), " &_
"ORDER BY dbo_t_EMPLOYEES.CurrentComp, dbo_t_EMPLOYEES.LAST_NAME "
Set rs = SERVER.CreateObject("ADODB.Recordset"
rs.Open sqlalignment, data_source