Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jim Carls
  Where is Jim Carls?
 Nashville
 Tennessee - United States
 Jim Carls
 To: Tamar Granor
  Where is Tamar Granor?
 Elkins Park
 Pennsylvania - United States
 Tamar Granor
 Tags
Subject: RE: Invalid date/datetime value in SELECT
Thread ID: 227884 Message ID: 228676 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Wednesday, May 20, 2009 6:50:43 PM         
   


> >
> > This is a follow-up to my earlier reply. The index rebuild did not make a difference, but I did stumble upon a very strange clue: If I open the report's OpenTables and insert a BROWSE, I can look at the data (which looks fine) but when I close the browse window, the report preview works without an error. I paged through the entire report without a problem. When I removed the BROWSE line, the error reappeared.
>
> Did you rebuild the indexes from scratch, or just reindex? You need to do the first to make sure you don't have corruption.
>
> Tamar

At first, it was just a zap-and-import type of rebuild. Then I replaced the DBC and tables with those from a known good set and did a zap-and-import from the client's set. Then I used GenDBC to create a brand new database from the client's set and imported from the old set as before. None of these worked.

I do have two new clues. Previously I had found that I did not get an immediate crash if I inserted a BROWSE after dodefault() in the report's OpenTables (it would crash later when it got to a certain point in the data (which still looked fine when I browsed again from the debugger). The two new clues are: 1) The client tells me that they can print successfully, it's only the Preview that crashes (it's an enormous report, so I did not physically print once I duplicated the crash with the Preview) and 2) It appears that the "bad" data is the last record added to the primary table from which the view is built. That suggests something like a bad header, except for all the variations of "clean" rebuilding that I already tried.

JC

ENTIRE THREAD

Invalid date/datetime value in SELECT Posted by Jim Carls @ 5/13/2009 8:55:46 PM
RE: Invalid date/datetime value in SELECT Posted by Tamar Granor @ 5/13/2009 10:00:19 PM
RE: Invalid date/datetime value in SELECT Posted by Jim Carls @ 5/14/2009 12:56:31 AM
RE: Invalid date/datetime value in SELECT Posted by Jim Carls @ 5/15/2009 3:47:24 PM
RE: Invalid date/datetime value in SELECT Posted by Tamar Granor @ 5/15/2009 10:27:03 PM
RE: Invalid date/datetime value in SELECT Posted by Jim Carls @ 5/20/2009 6:50:43 PM
RE: Invalid date/datetime value in SELECT Posted by tushar @ 5/20/2009 7:38:20 PM
RE: Invalid date/datetime value in SELECT Posted by Anders Altberg @ 5/20/2009 7:16:45 PM