Re: Too many fields for Excel

Tech-Archive recommends: Speed Up your PC by fixing your registry




""Jialiang Ge [MSFT]"" <jialge@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:zuHXb9PLJHA.4620@xxxxxxxxxxxxxxxxxxxxxxxxx
Good morning everyone.

I think the error "Too many fields defined" thrown by the statement:

"Insert Into [Sheet1$] (F1,F2,F3,F4,F5, ~ ,F255,F256) Values
(62.94176,53. ~ 0,0,0,0,0,0)"

is majorly caused by a limit of Microsoft Jet database engine:
http://support.microsoft.com/kb/199076
The Microsoft Jet database engine has an internal limit of 255 fields per
query. In other words, even if the client is upgraded to Excel 2007, the
error will still be thrown.

As the KB article documented, two workarounds are:
1. Break down the update query into multiple update/insert queries.
2. Update the fields by using a recordset in Visual Basic for
Applications.

Apart from them, we may also consider Office automation in this Office
related issue. Office automation will allow us to automate Excel to add
values in the specified cell ranges. But it has two weaknesses: 1.
Performance; 2. The computer that runs the app needs to be installed with
Office.

Regards,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.


I can't use Automation because this program is part of ASP.NET project.

There's a 3rd party tool that works a lot better then OleDb, since you can
update any cell and it has no problem updating 256 columns and no Automation
needed.

http://www.tmssoftware.com/site/flexcel.asp


.


Quantcast