除非指定了 InsertCommand,否则数据源“xxx”不支持插入操作

By
WP札记

最近在上asp.net2.0的课程,老师一步一步讲解的例题,浑浑噩噩的过日子,等到5天后才想起来翻出来练习做一下……很罪恶。今天遇到了一个小问题,是关于以前学习的SQL的。

按照最基本的方法,一步一步先是新建了一个模版,然后新建数据库,一切很正常,可是到插入数据的时候出现:

除非指定了 InsertCommand,否则数据源“SqlDataSource1”不支持插入操作。

起先是以为那个“formview”需要定义,但是慢慢发现不是那回事!

CSDN的大大们说需要有和Adapter相关的,创建一个插入COMMAND,赋给适配器即可。当然这种方法是直接在代码段插入command命令,是完全可行的。但是我只是看看这个怎么操作,因为之前学习数据库的时候完全没有实际操作,“数据库系统概论”确实是很强大的课程,可是也确实很让人费解——为什么没有一个实际例子?于是开始慢慢探索,发现问题解决方法。

首先,这个问题是因为没有定义insertCommand导致,sql不允许这么操作。

解决方法是在SqlDataSource配置数据源选项里面进行设置。配置Select语句,然后右边有个高级,点击,为什么是全灰的不让选?之前不是已经选择了所有表项目了?

What is the philosophy of the the Baihui website; stand out?
Zoho is called the work done with each other seamlessly business applications. The Zoho site is no different. A website, the starting point for any business, Baihui website as the core, around which all other applications, closely combine.

I think the the communication between Baihui stand out from the rest of the application, a lot simpler. In addition, there are no other people have such a wide range of commercial applications.

Who is a typical Zoho website user it?
Zoho is aCreate Free Websites.We are mainly looking for, in order to meet the emerging small businesses and family enterprises. Apart from them, there are countless individuals use the website as a blog regularly organize activities, create a portfolio, in addition, there is a great deal of good online, to any person, in any industry, any business, regardless of size.

The Baihui website do dynamic content elements when it comes to the site?
There will be a lot of pages in a commercial site, different teams or departments. For example, the inventory with the store team, marketing, product portfolio and management team, etc. Recommended.

If a person is how it is, and co-ordinate all the team, and update pages, it would be very confusing. If, however, the corresponding form of dynamic content to share their team, they can add or modify the content of the pages on which they are responsible. This will be frequently updated page on the Free Website easily.

You may have heard of Microsoft to close their website down, replaced by a payment alternative. Apple also recently done the same popular iWeb site builders, leaving behind many disappointed users. For me, it seems that the larger companies more likely it is that one day they will lose interest in their lower incomes, products or services. The Baihui provide a lot of different products.
Microsoft’s target audience of Apple, Baihui is completely different. Our business applications suite for small and medium-sized enterprises, which a Web site is very necessary. We are optimistic, we named the Zoho site, the application of the center of our universe. So, definitely not a the Baihui website.

What is the Zoho support is what?
Across Zoho service, we do not receive support. InFree Website Builder, Free users and paid subscribers, we offer unlimited e-mail support, everyone

The difference between Zoho’s offering and Google’s is that Google’s products work separately, and are designed for different purposes. One (Google Sites) is a very basic website and wiki building tool, which is more appropriate for personal use or for use in small teams, not as a consumer-facing webpage. Meanwhile, Google’s DIY mobile site tool is more of a way to convert a professionally designed website into a mobile-friendly site that syncs with its desktop counterpart when changes are made.

What’s next? You in where the title with Zoho’s website?
We do not want the user to simply establish a commercial website Zoho website, we want our users to run their entire business. Therefore, our primary focus will be integrated. We started with Zoho creator of GAPPS. Next on the list is Baihui Zoho Mail, CRM and Zoho campaign (Beta). Other applications will follow suit.

“数据表没有定义主键。”

在定义主键之后在进入前项里,选择主键,之后就可以选择了。

之后就可以实现向sql数据库表项目里面插入数据啦~~问题解决。

SQL是门看起来很简单但是比较实用的东西,阿修决定以后多多注重这方面的训练,不管怎么样,实用还是很重要的。

  1. 我开始建设博客中。SQL看来虽然简单 但也不能忽视

    2012年06月15日