Answered by:
data type is invalid for this property

Question
-
Hi Experts,
An error message "data type is invalid for this property." comes out that highlights READ EVENTS on the main.prg. How can I locate which data is invalid in data type? Can I use the debugger and how to use it? Thank you.
Tuesday, March 26, 2013 5:43 AM
Answers
-
Put a set step on in the forms QueryUnload, then click the X (exit) and step through whatever is executed. There has to be a point a property is set to an invalid value. It can only happen without code, if it has to do with databinding. Leaving the form then may cause this by ending the current datasession, for example.
A general error handler (ON ERROR) should also be able to tell you which property is involved. It will be invoked with the error number 1732. Besides ERROR(), MESSAGE(), MESSAGE(1) and AERROR() output take a look at SYS(2018), which might contain the proeprty name in case of that error.
Bye, Olaf.
Olaf Doschke (Setmics)
- Marked as answer by Naomi N Friday, March 29, 2013 6:56 PM
Thursday, March 28, 2013 10:52 AM
All replies
-
can u send to us your main prog file to check inside itTuesday, March 26, 2013 7:26 AM
-
Put
Set Step ON
into your program and step through the commands using the toolbar icons in the trace window.
- Proposed as answer by Ed Price - MSFTMicrosoft employee Wednesday, March 27, 2013 7:53 AM
Tuesday, March 26, 2013 10:21 AMAnswerer -
That suggests that the problem is with a property set in the Property Sheet of a form or class. Step through the main program to see which form or class is involved.
Tamar- Proposed as answer by Ed Price - MSFTMicrosoft employee Wednesday, March 27, 2013 7:53 AM
Tuesday, March 26, 2013 8:31 PMAnswerer -
Still cannot locate which data is mismatch the data type by using SET STEP ON.
After a CHART shown up and I press the EXIT command button (release the form), it immediately jumps to the main.prg on the command line READ EVENTS and displays the error message "data type is invalid for this property". Does the error come from the ActiveX controls and how to solve this problem? Thanks.
Thursday, March 28, 2013 3:49 AM -
Try ERROR() MESSAGE() MESSAGE1()Thursday, March 28, 2013 8:53 AM
-
Put a set step on in the forms QueryUnload, then click the X (exit) and step through whatever is executed. There has to be a point a property is set to an invalid value. It can only happen without code, if it has to do with databinding. Leaving the form then may cause this by ending the current datasession, for example.
A general error handler (ON ERROR) should also be able to tell you which property is involved. It will be invoked with the error number 1732. Besides ERROR(), MESSAGE(), MESSAGE(1) and AERROR() output take a look at SYS(2018), which might contain the proeprty name in case of that error.
Bye, Olaf.
Olaf Doschke (Setmics)
- Marked as answer by Naomi N Friday, March 29, 2013 6:56 PM
Thursday, March 28, 2013 10:52 AM -
Thank you all. Especially thanks to Olaf for your further advice. I did it.
- Proposed as answer by fanda3333 Friday, March 29, 2013 1:31 PM
Friday, March 29, 2013 1:30 PM