SQL INSERT语法错误,但语句是正确的! [英] SQL INSERT syntax error, but the statement is correct!

查看:85
本文介绍了SQL INSERT语法错误,但语句是正确的!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!我的一个表单与数据库通信,并且

应该使用Insert

语句向表中添加一行...但是,我得到一个'oledb - 语法错误''

异常...我已经双重检查,并且插入工作

罚款(试图从访问中使用它)...即时通讯使用visual C#

快递2k5 ......可能出错?谢谢!

解决方案

kosta,


我猜这个陈述确实有问题,

或你如何执行它。你能否展示你所拥有的代码

试图执行插入?

-

- Nicholas Paldino [.NET / C# MVP]

- mv*@spam.guard.caspershouse.com


" kosta" <一个******* @ discussions.microsoft.com>在消息中写道

news:0b **************************** @ phx.gbl ... < blockquote class =post_quotes>你好!我的一个表单与数据库通信,并且应该使用Insert
语句向表中添加一行...但是,我得到一个''oledb - 语法错误''异常......我已经双重检查了,并且插件工作正常(试图从访问中使用它)...即时通讯使用视觉C#
快递2k5 ......可能出错?谢谢!



您好kosta,


您能否发布sql语句。你正在使用哪个数据库 - 是

它可以访问吗?


问候,

Rakesh Rajan


" kosta"写道:

你好!我的一个表单与数据库通信,并且应该使用Insert
语句向表中添加一行...但是,我得到一个''oledb - 语法错误''异常......我已经双重检查了,并且插件工作正常(试图从访问中使用它)...即时通讯使用视觉C#
快递2k5 ......可能出错?谢谢!






可能你有一个''某处用作参数,进一步帮助

发布代码和异常消息


欢呼,


-

Ignacio Machin,

ignacio.machin at dot.state.fl.us

Florida Department of Transportation


"科斯塔" <一个******* @ discussions.microsoft.com>在消息中写道

news:0b **************************** @ phx.gbl ... < blockquote class =post_quotes>你好!我的一个表单与数据库通信,并且应该使用Insert
语句向表中添加一行...但是,我得到一个''oledb - 语法错误''异常......我已经双重检查了,并且插件工作正常(试图从访问中使用它)...即时通讯使用视觉C#
快递2k5 ......可能出错?谢谢!



hello! one of my forms communicates with a database, and is
supposed to add a row to a table using an Insert
statement... however, I get a ''oledb - syntax error''
exception... I have double checked, and the insert works
fine (tried to use it from access)... im using visual C#
express 2k5... what could be wrong? thanks!

解决方案

kosta,

I would guess that there actually is something wrong with the statement,
or how you are executing it. Can you show the code that you have which is
trying to perform the insert?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"kosta" <an*******@discussions.microsoft.com> wrote in message
news:0b****************************@phx.gbl...

hello! one of my forms communicates with a database, and is
supposed to add a row to a table using an Insert
statement... however, I get a ''oledb - syntax error''
exception... I have double checked, and the insert works
fine (tried to use it from access)... im using visual C#
express 2k5... what could be wrong? thanks!



Hi kosta,

Could you please post the sql statement. Which is the db you are using - is
it access?

Regards,
Rakesh Rajan

"kosta" wrote:

hello! one of my forms communicates with a database, and is
supposed to add a row to a table using an Insert
statement... however, I get a ''oledb - syntax error''
exception... I have double checked, and the insert works
fine (tried to use it from access)... im using visual C#
express 2k5... what could be wrong? thanks!



Hi,

Probably you have a '' somewhere used as a parameter, for any further help
post the code and the exception message

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"kosta" <an*******@discussions.microsoft.com> wrote in message
news:0b****************************@phx.gbl...

hello! one of my forms communicates with a database, and is
supposed to add a row to a table using an Insert
statement... however, I get a ''oledb - syntax error''
exception... I have double checked, and the insert works
fine (tried to use it from access)... im using visual C#
express 2k5... what could be wrong? thanks!



这篇关于SQL INSERT语法错误,但语句是正确的!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆