| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 816 人关注过本帖
标题:System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误。
取消只看楼主 加入收藏
zerocn
Rank: 1
等 级:新手上路
帖 子:126
专家分:0
注 册:2006-4-11
收藏
 问题点数:0 回复次数:1 
System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误。
System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误。
在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
在 System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
在 DreamweaverCtrls.DataSet.DoInit()

为什么会这样,下面是我的上部分代码

<%@ Page Language="VB" ContentType="text/html" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO User (AdminName, AdminPws) VALUES (?, ?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_webdata") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_webdata") %>'
Expression='<%# Request.Form("MM_insert") = "form1" %>'
CreateDataSet="false"
Debug="true"
>
<Parameters>
<Parameter Name="@AdminName" Value='<%# IIf((Request.Form("AdminName") <> Nothing), Request.Form("AdminName"), "") %>' Type="WChar" />
<Parameter Name="@AdminPws" Value='<%# IIf((Request.Form("AdminPws") <> Nothing), Request.Form("AdminPws"), "") %>' Type="WChar" />
</Parameters>
</MM:Insert>
<MM:DataSet
id="User"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_webdata") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_webdata") %>'
CommandText='<%# "SELECT * FROM [User] WHERE AdminName = ?" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@AdminName" Value='<%# IIf((Request.Form("AdminName") <> Nothing), Request.Form("AdminName"), "") %>' Type="WChar" />
<Parameter Name="@AdminPws" Value='<%# IIf((Request.Form("AdminPws") <> Nothing), Request.Form("AdminPws"), "0") %>' Type="WChar" />
</Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Label1.visible="false"
if User.recordcount>0 then
session("User")=request.form("AdminName")
response.Redirect("index.aspx")
end if
End Sub
Sub sub_ling(Src As Object, E As EventArgs)
Label1.Visible="True"
End Sub
</script>

搜索更多相关主题的帖子: INSERT Data INTO OleDb 语法 
2006-05-08 22:28
zerocn
Rank: 1
等 级:新手上路
帖 子:126
专家分:0
注 册:2006-4-11
收藏
得分:0 

顶~~~~

2006-05-25 13:33
快速回复:System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误。
数据加载中...
 
   



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

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