INSERT INTO 出错问题?ASP操作ACCESS数据库
请教那位可以解决以下问题
以下SQL语句在ACCESS中建立的查询可以正确运行,但是在ASP页面通过ole连接ACCESS数据库的时候出错,
ASP操作数据库方式
set Command1 = Server.CreateObject( "ADODB.Command ")
Command1.ActiveConnection = conn_string
Command1.CommandText = sql
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
出错信息如下:
Microsoft JET Database Engine 错误 '80040e14 '
INSERT INTO 语句的语法错误。
SQL语句如下:
INSERT INTO ly_league ( account, pwd, name, sex, age, marriage, area, address, mobile, phoneHome, phoneCompany, fax, email, education, major, workexp, company, [position], investarea, investasset, investmethod, Getinfofrom, investtime, investshop, managedevelop, advantage, suggest, apptime, deal, im )
SELECT iif(isnull(account), 'abc ',account), iif(isnull(pwd), 'abc ',pwd), name, sex, age, marriage, area, address, mobile, phoneHome, phoneCompany, fax, email, education, major, workexp, company, position, investarea, investasset, investmethod, Getinfofrom, investtime, investshop, managedevelop, advantage, suggest, apptime, deal, im
FROM ly_league_app
WHERE id=1
------解决方案--------------------pwd
-->
[pwd]
把所有的字段都加上[]试试。