我在做个网页的数据添加··但是怎么判断access数据库添加重复呢?
比如我在网页中添加了一个标题叫asd的文章,我后面在添加asd的时候就会提示已经有这个名字了我是新手·希望大家说详细点··谢谢各位~

解决方案 »

  1.   

    我想要在网页里面添加的时候会提示有相同的名字··好像if,else就可以判断了··但是不知道怎么写·····麻烦大家了··
      

  2.   

    like the upstairsif you want query on database,then:
       select count(*) form tableName where fieldName="asd"if you judge out:
       for(EntityClass aa in EntityCollection){
          if(aa.fieldName=="asd"){
           return true;
           }
       }
      

  3.   

    if else 的条件也是要去数据库匹配的啊。
      

  4.   

    yes
    take your content to database with a function,match it with “select count(*) form tableName where fieldName="asd" ”
    if count(*)>0 then haved the same name 
    else none.