I have written a conversion program which uses SQL pass through to update tables on SQL server with VFP data. Everything works fine with my demo data but when I convert real customer data I am frequently getting fatal errors. I've looked at the records these errors are happening on and they all seem to have dates with a year of 2120. When I delete these records in VFP the convert then runs fine

Does anyone know why dates with the year 2120 should be causing problems? Later dates have converted ok so it's not a maximum allowed year or anything

Thanks for any help

Bernie

Re: Upsizing VFP data to SQL Server by Anders

Anders
Mon May 24 06:53:48 CDT 2004

Are British date formats involved?
-Anders

"Bernie Beattie" <anonymous@discussions.microsoft.com> wrote in message
news:53A339BB-3E87-4792-BB53-02D41DFA13D2@microsoft.com...
> I have written a conversion program which uses SQL pass through to update
tables on SQL server with VFP data. Everything works fine with my demo data
but when I convert real customer data I am frequently getting fatal errors.
I've looked at the records these errors are happening on and they all seem
to have dates with a year of 2120. When I delete these records in VFP the
convert then runs fine.
>
> Does anyone know why dates with the year 2120 should be causing problems?
Later dates have converted ok so it's not a maximum allowed year or
anything.
>
> Thanks for any help.
>
> Bernie


Re: Upsizing VFP data to SQL Server by anonymous

anonymous
Mon May 24 08:11:03 CDT 2004

Yes - all our dates are British.

Re: Upsizing VFP data to SQL Server by Anders

Anders
Mon May 24 08:32:01 CDT 2004

Hi Bernie

I saw a bug reported where SET DATE DMY and APPEND FROM TYPE CSV didin't
append dates correctly. Your error looks like it.
What if you switch to SET DATE ANSI or SET DATE MDY?

-Anders

"Bernie Beattie" <anonymous@discussions.microsoft.com> wrote in message
news:7FB0ED67-F74C-4795-8AAF-88E3093F404D@microsoft.com...
> Yes - all our dates are British.


Re: Upsizing VFP data to SQL Server by Anders

Anders
Mon May 24 10:09:03 CDT 2004

SQLServer Datetime dates work from January 1, 1753 through December 31,
9999 with an accuracy of three-hundreds of a second.
Smalldatetime works from Jan 1, 1900 through June 6, 2079 with an accuracy
to the minute. Datetime dates are stored as two four-byte integers, trhe
first 4 bytes are the number orf days before or after January 1, 1900. The
next 4 bytes are the number of seconds since midnight, like the SECONDS()
function in VFP.
Smalldatetime are 2 + 2 bytes for days and seconds.
-Anders


"Bernie Beattie" <anonymous@discussions.microsoft.com> wrote in message
news:11D89FCD-CE78-46F3-B9BD-F00001BBD91F@microsoft.com...
> Anders, do you happen to know if there is a minimum & maximum date that
SQL Server will allow. I'm hitting lots of problems with dates far in the
past and far in the future. I can't find it in the Help.
>
> Thanks
>
> Bernie