Find request changing data

In my solution I have an icon that indicates find mode and our SR staff are aware of the status area in the lower left. They said they were in find mode, entered a company name they were searching for, hit enter and after a minute had to force quit because it took so long and they figured it crashed (we are having network issues so this [slow/lock-up] is probably not a Servoy issue). When they relaunched Servoy and tried the find again the company did not come up. I did a search and noticed that the company name had changed to “%stone%”. I reviewed the change log and apparently the company name had been changed to several different search patterns this morning.

I do not understand the details of Servoy’s find process (the details of the communication/handshake between client server and SQL). Is it possible for Servoy client to indicate find mode, LOOK like it is in find mode (all fields empty, find status in lower left), but it still be able to somehow be sending edit information to the server/SQL?

It sounds very strange and if it was not for one of our SR. staff describing what happened in detail I would just assume user error. I am concerned because I have noticed several company names being altered to apparent search strings.

I am curious if under a specific set of circumstances if it is POSSIBLE.

A customer of mine reported a similar problem but I wasn’t able to reproduce it.
I’m sure they were in find mode because the search was performed on a table-view form that have all fields edit properties turned off.

Good news…I am not crazy
Bad news…This is a potentially MAJOR issue.

Thanks for the validation.

I have had the same problem recently.

Servoy Developer
Version R2 2.1.2-build 315
Java version 1.5.0_02-b09 (Windows 2000)

FYI: We are on Servoy R2 2.2-build 328

Java 1.5.0_02-b09 (win xp)

Any additional bg info would be more than welcome. We havn’t seen this behaviour in our own testing and production environments (both with local and remote servers and multiple db flavours). If anybody knows how to actually reproduce the mentioned problem: extra points.

jaleman:
Any additional bg info would be more than welcome. We havn’t seen this behaviour in our own testing and production environments (both with local and remote servers and multiple db flavours). If anybody knows how to actually reproduce the mentioned problem: extra points.

Under certain circumstances, I also occasionally experienced this problem.
I’m sure it’s related to searches, because some of the corrupted data were showing the “%” character I use to put in the search method.
As the other said, is very difficult to reproduce: I can only add that it seems to be related to failed searches (when a search produces no results and you make immediately a new search).

But, again: it’s a very erratic bug…

I’m using the following onDataChange method on a global search field.

var search = utils.stringReplace(globals.styleNumberSearch, '   ', ' ');
search = utils.stringReplace(search, '  ', ' ');
search = utils.stringTrim(search)
controller.find();
//convert the search field into an array
var searchArray = search.split(' ');
for (var i = 0; i <= searchArray.length; i++)
{
	style_number = searchArray[i] + '%';
	//unless this is the last request, create a new find request
	if (i != searchArray.length)
	{
		controller.newRecord();
	}
}
controller.search();

I agree that this is hard to reproduce as it only happens occasionally. It seems to change the search field (style_number) and the primary key (product_id, integer) to the first instance of style_number = searchArray + ‘%’.
I know this doesn’t sound right since globals.styleNumberSearch is text. However, I’m pretty sure this is the way it happened.
If it happens again, I’ll post something more definate.

onDataChange should be onChange in my previous post

I’ve been testing and just had another strange experience.

I have a stored calculation named “notes”. This is a text field using:

return products_to_sizes.getSize() + ’ callbacks required’;

On my last search, notes returned the calculation with the contents of my global search field concatenated onto the end like this:

0 callbacks requiredsearch text here.

After clearing the global search field the calc works correctly.

Spoke with research and they said they appeared to be in find mode. They searched and were met with the No Records Found dialog. THey tried to modify their search (still appeared to be in find mode) and tried different search criteria and reseived another No records Found dialog. They tried a third time and it seemed to freeze Servoy. They force quit Servoy, relaunched and then searched for the company again and it was not found. I noticed the company named “%stone%” and upon looking at the log found it had been renamed.

On this table I have a calc “calc_company_city”:

return coname + ', ' + city;

The log showed that this changed first (before the coname field it is based on):

Here is what the log shows in order that the event happened:

[Action | Element | From Value | To Value]

Edit | calc_company_city | NULL …| Stone & Simons Advertising, Southfield
Edit | calc_company_city | Stone & Simons Advertising, Southfield …| %brooks leather%, Southfield
Edit | coname …| Stone & Simons Advertising …| %brooks leather%
Edit | calc_company_city | %brooks leather%, Southfield …| %stone & simons advertising%, Southfield
Edit | coname …| %brooks leather% …| %stone & simons advertising%
Edit | calc_company_city | %stone & simons advertising%, Southfield …| %stone%, Southfield
Edit | coname …| %stone & simons advertising% …| %stone%

The only field they ever searched on was coname. The field calc_company_city is a non display field. So as the log shows, Servoy thought they were in edit mode - editing the company name and causing calc_company_city to reevaluate and generate a log entry. As I said, the entire time the user thought they were conducting unsuccessful searches.

Using the log information, I tried to duplicate the sequence of events but could not duplicate the bug.

FYI I am using mySQL on a remote server as my back end.

I will continue to try to gather data on this since it has apparently happened several times (approx once a week).

ANy more news on this topic?

Is there something we can do to prevent this from happening?

we have currently no idea how this can happen. And we would love to see when it happens in a solution. Can you reproduce it somehow?

So far, No. I can not deliberately reproduce it, but it still seems to happen. We just moved to a much more powerful server so I will test it there. Thanks for your continued interest on the topic.

I have a form which has a field called stock_number. This servoy sequence integer is the field which ties a stock number to a number of relationships - bu is not the pk. This field needs to be searchable. When it is searched, one out of five times it finds the record, but deletes the data in that field. Often simply doing the search re-finds the data and all is well (although it is clearly some kind of weird bug), however, sometimes it removes the number permanently. This is a critical error because it destroys the link between an item and who bought it among a host of other things. I am at a loss as to why it does this (and when as it is unpredictable). Any thoughts on a solution from the Servoy team or anyone who has seen a similar situation would be appreciated.