programmatic data importing

  • Thread starter Thread starter Bernard
  • Start date Start date
B

Bernard

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.
 
Both machines are running office 97 professional edition,
one under win 98 and on under NT.
-----Original Message-----
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
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 [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
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.



Both machines are running office 97 professional edition,
one under win 98 and on under NT.
-----Original Message-----
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
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 [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
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
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.
Both machines are running office 97 professional edition,
one under win 98 and on under NT.
-----Original Message-----
Hi Bernard,

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

On Tue, 27 Jan 2004 04:21:58 -0800, "Bernard"

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 [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
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).

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
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.
Both machines are running office 97 professional edition,
one under win 98 and on under NT.
-----Original Message-----
Hi Bernard,

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

On Tue, 27 Jan 2004 04:21:58 -0800, "Bernard"

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 [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
Back
Top