Hi pelican,
"pelican" <pelican@discussions.microsoft.com> schrieb im Newsbeitrag
news:B934365A-55D4-4006-9793-EC4983F10977@microsoft.com...
[quoted text, click to view] > Hi!
> I have a text file over 70000 lines, some lines are long some are short.
> I tried to import this text file into SQL, but all it did was to take the
> shortest line as the width and truncated the long times. Though I have in
> the "transform" to change the field to varchar and length to 1000, it
> still
> truncated the long lines. Very frustrating. Any idea?
the provider tries to guess the needed size for its buffers, which are AFAIK
allocated in 255 byte chunks. To decide this it scans some rows depending on
a regkey with a default of 25.
When the long lines are below 25, the data would be truncated.
Solution 1: change the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Text\MaxScanRows
and set the value to 0
This should force the provider to scan the hole file. But this would be a
general performace loss.
Solution 2: Insert a dummy row at the beginning, iwth max length values for
all columns > 255
Please let me know if this worked for you
Helge