# Finding Empty Iteger Field

**URL:** <https://forum.servoy.com/t/finding-empty-iteger-field/6650>\
**Category:** Classic Servoy\
**Created:** [October 27, 2006, 10:13am UTC](https://forum.servoy.com/t/finding-empty-iteger-field/6650 "2006-10-27T10:13:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zac](https://avatars.discourse-cdn.com/v4/letter/z/87869e/32.png) [@Zac](https://forum.servoy.com/u/Zac)\
**Post date:** [October 27, 2006, 10:13am UTC](https://forum.servoy.com/t/finding-empty-iteger-field/6650/1 "2006-10-27T10:13:14Z")

</div>

I have a problem finding empty integer fields in servoy. And could not find this with a few searches on this forum yet.  
This is my code: ( box\_id is defined as integer)

controller.find();  
production\_order\_id=globals.SELECTED\_PO\_ID;  
box\_id = ‘^’ ; // all empty values : NULL’s in SQL server  
controller.search(true,false);

When I run this Servoy is returning the error :

Setting dataprovider with name ‘box\_id’ / type ‘INTEGER’ with value of wrong type ^

What I try to accomplish is finding all data where the box\_id field was never filled with any data.

Is there anyone who can help me with this ? I’m using SQL server as database ( version 2005 ).

---

<div class="post-metadata">

**Author:** ![bcusick](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@bcusick](https://forum.servoy.com/u/bcusick)\
**Post date:** [November 4, 2006, 12:07am UTC](https://forum.servoy.com/t/finding-empty-iteger-field/6650/2 "2006-11-04T00:07:44Z")

</div>

What driver are you using?  
What Java version?  
What Servoy version?  
Is the “box\_id” an INT?  
What if you just use controller.search() rather than the explicit controller.search(true,false)?

---

<div class="post-metadata">

**Author:** ![Zac](https://avatars.discourse-cdn.com/v4/letter/z/87869e/32.png) [@Zac](https://forum.servoy.com/u/Zac)\
**Post date:** [November 7, 2006, 11:55am UTC](https://forum.servoy.com/t/finding-empty-iteger-field/6650/3 "2006-11-07T11:55:55Z")

</div>

Thanks for your reply Bob,

I have found my problem after a long search.  
I was not aware that in version 3 you need to specify manually :

```auto
databaseManager.setAutoSave(true);

```

Now you always need to check if the find results : “true”

```auto
if (controller.find())
{
   field='='+value;
   controller.search();
}

```

Whithout this check you are assigning values to your data field.  
( so possibly corrupting your data )  
So I was assigning ‘^’ to an integer field, which resulted into the error.

This is new with version 3, it worked fine in my previous beta version of version 3, and in version 2.  
It would be nice to have some kind of global find and replace routine, since I have to check many of pages with code. All potentialy able to corrupt the data, if not changed in time.

Do you, or anybody else know if there is a document that describes all the possible upgrades that you need to do to existing code to make it work safely with version 3 ? Now I have the feeling that I’m working on a trial and error basis.

It would be nice if at least the HTML help will work again soon for version 3.

---

<div class="post-metadata">

**Author:** ![Zac](https://avatars.discourse-cdn.com/v4/letter/z/87869e/32.png) [@Zac](https://forum.servoy.com/u/Zac)\
**Post date:** [November 7, 2006, 12:18pm UTC](https://forum.servoy.com/t/finding-empty-iteger-field/6650/4 "2006-11-07T12:18:11Z")

</div>

I just found out from Maarten, that starting with Version 3.0.1-build 372  
the HTML Help is working again. Great !!
