ADO.Net Excel Field Size Limit

  • Thread starter Thread starter Stewart Armbrecht
  • Start date Start date
S

Stewart Armbrecht

We have found that when you populate and or select from an excel file using
ado.net, ado.net will only insert and or select 255 characters from an excel
field? Does anyone know how to get around this limitation?
 
¤ We have found that when you populate and or select from an excel file using
¤ ado.net, ado.net will only insert and or select 255 characters from an excel
¤ field? Does anyone know how to get around this limitation?
¤

Try change the TypeGuessRows value of the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel key in the Registry to a value from
eight to 16. This is the number of rows the driver will scan in order to determine the data type for
the field. If the column for any of the first eight rows doesn't have more than 255 characters then
the column type will not be correct.

If the Excel worksheet doesn't contain a large amount of data you can set TypeGuessRows to 0. This
will scan all rows in order to determine the appropriate data type.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top