Mastermunk
Programmer
I have to update a foxpro table named RMA which has the annoying feature of using keywords for column names.
Basically I have to update a column named 'desc' in the table this RMA. This is simple enough on SQL Server to handle (just using [desc]) but with Foxpro I get an error.
Sql Statement
----------------------------------------------------------
Used in Code: (VBscript)
----------------------------------------------------------
Error:
-----------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Visual FoxPro Driver]Command contains unrecognized phrase/keyword.
/intranet/customerservice/rmamanager.asp, line 89
If I wasn't forced to use these column names this would be a no-brainer. If anyone can see the error of my ways or a another possible solution please reply.
Basically I have to update a column named 'desc' in the table this RMA. This is simple enough on SQL Server to handle (just using [desc]) but with Foxpro I get an error.
Sql Statement
----------------------------------------------------------
Code:
UPDATE RMA
SET RMA.desc='(some lengthy text)'
WHERE RMA.rmanumber=2626
Used in Code: (VBscript)
----------------------------------------------------------
Code:
sql="UPDATE RMA "& _
" SET RMA.desc='"&replace(expl,"'","''")&"' "& _
" WHERE RMA.rmanumber="&session("RMAnumber")
conntemp.execute(sql)
'Where expl is a concatenated string,
'RMAnumber is a long int,
'and conntemp is an open connection to foxpro
Error:
-----------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Visual FoxPro Driver]Command contains unrecognized phrase/keyword.
/intranet/customerservice/rmamanager.asp, line 89
If I wasn't forced to use these column names this would be a no-brainer. If anyone can see the error of my ways or a another possible solution please reply.