Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / January 2004

Tip: Looking for answers? Try searching our database.

programmatic data importing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bernard - 27 Jan 2004 12:21 GMT
I have an application which programatically imports data
from excel spreadsheets. When I run this on my home PC it
works normally.

However, When I run exactly the same application on
another PC with exactly same data I get the following
error message.

"The field is too small to accept the amount of data you
attempted to add. Try inserting less data."

I have checked all the datatypes and the incoming data and
I cannot find the answer.

Any ideas!

Thanks in anticipation.
John Nurick - 27 Jan 2004 20:57 GMT
Hi Bernard,

What versions of Access and Excel are installed on the two machines?

>I have an application which programatically imports data
>from excel spreadsheets. When I run this on my home PC it
[quoted text clipped - 13 lines]
>
>Thanks in anticipation.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
- 27 Jan 2004 21:40 GMT
Both machines are running office 97 professional edition,
one under win 98 and on under NT.
>-----Original Message-----
>Hi Bernard,
[quoted text clipped - 24 lines]
>Please respond in the newgroup and not by email.
>.
John Nurick - 28 Jan 2004 06:14 GMT
Are you trying to import the identical worksheets both at home and in
the office?

One possible cause is that one of the worksheets has cells containing
more than 255 characters. When Access imports from Excel it creates
field types based on what it finds in the first few rows of the data.
For text shorter than 255 characters, Access creates a text field. If it
then encounters a field further down the table that contains more than
255 characters, the data will not fit in the field.

To overcome this, make sure that one of the first records contains more
than 255 characters. This forces Access to create a memo field.

On Tue, 27 Jan 2004 13:40:34 -0800,

>Both machines are running office 97 professional edition,
>one under win 98 and on under NT.
[quoted text clipped - 29 lines]
>>Please respond in the newgroup and not by email.
>>.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
- 31 Jan 2004 13:43 GMT
I have found the problem.

The application keeps a copy of the file name and path of
the data which is being imported, and displays this in an
import history file. Unfortunately, I had set this field
to a length of 50 characters and this worked fine with the
short paths on my home pc but caused a problem with the
much longer paths used on the corporate servers.

Thank you for your response which I have noted for future
reference.

Bernard Salter.

>-----Original Message-----
>Are you trying to import the identical worksheets both at home and in
[quoted text clipped - 51 lines]
>Please respond in the newgroup and not by email.
>.
John Nurick - 31 Jan 2004 18:23 GMT
Hi Bernard,

Glad you got it sorted out.

50 characters is short for a path these days even on a home computer,
particularly in a standard Windows 2k/XP installation where many
document paths start with "C:\Documents and Settings\UserName\My
Documents\" before the user's own folder structure even begins.

Since Access only stores the actual contents of the field it doesn't
waste any disk space if you use a 255 character text field to store
paths (and it's appropriate, because Windows paths can be up to 255
characters long).

On Sat, 31 Jan 2004 05:43:57 -0800,

>I have found the problem.
>
[quoted text clipped - 76 lines]
>>Please respond in the newgroup and not by email.
>>.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.