dbTalk Databases Forums  

Excel importing a single row through DTS failure

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


Discuss Excel importing a single row through DTS failure in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
davemateer@gmail.com
 
Posts: n/a

Default Excel importing a single row through DTS failure - 03-12-2008 , 11:42 PM






Greetings

I have a successful DTS (SQL 2000!) package which imports many Excel
2003 timesheets. The columns contain numbers, strings and a date.

In DTS designer under Disconnected Edit, Connections, Excel, OLEDB,
Extended, Value I have:

Excel 8.0;HDR=YES;IMEX=1

The problem occurs when I have a single row (or a few rows)

I get an error like:

TransformCopy 'DTSTransformaion__2' conversion error: Conversion
invalid for datatypes on column pair 1 (source column 'Travel
time' (DBTYPE_WSTR), destination column 'TravelTime' (DBTYPE_R8)

So, it thinks it is a string coming in... but in fact it is a number
(float).

Now the IMEX=1 - I'm using that to get around null values which were
imported sometimes when the driver interpreted the Excel data type as
number (when it looks at the first 8 rows to get the datatype), but in
fact the data could be number or string, and was being put into the
database as a varchar..

However it is forcing this unknown type (of 1 or 2 rows) to become a
string.

I have tried: MAXROWSTOSCAN=0

and through the registry (http://support.microsoft.com/kb/189897/en-
us)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Excel
Select TypeGuessRows and on the Edit menu click Modify.
set to 0

This doesn't help

Question: Is there any way to force the driver to take the first type
and stick with that?

I guess the other solution is to make sure there is enough data in the
excel sheet.. dummy data which can be selected out after the import is
done.

Regards

Dave


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.