Comments inline
--
W.G. Ryan, eMVP
Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
Agnes said:
I got a table which without primary key.
--That's the first problem. Although technically there's not a physical
requirement that every table have a key - tables without keys are the
hallmark of every poorly designed system, every bit as much as tables with
100+ fields are. If you simply put a key on your table, this whole problem
will go away and you'll incur no penalty. On the other hand, if you don't,
you're going to ahve to jump through hoops to get things to work as you want
and you'll close to door to manhy powerful features in all likelihood.
case 1) I can process insertcommand and daMytable.update..etc
Without a PK field, it's going to be difficult and you'll have limited, very
limited desinger support.
case 2) However, if i process updatecommand , As I run daMytable.update ..It
returns error said..."cannot process update command without .... key"
Right. By and large, although it's not perfect, when the IDE tells you
something is wrong, it's worth looking into. If you don't have a key then
you wont be able to use any of the code generating tools like the Wizards or
the CommandBuilder, to generate crud logic.
at this point, stick to the rule "The Key, the Whole Key and nothing about
the Key" and "It's ALL about the Key" and you'll be fine.