How to fill Specific data in Dataset ??

Dear Team
   shortly ... putting a where condition in the sqladapter  raise error or not works 
   " there is a uniqe or not allow null ......"

   any idea 



Answer this question

How to fill Specific data in Dataset ??

  • sameer_goyal

    Thanks for replying
      i will give you an ex:
      if a form include 2 tables parent and child....like Orders , OrdersDeatils
      if the word fill written in the dataset it will gets"select" the whole data
      even for more than 2 or 3 years and this is a lot
      for ex: select orderno,oerderdate,ordersname,ordersEndDate
                where orderEndDate = null
         or : where getdate() - orderDate = 3   'to get the last 3 monthes for ex
     
             All of this inside the sqladapter by adding only the where condition
            i dont want to select the whole data...after i did that the error occered
                                                                                                                    any idea



  • MurrayLang

    It sounds as though you are trying to put a null value into a field that does not allow a null value to be stored.  This could be on an insert or update statement. 

    I'd check the database and dataset properties for each of the fields and ensure that I am passing valid values across to it.   It could be that you have a field that does not allow nulls and you are not writing anything to it and therefore when it tries to write the chnages to the database it would raise and exception.

    Provide the exact error message andwhere in the sqladapter are you putting the where clause...  


  • How to fill Specific data in Dataset ??