Hello,
Our live database is actually flat files (.dbf). We use SQL Server 2000 DTS packages to copy data from the flat files into SQL tables every night. All of our reports are based on these SQL tables instead of the live data.
We are changing one of our asp pages to use the live database (.dbf) files so we get realtime data.
I'm still pretty new to asp so not sure where to go with this problem. The problem I'm having is with a select statment that is getting data based on a partial field match. Not sure if i'm explaining it correctly so here is an example.
strSQL = "Select * from MEME where MEM_ID = '" & strMyMEMID & "' AND LEFT(MEME.PLAN_CODE,3) <> 'ORT' AND LEFT(MEME.PLAN_CODE,1) <> 'V' and MEME.EFFECTIVE_DATE <'" & strToday & "' and (MEME.TERMINATE_DATE > '" & strToday & "' or MEME.TERMINATE_DATE = ' ')"
This is selecting rows based on the first 3 characters of PLAN_CODE not matching "ORT" or the first character of PLAN_CODE not matching "V"). This works fine with SQL server but not with the dbf files. I don't know why.
It seems to think that the LEFT in LEFT(MEME.PLAN_CODE,3) is part of the actual field name and is giving me this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[DB/C Software][FS4 ODBC Driver]Parsing error: invalid column name: LEFT
/app/companywide/onlineenrollment/PendEmp.asp, line 719
I've spent several hours googling this but haven't come close to a solution. Any help would be appreciated.
mfenn
Our live database is actually flat files (.dbf). We use SQL Server 2000 DTS packages to copy data from the flat files into SQL tables every night. All of our reports are based on these SQL tables instead of the live data.
We are changing one of our asp pages to use the live database (.dbf) files so we get realtime data.
I'm still pretty new to asp so not sure where to go with this problem. The problem I'm having is with a select statment that is getting data based on a partial field match. Not sure if i'm explaining it correctly so here is an example.
strSQL = "Select * from MEME where MEM_ID = '" & strMyMEMID & "' AND LEFT(MEME.PLAN_CODE,3) <> 'ORT' AND LEFT(MEME.PLAN_CODE,1) <> 'V' and MEME.EFFECTIVE_DATE <'" & strToday & "' and (MEME.TERMINATE_DATE > '" & strToday & "' or MEME.TERMINATE_DATE = ' ')"
This is selecting rows based on the first 3 characters of PLAN_CODE not matching "ORT" or the first character of PLAN_CODE not matching "V"). This works fine with SQL server but not with the dbf files. I don't know why.
It seems to think that the LEFT in LEFT(MEME.PLAN_CODE,3) is part of the actual field name and is giving me this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[DB/C Software][FS4 ODBC Driver]Parsing error: invalid column name: LEFT
/app/companywide/onlineenrollment/PendEmp.asp, line 719
I've spent several hours googling this but haven't come close to a solution. Any help would be appreciated.
mfenn