dbTalk Databases Forums  

Errors when Importing foxpro tables into SQL

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Errors when Importing foxpro tables into SQL in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wimtien
 
Posts: n/a

Default Errors when Importing foxpro tables into SQL - 02-11-2005 , 07:27 AM






When i am importing a foxpro table, linked by ODBC, i have a problem with
date field.

The definition in foxpro is standard date. The program is from a third
party, so everything is defined and we cannot change anything. We want to
analyse a lot of data with crystal report in SQL server.

While importing the record is refused with the error "insert error, column
nn ('fieldname', DBTYPE-DBTIMESTAMP), status 6: Data overflow.

Can somebody give me a solution?

Reply With Quote
  #2  
Old   
Tomasz Borawski
 
Posts: n/a

Default RE: Errors when Importing foxpro tables into SQL - 02-11-2005 , 08:31 AM






Hi,

This is reason of a null value data field in Foxpro table. Instead of column
copy task, writes a script that checks if date is valid date (isDate()
function in VB). And if not put null value, otherwise put original value.

Tomasz B.

"Wimtien" wrote:

Quote:
When i am importing a foxpro table, linked by ODBC, i have a problem with
date field.

The definition in foxpro is standard date. The program is from a third
party, so everything is defined and we cannot change anything. We want to
analyse a lot of data with crystal report in SQL server.

While importing the record is refused with the error "insert error, column
nn ('fieldname', DBTYPE-DBTIMESTAMP), status 6: Data overflow.

Can somebody give me a solution?

Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default RE: Errors when Importing foxpro tables into SQL - 02-11-2005 , 09:53 AM



Tomasz

Perhaps an alternate explanation would be that Foxpro valid date ranges
are different to those in SQL Server and this is causing the overflow

Similar to this

Formatting Character Data into Datetime fields
(http://www.sqldts.com/default.aspx?249)


"Tomasz Borawski" <TomaszBorawski (AT) discussions (DOT) microsoft.com> wrote in
message news:TomaszBorawski (AT) discussions (DOT) microsoft.com:
Quote:
Hi,

This is reason of a null value data field in Foxpro table. Instead of
column
copy task, writes a script that checks if date is valid date (isDate()
function in VB). And if not put null value, otherwise put original
value.

Tomasz B.

"Wimtien" wrote:

When i am importing a foxpro table, linked by ODBC, i have a problem
with
date field.

The definition in foxpro is standard date. The program is from a third

party, so everything is defined and we cannot change anything. We want
to
analyse a lot of data with crystal report in SQL server.

While importing the record is refused with the error "insert error,
column
nn ('fieldname', DBTYPE-DBTIMESTAMP), status 6: Data overflow.

Can somebody give me a solution?


Reply With Quote
  #4  
Old   
Cindy Winegarden
 
Posts: n/a

Default Re: Errors when Importing foxpro tables into SQL - 02-11-2005 , 03:47 PM



Hi Wimtien,

You may be running into either of two problems:

FoxPro and Visual FoxPro's earliest valid date is 1601-01-01 if your system
date is set to Short or Long. Otherwise the earliest valid date is
0001-01-01.

FoxPro and Visual FoxPro can have an "empty" date. Empty is not the same as
Null. SQL Server has a lot of trouble dealing with this.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden (AT) msn (DOT) com www.cindywinegarden.com


"Wimtien" <Wimtien (AT) discussions (DOT) microsoft.com> wrote

Quote:
When i am importing a foxpro table, linked by ODBC, i have a problem with
date field.

The definition in foxpro is standard date. The program is from a third
party, so everything is defined and we cannot change anything. We want to
analyse a lot of data with crystal report in SQL server.

While importing the record is refused with the error "insert error, column
nn ('fieldname', DBTYPE-DBTIMESTAMP), status 6: Data overflow.

Can somebody give me a solution?



Reply With Quote
  #5  
Old   
Wimtien
 
Posts: n/a

Default Re: Errors when Importing foxpro tables into SQL - 02-13-2005 , 06:13 AM



Thanks Cindy

The date is an "empty" date.

Only i have to know now the sql convert function when i import the foxpro
file into sql.

If the foxpro-date is empty than standard sql-date else foxpro-date.


"Cindy Winegarden" wrote:

Quote:
Hi Wimtien,

You may be running into either of two problems:

FoxPro and Visual FoxPro's earliest valid date is 1601-01-01 if your system
date is set to Short or Long. Otherwise the earliest valid date is
0001-01-01.

FoxPro and Visual FoxPro can have an "empty" date. Empty is not the same as
Null. SQL Server has a lot of trouble dealing with this.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden (AT) msn (DOT) com www.cindywinegarden.com


"Wimtien" <Wimtien (AT) discussions (DOT) microsoft.com> wrote in message
news:42AC8785-A488-48CE-9236-B00AEA1472C1 (AT) microsoft (DOT) com...
When i am importing a foxpro table, linked by ODBC, i have a problem with
date field.

The definition in foxpro is standard date. The program is from a third
party, so everything is defined and we cannot change anything. We want to
analyse a lot of data with crystal report in SQL server.

While importing the record is refused with the error "insert error, column
nn ('fieldname', DBTYPE-DBTIMESTAMP), status 6: Data overflow.

Can somebody give me a solution?




Reply With Quote
  #6  
Old   
Cindy Winegarden
 
Posts: n/a

Default Re: Errors when Importing foxpro tables into SQL - 02-13-2005 , 12:33 PM



Hi Wintien,

FoxPro has an Empty() function and you can also compare the value to {}
which is the way to represent an empty date in a text string like an SQL
command.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden (AT) msn (DOT) com www.cindywinegarden.com


"Wimtien" <Wimtien (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks Cindy

The date is an "empty" date.

Only i have to know now the sql convert function when i import the foxpro
file into sql.

If the foxpro-date is empty than standard sql-date else foxpro-date.



Reply With Quote
  #7  
Old   
Wimtien
 
Posts: n/a

Default Re: Errors when Importing foxpro tables into SQL - 02-14-2005 , 02:33 AM



Hi Cindy,

Do you also know the Visual basic translation script for it.
I read the script from Allan but i cannot change it the way i want.

I want put a standard value in the date when it is empty

"Cindy Winegarden" wrote:

Quote:
Hi Wintien,

FoxPro has an Empty() function and you can also compare the value to {}
which is the way to represent an empty date in a text string like an SQL
command.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden (AT) msn (DOT) com www.cindywinegarden.com


"Wimtien" <Wimtien (AT) discussions (DOT) microsoft.com> wrote in message
news:359A164E-88D7-4985-8EAC-B5F8E492561D (AT) microsoft (DOT) com...
Thanks Cindy

The date is an "empty" date.

Only i have to know now the sql convert function when i import the foxpro
file into sql.

If the foxpro-date is empty than standard sql-date else foxpro-date.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.