Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: John Barrie
  Where is John Barrie?
 Memphis
 Tennessee - United States
 John Barrie
 Tags
Subject: Error message not making sense
Thread ID: 311226 Message ID: 311226 # Views: 61 # Ratings: 0
Version: Visual FoxPro 8 Category: Errors & Debugging
Date: Wednesday, June 29, 2011 8:43:54 PM         
   


Hi there

I have an error occurring in an application, with MESSAGE(1) in the error handler giving a code line that doesn't exist in the executing code. The scenario is:

(1) Clicking a button in a form causes a method in an object instantiated from a class in a .prg file to run. This method interacts with an SQLServer database (and calls many other methods in the same object in the process).

(2) Apparently randomly (I can see no pattern in the data that causes an error), an error will occur in a method that attempts to update the database. The Foxpro error that occurs is Error 9: Data type mismatch. The mystifying thing is that MESSAGE(1) will give the program code line that failed as 'SELECT vsomeremoteview' where vsomeremoteview is not mentioned anywhere in the class, let alone selected in the problem method. The only connection to this view is that it is contained within the dataenvironment of the original form that begins the process. Within the failing method, there is nothing that references that form.

In the form, the remote view is the datasource of a grid that allows updates of data in the database. The only place in the whole application where 'SELECT vsomeremoteview' can exist is in the Click() and Refresh() methods of a few of the buttons in the record control for that grid - could a Refresh() be being called automatically somehow, and then crashing for some unknown reason?

I would be very interested if anyone has any idea what may be going on here. The problem only appeared recently after the application having run without issues for a long time.

Thanks

John

ENTIRE THREAD

Error message not making sense Posted by John Barrie @ 6/29/2011 8:43:54 PM
RE: Error message not making sense Posted by tushar @ 6/30/2011 6:23:34 AM
RE: Error message not making sense Posted by John Barrie @ 6/30/2011 6:11:40 PM
RE: Error message not making sense Posted by Stefan Wuebbe @ 7/1/2011 12:23:33 PM
RE: Error message not making sense Posted by John Barrie @ 7/2/2011 10:47:08 PM
RE: Error message not making sense Posted by Stefan Wuebbe @ 7/3/2011 10:35:05 AM