使用OleDb的C#INSERT语句 [英] C# INSERT statement using OleDb

查看:201
本文介绍了使用OleDb的C#INSERT语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2003,C#.NET


我无法使用此INSERT语句。我可以获得UPDATE工作,但不是这个INSERT。这是我的代码...


******************

I am using Visual Studio 2003, C# .NET

I can''t get this INSERT statement to work. I can get an UPDATE to work, but not this INSERT. Here is my code...

******************

展开 | 选择 | Wrap | 行号

推荐答案

你必须写
You must write
展开 | 选择 | Wrap | 行号


它仍然说有INSERT INTO语句中的语法错误。我不明白我有一本书向我展示了如何做到这一点...我尝试了AXAS代码...它仍然说明了。
It''s still saying that there is a syntax error in the INSERT INTO statement. I don''t understand. I have a book that shows me how to do it... and I tried AXAS code... and it still says that.


我尝试用你的代码制作一个程序,我得到了同样的错误。


这是你的问题:


时间这个词是MS Access 2003中的关键字,最有可能是其他版本。因此,它不能用作列名。


我暂时没有尝试使用不同的列名,但我确信它会起作用。


祝你好运!



编辑:其实,我只是在思考。在这种情况下如何更新工作?现在我在质疑自己。我将再次尝试该程序。
I tried making a program with your code, and i got the same error.

Here is your problem:

The word ''Time'' is a keyword in MS Access 2003, and most likely other versions as well. Therefore, it cannot be used as a column name.

I havn''t tried with a different column name for time, but i''m sure it would work.

Good luck!


Actually, I''m just thinking. How can update work in this situation? Now I''m questioning myself. I''ll just try the program again.


这篇关于使用OleDb的C#INSERT语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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