請問有什麼辦法可以讓我看到Adapter生成的語句? if you are using a SqlCommandBuilder, then you can useSqlCommandBuilder.GetInsertCommand().CommandTextto see the SQL Statement 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 謝謝您的指點,我handle了它的InsertCommand,顯示為:NSERT INTO Users( UserID , Password , SurName , GivenName , DOB , Sex , Nationality , Address , Email ) VALUES ( ? , ? , ? , ? , ? , ? , ? , ? , ? )真不知所謂「語法錯誤」何在,在同一個DataSet中,我用同樣的方法Adapter其它的表沒有任何問題,不知這個User表中是怎麼回事。我的Access表如下所示,一切正常呀?http://wuchungtang.www1.dotnetplayground.com/kkk.jpg sorry, frankly, I have no idea wait, you mean UserID is an identity field? Yes,but I've already used that in other Table and it's OK. I found in SQL there's a keyword "USER_ID" not "UserID". I really want to know what's wrong with the "Syntax". Who can help me,please! Or do u mean that I can't use "UserID" as primary key? 解決了。經過本人無數次的弱智型測試,最終證明:"Password"不能作字段名。他嗎的,SQL裡也沒學過這個關鍵字呀。不知哪位知道有這個關鍵字,類似問題碰到不止一次了,誰能總結一張表,告訴我們哪些詞是禁用的,免得浪費時間。我看還有一個避免的辦法,就是不要用英文單詞做字段名。 网页关键字的提取 .net webform 怎么打开文件夹 关于字符串处理,如果取得指定字符? 静态页面怎么调动ajax.net的后台代码(刚学)? 求一个正则表达式 关于vs2008调试自动退出的问题 进来看看,绝对简单问题.进来就给 ASP.NET 做的网站 用户登陆时 突然网络中断 如何处理?才友好~ 帮下忙啊,ajax中没法用response下载文件啊 如何让两个SqlCommand对象同时使用一个sqlConnection呢? 如何设置TreeView的字体类型和字体大小? 我是新手向各位学习,谢谢!!如何将录入的数据提交到数据库中?
NSERT INTO Users( UserID , Password , SurName , GivenName , DOB , Sex , Nationality , Address , Email ) VALUES ( ? , ? , ? , ? , ? , ? , ? , ? , ? )
真不知所謂「語法錯誤」何在,在同一個DataSet中,我用同樣的方法Adapter其它的表沒有任何問題,不知這個User表中是怎麼回事。
我的Access表如下所示,一切正常呀?
http://wuchungtang.www1.dotnetplayground.com/kkk.jpg