| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 375 人关注过本帖
标题:[求助]为什么总是提示into语句错误!!???
只看楼主 加入收藏
float
Rank: 1
等 级:新手上路
威 望:1
帖 子:52
专家分:0
注 册:2006-4-10
收藏
 问题点数:0 回复次数:2 
[求助]为什么总是提示into语句错误!!???

为什么总是提示into语句错误!!???
这段代码有错误吗??
dim resultcn as new oledbconnection("provider=microsoft.jet.oledb.4.0; data source=C:\Inetpub\wwwroot\by\data.mdb")
st="insert into result(number,type,result) values('03001','xiaowu','999')"
dim resultcmd as new oledbcommand(st,resultcn)
resultcn.open()
resultcmd.executenonquery()

resultcn.close()


有什么存在的问题可能会导致这些错误的??有谁能帮一下吗?

搜索更多相关主题的帖子: 提示 语句 
2006-04-10 13:16
rainic
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2367
专家分:0
注 册:2005-8-9
收藏
得分:0 

可能是类型不对。

st="insert into result(number,type,result) values(03001,'xiaowu',999)"


2006-04-10 13:39
float
Rank: 1
等 级:新手上路
威 望:1
帖 子:52
专家分:0
注 册:2006-4-10
收藏
得分:0 

也不行啊,也是insert into语法错误,

我的result表中的字段全都是文本类型的

这到底是怎么回事啊?

有一个我以前能正常运行的程序现在也是出现这种错误?????

错误描述是:

Server Error in '/' Application.

INSERT INTO 语句的语法错误。

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误。

Source Error:

2006-04-10 22:49
快速回复:[求助]为什么总是提示into语句错误!!???
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.028616 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved