website error
I have read several posts re this issue and still cannot figure out my problem. (Code works fine for almost all Agents except one.) Any help would be appreciated.
Receiving the following error (code below):
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'L'.
/acs.asp, line 175
SQL CODE:
function RetrieveBranch(dcnDB)
dim strSQL
dim rsBranch
if request.form("RegionList") = "USA" then
strSQL = "select distinct IATA, Agent, City, State, Zip from Agent where Agent in ('" & request.form("AgentList") & "') order by IATA "
else
strSQL = "select distinct IATA, Agent, City, State, Zip from Agent where Agent in ('" & request.form("AgentList") & "') and Region in ('" & request.form("RegionList") &"') order by IATA "
end if
set rsBranch = dcnDB.Execute(strSQL) (THIS IS LINE 175)
set RetrieveBranch = rsBranch
end function
Thanks.
|