Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ERROR: AV's and IWButton.picture.data: the parameter is incorrect
#34
Hi everyone,

I have finally found the reason and solved my problem.

After a lot of changing components around, setting adoquery connection to various dbconnections, and even tried setting the adoquery connectionstring as I would set it in the ADO DBConnection, a number of different tests pointed out that it was just in one function where the problem was. As described above, it was the large Select function giving problems. And with a similar, however not as large, function not giving problems, I found the culprit: One single variable, holding the generated Select statement before execution, was still outside the secure surroundings of the Form Class definition. Once it was moved inside, into the Public section, the function started to behave as expected.

A heavy weight was lifted from my shoulders....

Now all that just remains is to move all components back to their original location being connected to a local dbconnection, not the one previously defined in the UserSession. That should work, and I will test it. I will let you all know once I'm done.

One thing though: It do not appear to be necessary wrapping ADO calls in thread safe code, unless of course the code inside a form, actually activates separate threads, using the same ADO components. That is not the case for me, so I do not need to. And of course I will still need to enclose Inserts, updates and Deletes, in transaction-commit-roolback code, but that another issue.

Thanks to everyone for your help and comments so far. I have learned a lot and I hope some of you who has participated in the thread, or just followed it, have learned something as well.

Regards
Soren
Reply


Messages In This Thread
RE: ERROR: AV's and IWButton.picture.data: the parameter is incorrect - by SorenJensen - 02-10-2020, 11:36 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)