INSERT INTO 语句的语法错误 [问题点数:20分]

Bbs1
本版专家分:0
结帖率 33.33%
Bbs1
本版专家分:10
Bbs1
本版专家分:0
Bbs1
本版专家分:2
mdb数据库,一直提示INSERT INTO 语句语法错误
mdb数据库,一直提示INSERT INTO <em>语句</em><em>语法错误</em> INSERT INTO 挂账(Rpt_Date,Text,ZMoney,PayMoney,Ymoney,Czy,Bz,Time,门店,帐户名称) VALUES( '2011-09-20','00000120110920001592','1073','0','1073','杜俏燕','1','2011-09-20 20:2
【转】“Insert into 语句语法错误”的解决方法
“Insert into <em>语句</em>的<em>语法错误</em>”的解决方法 用C#.net+access做练习发现了个问题.我定义了一个非常简单的select查询在sql server企业管理器中没问题,但在.net IDE中调试就通不过,提示 "使用OleDbCommandBuilder时出现“Insert into <em>语句</em>的<em>语法错误</em>”的解决方法".后来发现是数据库中表的字段名有问题,baidu一下找到下面的东东
OleDbDataAdapter 的Update语句执行时提示“insert into语法错误”解决方法
1、使用OleDbDataAdapter根据select<em>语句</em>向其它表中数据更新数据,方法如下: public static bool DataSetUpdateTable(string selectSql,DataSet ds) {     try{     OleDbConnertion connection=new OleDbConnection(“链接字符串”);     co
Oledb 写入Excel异常 INSERT INTO 语句语法错误
如果你的基本语法没问题 比如:  <em>insert</em> into [Similar Projects$](Image)  values('/Flu/3_0_sakhalin_140x90.jpg')   那么就要检查,字段名是否为敏感词,最好是加上方括号[], 如下所述就正确了,  image 改为 [image] <em>insert</em> into [Similar Projects$]([Image
向Access中插入数据报“INSERT INTO 语句语法错误
向Access中插入数据报“INSERT INTO <em>语句</em>的<em>语法错误</em>” 因一直使用SQL2014,有个小站点使用SQL数据有点浪费,所以决定用ACCESS做数据库,在进行查询的时候没有任何问题。可是一但在使用插入时就会出现<em>insert</em> into插入错误。刚在网上搜了下,发现一些网友也碰到此情况。在此忠心感谢此网友: 原文如下: 向Access中插入数据报错误: INSERT INTO <em>语句</em>的
ASP、Access、80040e14、保留关键字、INSERT INTO 语句语法错误
当字段名与保留字相同时,应用[] 加以区分,否则会出现Microsoft JET Database Engine 错误 '80040e14' INSERT INTO <em>语句</em>的<em>语法错误</em>。Example:Insert into Userlog (UserName,[Password],TransDate,TransIP) Values(‘”&amp;amp;UserName&amp;amp;”’,’”&amp;amp;Pass...
DELPHI INSERT INTO 语句语法错误 解决方法
近日在delphi中向ACCESS插入数据库老是提示‘Exception class EOleException with message INSERT INTO <em>语句</em>的<em>语法错误</em>。’非常怪,在ACCESS中的SQL视图中确可以运行,未有语法问题, 在试来试去总算发现在插入的安段中加上中括号就可以解决,之前的都不会估计是此次表内的某个安段成为ACCESS或ADO之类的关键字影响吧!在此记录
使用OleDb向acces插入数据或者查询数据发生INSERT INTO 语法错误
例如插入一条记录 <em>insert</em> into 表名 (字段 1,字段2,字段3) values (***,***,***); 这条<em>语句</em>在access中执行时会发生错误,错误是INSERT INTO <em>语句</em><em>语法错误</em>, 不知道为什么,明明没有错误。 当修改为 <em>insert</em> into [表名] ([字段 1],[字段2],[字段3]) values (***,***,***); 也就是把所有的用到
【tk.mybatis】使用 tk.mybatis insert 插入数据时出现语法错误
使用 <em>insert</em> 插入数据时,发现 sql <em>语句</em>语法有错误 发现这个与使用 mybatis-generator-maven-plugin 插件自动生成的代码有关,在生成的实体类上有一个 @Table 注解,发现注解值是 itoke-server-admin.tbsysuser 解决办法: 手动删除多余的数据库,只写上表名 ...
[Microsoft][ODBC Microsoft Access 驱动程序] INSERT INTO 语句语法错误的可能原因
今天使用JDBC-ODBC桥接来操作Access数据库,发现了一个问题:<em>insert</em><em>语句</em>从语法上说完全没问题,但是就是没法插入数据库。 Class.forName(&quot;sun.jdbc.odbc.JdbcOdbcDriver&quot;); Connection conn = DriverManager.getConnection(&quot;jdbc:odbc:jdbc_odbc&quot;); Statement st...
asp.net总是报“INSERT INTO 语句语法错误。”
今天在开发网站的时候,网页总是报“ INSERT INTO <em>语句</em>的<em>语法错误</em>。 ” 检查<em>insert</em><em>语句</em>,打印出来是“ INSERT INTO admin ( adminName,password) values ('dd','1aabac6d068eef6a7bad3fdf50a05cc8')”,放到数据库中执行这条<em>语句</em>是通过的。 想了很久,也没想明白这条<em>语句</em>是哪里错了
这个asp中 insert into 语句那里错误了
用下面这个<em>语句</em>一直不能把数据写到数据库当中  Dim MM_editCmd     Set MM_editCmd = Server.CreateObject ("ADODB.Command")     MM_editCmd.ActiveConnection = MM_zpkd_conn_STRING     MM_editCmd.CommandText = "INSERT INTO ZhaoPi
mybatis批量插入报错:','附近有错误
mybatis批量插入的时候报错,报错信息‘,’附近有错误 mapper.xml的写法为 INSERT INTO USER_LOG (USER_ID, OP_TYPE, CONTENT, IP, OP_ID, OP_TIME) VALUES ite
Access提示Insert Into 语法错误
最近在做Access的一个项目,总是莫名其妙的提示:“Insert Into <em>语法错误</em>”,这样的信息总给人带来很多麻烦,有时候为了这样一个错误要找好久才能解决问题,"Insert Into <em>语法错误</em>"这个提示本身包含的信息量很少,在跟踪堆栈中有找不到更详细的信息,为了避免大家在开发的过程中遇到同样的错误和困扰。通过查找和摸索把有可能出现这种错误的可能总结一下和大家一起分享。1.关键字:如果你的数据
ado.net 中 “ INSERT INTO 语句语法错误。”的解决办法
网上看了很多贴,造成此错误的元婴
关于操作Access数据报System.Data.OleDb.OleDbException: INSERT INTO 语句语法错误异常问题
关于操作Access数据报System.Data.OleDb.OleDbException: INSERT INTO <em>语句</em>的<em>语法错误</em>异常问题         这两天答应朋友给他做个单机版的管理系统,所以数据库选用Access,以往的开发都是选用的SQL-Server,不过他们都是微软的,使用应该没什么问题。可是在我进行数据插入时,系统报System.Data.OleDb.OleDbExceptio
mysql5.7常用语句及常见错误
Mysql版本:5.7.21 64bit 操作系统:windows 10专业版 64bit1、 服务停止:PS,net stop mysql服务启动:PS,net start mysql mysql 是当前安装后的服务名,可以到 系统中的服务查看具体名称2、 Cmd登陆,先配置环境变量,在path中添加mysql中bin的安装路径Cmd,mysql -uroot -p,会要求输入密码,如果想...
SQL Server2005 不支持一条insert语句插入多条记录
原文地址:http://woniu1983.iteye.com/blog/691862  之前在测试一个简单的桌面应用程序时,因为涉及数据库插入操作,所以安装了SQL Server2008 Enterprise 试用版。   是涉一条插入<em>语句</em>:向数据库的一个表中一次性插入200多条数据,如下(数字是随便造的,请忽略):  ... INSERT INTO table
mybatis 执行insert语句总是报错,ORA-00911 无效字符错误解决方法
这个错误是由于sql<em>语句</em>有问题,检查sql的时候没有看出什么问题,结果拿到pl/sql中执行没发现问题。查找资料后发现在库里查询时,查询<em>语句</em>结尾带了一个分号,库里面是支持这个分号的,但到mybatis 里面是不支持这个分号的,所以这点大家以后也应该注意下。       解决方法就是吧分号去掉就好了。
OleDbHelper 中发生的 INSERT INTO 语句语法错误
最近在写一个网站时,发生一个比较郁闷的错误 异常详细信息: System.Data.OleDb.OleDbException: INSERT INTO <em>语句</em>的<em>语法错误</em>。可是我把插入<em>语句</em>改成这们后 OleDbHelper.ExecuteNonQuery(OleDbHelper.ConnectionStringLocalTransaction, CommandType.Text, &quot;<em>insert</em> ...
update语句语法错误/insert into语句语法错误 怎么搞??
adoquery1.SQL.Clear;rnadoquery1.sql.add('update admin set pwd=password,department=un,purview=:pur,operater=:op,date=:lastdate where name=:username');rnadoquery1.Parameters.Clear;rnadoquery1.Parameters.AddParameter;rnadoquery1.Parameters[0].Name:='password';rnadoquery1.Parameters[0].DataType:=ftstring;rnadoquery1.Parameters[0].Direction:=pdinput;rnadoquery1.Parameters[0].Value:=edit2.Text;rnadoquery1.Parameters.AddParameter;rnadoquery1.Parameters[1].Name:='un';rnadoquery1.Parameters[1].DataType:=ftstring;rnadoquery1.Parameters[1].Direction:=pdinput;rnadoquery1.Parameters[1].Value:=edit3.Text;rnadoquery1.Parameters.AddParameter;rnadoquery1.Parameters[2].Name:='pur';rnadoquery1.Parameters[2].DataType:=ftstring;rnadoquery1.Parameters[2].Direction:=pdinput;rnadoquery1.Parameters[2].Value:=edit5.Text;rnadoquery1.Parameters.AddParameter;rnadoquery1.Parameters[3].Name:='op';rnadoquery1.Parameters[3].DataType:=ftstring;rnadoquery1.Parameters[3].Direction:=pdinput;rnadoquery1.Parameters[3].Value:=edit4.Text;rnadoquery1.Parameters.AddParameter;rnadoquery1.Parameters[4].Name:='lastdate';rnadoquery1.Parameters[4].DataType:=ftdatetime;rnadoquery1.Parameters[4].Direction:=pdinput;rnadoquery1.Parameters[4].Value:=strtodate(maskedit1.Text);rnadoquery1.Parameters.AddParameter;rnadoquery1.Parameters[5].Name:='username';rnadoquery1.Parameters[5].DataType:=ftstring;rnadoquery1.Parameters[5].Direction:=pdinput;rnadoquery1.Parameters[5].Value:=edit1.Text;rnadoquery1.ExecSQL;rnrnadoquery1.SQL.Clear;rnadoquery1.SQL.Add('<em>insert</em> into admin(name,pwd,purview,department,operater,date)values(:username,:password,:pur,:op,:lastdate)');rnadoquery1.Parameters.Clear;rn adoquery1.Parameters.AddParameter;rn adoquery1.Parameters[0].name:='username';rn adoquery1.Parameters[0].DataType:=ftstring;rn adoquery1.Parameters[0].Direction:=pdinput;rn adoquery1.Parameters[0].Value:=edit1.text;rn adoquery1.Parameters.AddParameter;rn adoquery1.Parameters[1].name:='password';rn adoquery1.Parameters[1].DataType:=ftstring;rn adoquery1.Parameters[1].Direction:=pdinput;rn adoquery1.Parameters[1].Value:=edit2.text;rn adoquery1.Parameters.AddParameter;rn adoquery1.Parameters[2].name:='pur';rn adoquery1.Parameters[2].DataType:=ftstring;rn adoquery1.Parameters[2].Direction:=pdinput;rn adoquery1.Parameters[2].Value:=edit5.text;rn adoquery1.Parameters.AddParameter;rn adoquery1.Parameters[3].name:='un';rn adoquery1.Parameters[3].DataType:=ftstring;rn adoquery1.Parameters[3].Direction:=pdinput;rn adoquery1.Parameters[3].Value:=edit3.Text;rn adoquery1.Parameters.AddParameter;rn adoquery1.Parameters[4].name:='operator';rn adoquery1.Parameters[4].DataType:=ftstring;rn adoquery1.Parameters[4].Direction:=pdinput;rn adoquery1.Parameters[4].Value:=edit4.text;rn adoquery1.Parameters.AddParameter;rn adoquery1.Parameters[5].name:='lastdate';rn adoquery1.Parameters[5].DataType:=ftdatetime;rn adoquery1.Parameters[5].Direction:=pdinput;rn adoquery1.Parameters[5].Value:=StrToDate(maskedit1.text);rn adoquery1.ExecSQL;
insert into 语句语法错误
注册资料填完,左上方会出现 <em>insert</em> into <em>语句</em>的<em>语法错误</em>rn帮我看一下,这些代码哪里有问题rnrnIf Page.IsValid Thenrn Tryrn Dim con As New OleDbConnectionrn con.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & Server.MapPath("../fdkasasdka/db/yonghuzhuce.mdb")rn Dim cmd As New OleDbCommandrn cmd.CommandText = "<em>insert</em> into person(id,password,name,sex,birthdate,address) values (@id,@password,@name,@sex,@birthdate,@address)"rn cmd.Parameters.Add(New OleDbParameter("@id", OleDbType.VarChar))rn cmd.Parameters("@id").Value = TextBox1.Textrn cmd.Parameters.Add(New OleDbParameter("@password", OleDbType.VarChar))rn cmd.Parameters("@password").Value = TextBox2.Textrn cmd.Parameters.Add(New OleDbParameter("@name", OleDbType.VarChar))rn cmd.Parameters("@name").Value = TextBox4.Textrn cmd.Parameters.Add(New OleDbParameter("@sex", OleDbType.VarChar))rn cmd.Parameters("@sex").Value = RadioButton1.Textrn cmd.Parameters("@sex").Value = RadioButton2.Textrn cmd.Parameters.Add(New OleDbParameter("@birthday", OleDbType.Date))rn cmd.Parameters("@birthday").Value = TextBox5.Textrn cmd.Parameters.Add(New OleDbParameter("@address", OleDbType.VarChar))rn cmd.Parameters("@address").Value = TextBox8.Textrn cmd.Connection = conrn con.Open()rn cmd.ExecuteNonQuery()rn con.Close()rn Catch ex As Exceptionrn Response.Write(ex.Message)rn End Tryrn End If
insert into 语句语法错误
if adoquery1.active then adoquery1.close;rn adoquery1.sql.clear;rn adoquery1.SQL.Add('select * from imageunit where btnname='+#39+fc.Objects[i].Text+#39);rn adoquery1.Open;rn adoquery1.RecNo:=1;rn showmessage(adoquery1.Fields[1].AsString);//能执行并显示出字符串rn showmessage(adoquery1.Fields[2].AsString);//能执行并显示出字符串rnif trim(adoquery1.fields[1].asstring)<>'' thenrn beginrn if adoquery2.active then adoquery2.close;rn adoquery2.sql.clear;rn adoquery2.SQL.Add('<em>insert</em> into object([objectcode],[objectname]) Values('+'"'+adoquery1.Fields[1].AsString+'"'+','+'"'+adoquery1.Fields[2].AsString+'"'+')');rn adoquery2.ExecSQL;//执行到改句显示<em>insert</em> into <em>语句</em>的<em>语法错误</em>rn end;rnadoquery2.SQL.Add('<em>insert</em> into object([objectcode],[objectname]) Values('+'"'+adoquery1.Fields[1].AsString+'"'+','+'"'+adoquery1.Fields[2].AsString+'"'+')')rn改为rnadoquery2.SQL.Add('<em>insert</em> into object(objectcode,objectname) Values('+'"'+adoquery1.Fields[1].AsString+'"'+','+'"'+adoquery1.Fields[2].AsString+'"'+')')rn还是显示同样的错误提示!rn小弟不知道错在哪儿?怎样改,请大家帮帮忙!
access,INSERT INTO 语句语法错误
Exception Details: System.Data.OleDb.OleDbException: INSERT INTO <em>语句</em>的<em>语法错误</em>。rn[code=C#]rnprotected void Button1_Click(object sender, EventArgs e)rn rn hostname = Request.QueryString["id"].ToString();//全局变量,此处无错。rn string str = System.Web.HttpContext.Current.Server.MapPath(System.Configuration.ConfigurationSettings.AppSettings["dbPath"]);rn OleDbConnection myConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + str);rn String strSQL = "SELECT * FROM [reviews] WHERE Host='"+hostname+"'";rn OleDbDataAdapter objCmd = new OleDbDataAdapter(strSQL, myConn);rn DataSet ds = new DataSet();rn objCmd.Fill(ds, "reviews");rn if (ds.Tables["reviews"].Rows.Count == 0)rn rn string myInsertQuery = "<em>insert</em> into reviews (t-link,t-content) values ('" + TextBox2.Text + "','" + TextBox3.Text + "')"; rn OleDbCommand myOleDbCommand = new OleDbCommand(myInsertQuery);rn myOleDbCommand.Connection = myConn;rn myConn.Open();rn myOleDbCommand.ExecuteNonQuery();//显示此行出错。rn myConn.Close();rn rn elsern rn ....rn rn rn[/code]
insert into语句语法错误
用VB开发的一个小系统,调用的ACCESS数据库,里面做保存功能的时候提示<em>语法错误</em>,然后做了下跟踪,得到的sql<em>语句</em>为rn<em>insert</em> into Archives (ProjectID,ArchivesSeqNo,ArchivesNo,ArchivesName,Picture,FileCnt,PageCnt,StorageDate,Note) values (1,2,'2','2',2,2,4,'2010-6-24','2')rn检查了一遍,字段名和字段数都没错,请各位大大帮忙看下到底哪里有问题
为什么INSERT INTO 语句语法错误?
ACCESS2000库test.mdb的student表(name,number),C#往库中插入一条记录,为什么INSERT INTO <em>语句</em>的<em>语法错误</em>?rnrnrn rnrnrn rn姓名:rn rn学号:rnrn rnrnrnrnrn添加失败!错误信息:System.Data.OleDb.OleDbException: INSERT INTO <em>语句</em>的<em>语法错误</em>。 at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OleDb.OleDbCommand.ExecuteReader() at ASP.<em>insert</em>2_ASPX.btnOK_Click(Object sender, EventArgs e) rn
为什么“Insert语句语法错误”?
rnInsert into table1 (f1,f2,f3,f4,f5,f6,f7,f8) values (1,1,'111','111','111','1',0,'')rnrn访问技术:VB6.0 + access2000 + adorn字段说明:f1,f2,f7是数值型,其他是字符型。rn
INSERT INTO 语句语法错误
Db AddDb=new Db();rnStrSql="<em>insert</em> into Guest(Guest,Pwd,Mobile,Email,Area)values('"+StrName+"','"+StrPwd+"','"+StrMobile+"','"+StrEmail+"','"+StrArea+"')";rnstring StrChatSql="<em>insert</em> into userinfo(Username,Password,d_email)values('"+StrName+"','"+StrPwd+"','"+StrEmail+"')";rn//插入聊天用户表rnrnstring connString="Provider=Microsoft.jet.OLEDB.4.0;data Source="+Server.MapPath("chat/3a4b5c.mdb")+";";rnOleDbConnection conn=new OleDbConnection(connString);rnOleDbCommand cmd=new OleDbCommand(StrChatSql,conn);rnconn.Open();rncmd.ExecuteNonQuery();rnResponse.Write(StrChatSql);rnrn怪了,这样的sql句子在mssql里可以执行的啊
重大问题:INSERT INTO 语句语法错误
之所以说问题重大,是因为我将sql<em>语句</em>直接在access中执行,执行成功!rn但是asp页面就是不行,错误信息“INSERT INTO <em>语句</em>的<em>语法错误</em>”。rn部分代码:rnrnsql = "<em>insert</em> into employee(account,password,name,department,forbidden,class) values('" & trim(request("account")) & "','" & request("password") & "','" & trim(request("name")) & "','" & trim(request("department")) & "',false," & request("class") & ")"rnrnerr.clearrnrnconn.execute sqlrnrnif err.number = 0 thenrn response.redirect "admin.asp"rn response.endrnelsern response.write sql & " " & err.descriptionrn response.endrnend if
access数据库,INSERT INTO 语句语法错误
Microsoft JET Database Engine 错误 '80040e14' rnrnINSERT INTO <em>语句</em>的<em>语法错误</em>。 rnrnrn但是输出的sql<em>语句</em>在access中能够执行,就是放到程序里面的时候,提示这个错误
ASP INSERT INTO语句语法错误
rnrnrn<>"" thenrn imagepath="images/"+imagepathrn end ifrn ptype=request.Form("ptype")rn describe=request.Form("describe")rn particularInfo=request.Form("particularInfo") rn rn particularInfoUrl="txt/"+cid+ptype+".txt"rn rn 'set fso=Server.CreateObject("Scripting.FileSystemObject")rn rn 'set txtFile=fso.CreateTextFile(Server.MapPath("../../product/txt/"+cid+ptype+".txt"),true)rn rn 'txtFile.Write(particularInfo)rn rn 'txtFile.closern rn sql="<em>insert</em> into productinfo(cid,ptype,pname,imagepath,describe,particularInfo) values("&cid&",'"&ptype&"','"&pname&"','"&imagepath&"','"&describe&"','"&particularInfoUrl&"')"rn rn 'Response.Write(sql)rn conn.execute(sql)rn rn Response.Write("添加商品信息成功!")rn Response.Write("继续添加")rn Response.Write("返回商品信息首页")rn rn%>rnrnrn各位大侠帮忙看看,看了网上的很多解决方法,但一直都还没有解决,很急啊。。。。。
语句的语法错误。"">Message="INSERT INTO 语句语法错误。"
rn用户代码未处理 System.Data.OleDb.OleDbExceptionrn Message="INSERT INTO <em>语句</em>的<em>语法错误</em>。"rn Source="Microsoft JET Database Engine"rn ErrorCode=-2147217900rn StackTrace:rn 在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)rn 在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)rn 在 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)rn 在 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)rn 在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)rn 在 System.Data.OleDb.OleDbCommand.ExecuteNonQuery()rn 在 DBHelp.ExecuteNonQuery(String connectionString, String cmdText, OleDbParameter[] commandParameters) 位置 d:\leech\shipping\App_Code\DBHelp.cs:行号 38rn 在 admin_Icitem.btnSave_Click(Object sender, EventArgs e) 位置 d:\leech\shipping\admin\Icitem.aspx.cs:行号 42rn 在 System.Web.UI.WebControls.Button.OnClick(EventArgs e)rn 在 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)rn 在 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)rn 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)rn 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)rn 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
sql insert 语句语法错误
<em>insert</em> into qiandao(sno,sname,cno,state,date,term)values('01','fen','c1','2','2015/6/7 14:56:52','2014~2015第二学期')rnrnINSERT INTO <em>语句</em>的<em>语法错误</em>。
insert into 语句语法错误???
部分代码如下rn string ModName = ((TextBox)e.Item.Cells[2].Controls[0]).Text;rn string Price = ((TextBox)e.Item.Cells[3].Controls[0]).Text;rnrn UpdateCommand.CommandText = "INSERT INTO price_list(module, price) VALUES(@module, @price)";rn UpdateCommand.Parameters.Add("@module", OleDbType.VarChar).Value = ModName;rn UpdateCommand.Parameters.Add("@price", OleDbType.Single).Value = Price;rn myConnection.Open();rn UpdateCommand.ExecuteNonQuery();rn意图是从网页表单里填的东西添加到数据库记录。我用Access数据库,表格只有两个字段(字符型module,小数型price)。结果一运行就说inser into <em>语句</em><em>语法错误</em>。rn我是上个星期开始接触ASP.NET的,如果还需要提供什么信息,请告知。
INSERT INTO 语句语法错误,请教
运行一个aspx文件后出现以下错误提示:rnrnINSERT INTO <em>语句</em>的<em>语法错误</em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Data.OleDb.OleDbException: INSERT INTO <em>语句</em>的<em>语法错误</em>。rn源错误: rn行 29: objCmd = new OleDbCommand(strSQL,objConn);rn行 30: objCmd.Connection.Open();rn行 31: objCmd.ExecuteNonQuery(); rnrnrn我的<em>insert</em><em>语句</em>是:strSQL = "Insert into test(userid,password) Values (1,2)";rn rn
INSERT INTO 语句语法错误的问题.
String pagelabel,Author,sql,ddd;rnDate dd=new Date();rnddd=dd.toLocaleString();rnrnpagelabel=request.getParameter("lanp_title");rnpage=request.getParameter("lanp_contain");rnrnif (pagelabel.equals("")||page.equals("")) rnresponse.sendRedirect("editpage.jsp");rnelsernrnsql="<em>insert</em> into tiezi1 (pagelabel,time,page) Values ('"+pagelabel+"','"+ddd+"','"+page+"')";rnrnsqlbean.executeInsert(sql);rnresponse.sendRedirect("luntan.jsp");rnrn
insert into语句语法错误
大家帮个忙,看下下面的数据库操作哪里有问题?当程序执行到ExecSQL时,报错说:<em>insert</em> into<em>语句</em>的<em>语法错误</em>。请大家帮看下,谢谢!rnwith DM.ADOQ2 dorn beginrn Close;rn SQL.Clear;rn SQL.Add('<em>insert</em> into BOOK(BOOKNUM, BOOKNAME, BOOKWRITER, TIME, PLACE) Values(:a, :b, :c, :d, :e)');rn Parameters.ParamByName('a').Value := num + 1;rn Parameters.ParamByName('b').Value := Trim(Edit1.Text);rn Parameters.ParamByName('c').Value := Trim(Edit2.Text);rn Parameters.ParamByName('d').Value := DateTimePicker1.DateTime;rn Parameters.ParamByName('e').Value := Trim(Edit4.Text);rn ExecSQL;rn end;rnrn其中num := DM.ADOQ2.FieldByName('BOOKNUM').AsInteger;
INSERT INTO 语句语法错误。不会吧!!!!!!!!!!!!!!!!
public void InsertIntoData()rnrnconnectionstr();rnshbConn.Open();rnshbInsertData="INSERT INTO PageA(" + " NumberPlate " + " ," + " ConsignCorporation "rn+ " ," + " VehicleModel " + " ," + " Milemeter " + " ," + " ClientPhone " + " ,"rn+ " Linkman " + " ," + " Title " + " , " + " Unit " + " ,"rn+ " Amount " + " ," + " Sum "+ " ," + " UnitPrice "+ ") Values" rn+ "('" + txtNumberPlate.Value + "','" + txtConsignCorporation.Value + "','"rn+ txtVehicleModel.Value + "','" + txtMilemeter.Value + "','"rn+ txtClientPhone.Value + "','" + txtLinkman.Value + "','"rn+ txtTitle.Value + "','" + txtUnit.Value + "','"rn+ txtAmount.Value + "','" + txtSum.Value + "','" + txtUnitPrice.Value + "')";rnshbComm=new OleDbCommand(shbInsertData,shbConn);rnshbComm.ExecuteNonQuery();rnshbConn.Close();rnconnection1();rnrnrn=======================================rn不用 Sum (," + " Sum "+ ")rn 和 rntxtSum.Value (,'" + txtSum.Value + "')rn就没问题rnrnrnrn
insert into 语句语法错误
小弟做了一个WinForm要连接Access数据库rn在插入数据的时候提示 <em>insert</em> into <em>语句</em><em>语法错误</em>rn可是我实在试看不出来那里有<em>语法错误</em>:rn<em>insert</em> into ryxx (personname,oldname,sex,ethnicgroup,birthday,whcd,hyzk,work,hklb,fromplace,zjxy,idcard,idcardday,byzk,sg,xx,lxfs,rklb,photo) values ('李声涛','李升升','男','汉','1988.1.30','大学','未婚','程序员','城镇人口','河南信阳市光山县','无','3435367575868','1988.1.30','未服兵役','171CM','AB型','13509730674','常住人口','photos\3435367575868.jpg')rnrn大家帮忙看看 谢谢了!
VB INSERT INTO 语句语法错误
conn.Execute("<em>insert</em> into [paike](grade,class,day,jieci,lession_name,teacher_id) values(" & cii_grade.ToString & "," & cii_class.ToString & "," & P_TIMES.ToString & "," & P_WEEKS.ToString & ",'" & rpaike.Fields(1).Value & "'," & rpaike.Fields(1).Value & ")")rnrn总是这句话报错,为什么呢?
求助:INSERT INTO 语句语法错误
strsql="<em>insert</em> into xt_t_account (account,password,user_no,nickname,explain,regist_date,e_mail,sex) "rnstrsql =strsql + " values ('"+LoginName+"','"+LoginPass1+"','"+userno+"'"rnstrsql =strsql +",'"+NickName+"','"+Explain+"',Date()"rnstrsql =strsql +",'"+E_Mail+"','"+Sex+"'"rncon.Execute strsqlrnrn通过ODBC连接Access数据库,提示错误:“INSERT INTO <em>语句</em>的<em>语法错误</em>”rn
INSERT INTO 语句语法错误.
Tryrn conn.Open()rn Dim strUpsql As String = "<em>insert</em> into [user](username,password,realname,sex,personID,ask,answer,email"rn strUpsql += ",userclass,age,classid,adddate,logintimes,lastlogin,score,addIP) "rn '在这里添加要插入的值rn strUpsql += "values('" & username.Text & "','" & md5password & "','" & realname.Text & "','" & sex.Text & "',"rn strUpsql += "'" & personID.Text & "','" & ask.Text & "','" & answer.Text & "','" & email.Text & "',"rn strUpsql += "'" & userclass.Text & "'," & age & "," & "NULL,'" & adddate & "',0,NULL,0,'" & userIP & "')"rn Response.Write(strUpsql)rn Dim cmd As New OleDbCommand(strUpsql, conn)rn cmd.ExecuteNonQuery()rn conn.Close()rn conn = Nothingrn Catch ex As Exceptionrn Response.Write(ex.Message)rn End Tryrnrn我有如上原代码,运行的时候提示说:INSERT INTO <em>语句</em>的<em>语法错误</em>.rnsql<em>语句</em>输出如下:<em>insert</em> into [user](username,password,realname,sex,personID,ask,answer,email,userclass,age,classid,adddate,logintimes,lastlogin,score,addIP) values('test','098F6BCD4621D373CADE4E832627B4F6','test','男','510891196902276752','test','test','test','common',20,NULL,'2009-4-20',0,NULL,0,'127.0.0.1')rnrnrn请高手指点啊!!谢谢!!!rn
insert语句语法错误
我在delphi中编译了很久老提示:[Microsoft][odbc sql server driver][sql server]在此上下文中不允许使用‘期初‘此处只允许使用常量,表达式或变量。不允许使用列名。rnsql.Text :='<em>insert</em> into temp (depotid,mydate,jxc,goodsid,number,price,PEOPLEID,memo)'+rn ' values ('+''''+query_temp.fieldbyname('depotid').AsString+'''' +',' +''''+query_temp.fieldbyname('mydate').AsString+''''rn+','+'期初'+','+''''+query_temp.fieldbyname('goodsid').AsString+''''rn+','+''''+query_temp.fieldbyname('number').AsString+''''+','+''''+query_temp.fieldbyname('price').AsString+'''' +','+''''+query_temp.fieldbyname('memo').AsString+''''+')';
insert into语句语法错误
晕死,搞了一天也没明白是什么问题。rnrndtMain.Rows.Add(drMain);rnOleDbCommandBuilder cbMain;rncbMain = new OleDbCommandBuilder(daMain);rndaMain.UpdateCommand = cbMain.GetInsertCommand();rndaMain.Update(dsMain, "outgo");rndsMain.AcceptChanges();rnrn在C#中使用ado.net,表格outgo中有一个自动编号的列为主键,rn修改和删除都没有问题,可是在添加新记录的时候总是提示rn“<em>insert</em> into<em>语句</em>的<em>语法错误</em>”,在操作别的表格有文本列rn为主键时用相同的这一系列操作却没问题,到底是怎么搞的?rn把这个表中的主键改为文本以后还是出同样的问题,但是这些rn<em>语句</em>在别的窗体中却可以正常运行。rnrn我看了生成的<em>语句</em>是 <em>insert</em> into outgo (x,x,x,x...) values (?,?,?,?...)rn这里边没有自动编号那一项,查MSDN,查了半天给那个例子试了一下好象也没什么用rn这个东西我感觉还不如vb6的时候那个ado控件好用
INSERT INTO 语句语法错误?
ACCESS2000库test.mdb的student表(name,number),C#往库中插入一条记录string strSQL="<em>insert</em> into student(name,number) valuesrn('"+TextBox1.Text+"','"+TextBox2.Text+"')";rnINSERT INTO <em>语句</em>的<em>语法错误</em>?rn改为rnstring strSQL="<em>insert</em> into student(name,[number]) valuesrn('"+TextBox1.Text+"','"+TextBox2.Text+"')";rn就对了,原因呢?rnnumber是关键字,字段名加[]rn我试过number不是关键字,也必须加[]才能通过,为什么?
insert inot 语句语法错误
Dim dbconn As OleDbConnectionrn dbconn = New OleDbConnection(ConfigurationSettings.AppSettings"connectionstring"))rn dbconn.Open()rn Dim dbcommand As OleDbCommandrnrn Dim rolename, description, oskey, sqlstring As Stringrn rolename = "tobyhh"rn description = "123456"rn oskey = "system"rnrn sqlstring = "<em>insert</em> into test(name,password,oskey) " _rn & "values('" + rolename + "','" + description + "','" + oskey + "')"rn dbcommand = New OleDbCommand(sqlstring, dbconn)rn dbcommand.ExecuteNonQuery()rn注:使用access数据库中的表.字段全为文本字段,老是提示<em>insert</em> inot <em>语句</em><em>语法错误</em>
System.Data.OleDb.OleDbException: INSERT INTO 语句语法错误
Conn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("test.mdb");rnstring myConn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+Server.MapPath(".")+"./db/ask.mdb;";rnOleDbConnection conn=new OleDbConnection(myConn);rnOleDbCommand cmd=new OleDbCommand ("<em>insert</em> into login(username,password)values('test','test')",conn);rncmd.open();rncmd.ExecuteNonQuery(); rnconn.Close();rnrnrnSystem.Data.OleDb.OleDbException: INSERT INTO <em>语句</em>的<em>语法错误</em>rnrnupdate<em>语句</em>也会出错,SQL和MYSQL中同样<em>语句</em>就没问题哦. rn好像是ACCESS自身的问题,怎么解决啊,谢谢rn
INSERT INTO 语句语法错误???
异常详细信息: System.Data.OleDb.OleDbException: INSERT INTO <em>语句</em>的<em>语法错误</em>。rnrnrn行 39: ConnStr="Insert Into news(biaoti,zhaizi,neirong,shijian,img,counter) VALUES('"+biaoti.Text+"', '"+zhaizi.Text+"', '"+neirong2+"', '"+now.ToString()+"', '"+img.Text+"',0)";rn rn
求助:INSERT INTO 语句语法错误
SQL<em>语句</em>:strSql="Insert Into [uploadpic](filename,ext,contentType,size,intro,submit_date) Values('" & objUpload.GetFiles("upfile").FileName & "','" & objUpload.GetFiles("upfile").Ext & "','" & objUpload.GetFiles("upfile").MIME & "'," & objUpload.GetFiles("upfile").Size & ",'" & objUpload.GetForms("intro").Value &"','" & Now() & "')" rn conn.Execute(strSql)rnrn这条<em>语句</em>里哪里有问题啊,总是提示rnMicrosoft JET Database Engine 错误 '80040e14' rnrnINSERT INTO <em>语句</em>的<em>语法错误</em>。 rnrn求解,谢谢各位了!
INSERT INTO 语句语法错误asp.net
cmd.CommandText="<em>insert</em> into vip(vipname,password,email,loginip,logintime,loginhost) rnrnvalues"+"('"+Username+"','"+password+"','"+email+"','"+loginip+"','"+logintime+"','"+loginhost+"')";
语句的语法错误" 急呀!!">"INSERT INTO 语句语法错误" 急呀!!
本人在做一个小型的企业网,用的是access的数据库.在做添加产品页面时,运行时提示是:rnrn"INSERT INTO <em>语句</em>的<em>语法错误</em>"rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Data.OleDb.OleDbException: INSERT INTO <em>语句</em>的<em>语法错误</em>。rnrn源错误:rn行 141: cmd2.ExecuteNonQuery();rnrnrn本人向来比较粗心,因此查了一天也没查出个所以然.希望各位不吝赐教!rnrn以下为粘贴源代码:rnrnrnusing System;rnusing System.Data;rnusing System.Configuration;rnusing System.Collections;rnusing System.Web;rnusing System.Web.Security;rnusing System.Web.UI;rnusing System.Web.UI.WebControls;rnusing System.Web.UI.WebControls.WebParts;rnusing System.Web.UI.HtmlControls;rnusing System.Data.OleDb;rnusing System.IO;rnrnpublic partial class Admin_Product_Add : System.Web.UI.Pagernrn protected void Page_Load(object sender, EventArgs e)rn rn if (Session["Manager"] == null)rn rn Response.Write(" ");rnrn rn rn rnrn protected void Btn_Submit_Click(object sender, EventArgs e)rn rn if ((tb_ProductName.Text == "") || (dr_ProductType.Text == "==请选择==") || (tb_kuanshi.Text == "") || (tb_xiulong.Text == "") || (tb_photo.Text == "") || (tb_mianliao.Text == "") || (tb_ling.Text == ""))rn rn Response.Write(" ");rn rnrn elsern rn rn string strName = this.tb_ProductName.Text;rn string strType = this.dr_ProductType.Text;rn string strPingPai = this.tb_PingPai.Text;rn string strKuanshi = this.tb_kuanshi.Text;rn string strXiuLong = this.tb_xiulong.Text;rn string strPhoto = this.tb_photo.Text;rn string strMianliao = this.tb_mianliao.Text;rn string strStyle = this.tb_style.Text;rn string strSeason = this.tb_season.Text;rn string strLing = this.tb_ling.Text;rnrn if (this.smallPhoto.HasFile)rn rn //设置小图上传rn HttpPostedFile postFile = this.smallPhoto.PostedFile;rn string smallname = smallPhoto.FileName.ToString();rn string type1 = smallPhoto.PostedFile.ContentType.ToString();rn string type2 = smallname.Substring(smallname.LastIndexOf(".") + 1);rn string strFileName = smallname;rn string size = smallPhoto.PostedFile.ContentLength.ToString();rn string timefile = DateTime.Now.ToString("yyMMddHHmmss");rn string smallSavePath = Server.MapPath("~\\Products\\" + timefile + "small" + smallname);rn if (type2 == "gif" || type2 == "jpg" || type2 == "bmp" || type2 == "png")rn rn rn postFile.SaveAs(smallSavePath);rnrn rn elsern rn Response.Write(" ");rn rn rnrn //设置大图上传格式rn HttpPostedFile postFile2 = this.bigPhoto.PostedFile;rn string bigname = bigPhoto.FileName.ToString();rn string type3 = bigname.Substring(bigname.LastIndexOf(".") + 1);rn string strFileName2 = bigname;rn string size2 = bigPhoto.PostedFile.ContentLength.ToString();rn string timefile2 = DateTime.Now.ToString("yyMMddHHmmss");rn string bigSavePath = Server.MapPath("~\\Products\\" + timefile + "big" + bigname);rn if (type3 == "gif" || type3 == "jpg" || type3 == "bmp" || type3 == "png")rn rn postFile.SaveAs(bigSavePath);rn rn elsern rn Response.Write(" ");rn rnrn string strLoad = Server.MapPath("~//data//clothes.mdb"); //获取指定数据库文件的相对路径rn OleDbConnection conn = new OleDbConnection("provider=Microsoft.Jet.OleDb.4.0;Data Source=" + strLoad + ";");rn rn conn.Open();rn rn string str = " Select count(*) from Product where product_name='" + tb_ProductName.Text.ToString() + "'";rn OleDbCommand cmd = new OleDbCommand(str, conn);rn cmd.Connection = conn;rn int intcont = Convert.ToInt32(cmd.ExecuteScalar());rn if (intcont > 0)rn rn Response.Write(" ");rn rn elsern rn tryrn rn string InsertSql = "Insert into Product(Product_Name,Class_Name,PingPai,Kuanshi,XiuLong,photo,mianliao,style,season,ling,size,smallImg,price,bigImg,Product_time)Values(@Product_Name,@Class_Name,@PingPai,@Kuanshi,@XiuLong,@photo,@mianliao,@style,@season,@ling,@size,@smallImg,@price,@bigImg,@Product_time)";rn OleDbCommand cmd2 = new OleDbCommand(InsertSql, conn);rnrn OleDbParameter[] oledbParams = new OleDbParameter[15];rnrn OleDbParameter paramName=(new OleDbParameter("@Product_Name", OleDbType.VarChar, 20));rn OleDbParameter paramClass = (new OleDbParameter("@Class_Name", OleDbType.VarChar, 50));rn OleDbParameter paramPingPai=(new OleDbParameter("@PingPai", OleDbType.VarChar, 20));rn OleDbParameter paramKuanshi=(new OleDbParameter("@Kuanshi", OleDbType.VarChar, 20));rn OleDbParameter paramXiuLong=(new OleDbParameter("@XiuLong", OleDbType.VarChar, 20));rn OleDbParameter paramPhoto=(new OleDbParameter("@photo", OleDbType.VarChar, 20));rn OleDbParameter paramMianliao=(new OleDbParameter("@mianliao", OleDbType.VarChar, 20));rn OleDbParameter paramStyle=(new OleDbParameter("@style", OleDbType.VarChar, 20));rn OleDbParameter paramSeason = (new OleDbParameter("@season", OleDbType.VarChar, 20));rn OleDbParameter paramLing = (new OleDbParameter("@ling", OleDbType.VarChar, 20));rn OleDbParameter paramSize=(new OleDbParameter("@size", OleDbType.VarChar, 20));rn OleDbParameter paramSmallImg=(new OleDbParameter("smallImg", OleDbType.VarChar, 50));rn OleDbParameter paramPrice=(new OleDbParameter("price", OleDbType.Currency,10));rn OleDbParameter paramBigimg=(new OleDbParameter("bigImg", OleDbType.VarChar, 50));rn OleDbParameter paramProduct_time=(new OleDbParameter("Product_time", OleDbType.DBDate));rnrn paramName.Value=tb_ProductName.Text;rn paramClass.Value = dr_ProductType.SelectedItem.Text;rn paramPingPai.Value =tb_PingPai.Text;rn paramKuanshi.Value =tb_kuanshi.Text;rn paramXiuLong.Value = tb_xiulong.Text;rn paramPhoto.Value = tb_photo.Text;rn paramMianliao.Value = tb_mianliao.Text;rn paramStyle.Value = tb_style.Text;rn paramSeason.Value= tb_season.Text;rn paramLing.Value = tb_size.Text;rn paramSize.Value = tb_size.Text;rn paramSmallImg.Value = smallSavePath;rn paramPrice.Value = Convert.ToDecimal(Product_price.Text);rn paramBigimg.Value = bigSavePath;rn paramProduct_time.Value = Convert.ToDateTime(Convert.ToDecimal((sale_time.Text).ToString()));rn 141行位置: cmd2.ExecuteNonQuery();rn GridView1.DataSourceID = AccessDataSource1.ID;rn conn.Close();rn Response.Write(" ");rn rn catch (Exception ex)rn rn Response.Write(ex.Message.ToString());rn rn rn rn rn elsern rn Response.Write(" ");rn rn rn rnrnrn rn rn
INSERT INTO 语句语法错误。?
DBConn.getDefault().executeUpdate(rn "INSERT INTO [booklist](booktype,bookname,author,pubhouse,pubdate,price,intro) values('"rn +type+"','"rn +name+"','"rn +zuozhe+"','"rn +house+"','"rn +pdate+"',"rn +price+",'"rn +intro+"')"rn );rnrnrntomcat 显示java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] INSERT INTO <em>语句</em>的<em>语法错误</em>。rn可是检查了下,好像没有关键字,这是什么原因?rn数据库:access
Java实用程序设计100例(源码)下载
Java实用程序设计100例(源码) 相关下载链接:[url=//download.csdn.net/download/lizhi761985/199343?utm_source=bbsseo]//download.csdn.net/download/lizhi761985/199343?utm_source=bbsseo[/url]
单片机JY430-A01资料下载
德州仪器单片机系列430的资料,希望对你们有所用 相关下载链接:[url=//download.csdn.net/download/piaolingdefeng/1983564?utm_source=bbsseo]//download.csdn.net/download/piaolingdefeng/1983564?utm_source=bbsseo[/url]
《Android应用开发揭秘》源码2下载
《Android应用开发揭秘》源码 10-16章 相关下载链接:[url=//download.csdn.net/download/liujinrui/2159258?utm_source=bbsseo]//download.csdn.net/download/liujinrui/2159258?utm_source=bbsseo[/url]
文章热词 机器学习教程 Objective-C培训 交互设计视频教程 颜色模型 设计制作学习
相关热词 mysql关联查询两次本表 native底部 react extjs glyph 图标 数据库查询课程语句 数据库查询课程语句
我们是很有底线的