OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Error Message in Base "Value too long in Statement"

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
AmaxStep1
General User
General User


Joined: 22 Sep 2008
Posts: 32
Location: Bucks

PostPosted: Sun Oct 12, 2008 6:12 am    Post subject: Error Message in Base "Value too long in Statement" Reply with quote

Hi,

I have attempted to create a new Database from a Table Exported from MS Access in Excel Format. This file has 21 Fields with some fields holding data at the max of 255 chrs.

During the Create process I get a Warning Message " Value too long in Statement" etc.

If I ignore this message and carry on the result of the table is as follows:

I have all 21 Field Headings, but only the first 12 (L to R) have the correct data in.

Is there a solution or is this spreadsheet too long for Base to cope with?.

Shocked
_________________
max
Back to top
View user's profile Send private message
QuazzieEvil
Super User
Super User


Joined: 17 Jan 2007
Posts: 599
Location: Houston, TX

PostPosted: Sun Oct 12, 2008 8:42 am    Post subject: Reply with quote

It seems the value for one of the columns is too long for the max chars specified.

example: some column may be VARCHAR(64) and you are trying to insert 65+ characters.
_________________
Free Docs @ http://www.baseprogramming.com/resources.html
Book @ lulu.com http://www.lulu.com/content/2455551
Back to top
View user's profile Send private message Visit poster's website
keme
Moderator
Moderator


Joined: 30 Aug 2004
Posts: 2910
Location: Egersund, Norway

PostPosted: Sun Oct 12, 2008 10:58 am    Post subject: Reply with quote

A frequent cause for this is incorrect termination of strings. You need to make sure that you use the same text delimiter for import that's been used for export. Sometimes text fields contain the character used as a text delimiter, and that may make the import fail too.
Back to top
View user's profile Send private message
karelc
General User
General User


Joined: 07 Jul 2006
Posts: 13
Location: Spain

PostPosted: Tue Oct 14, 2008 10:49 am    Post subject: Reply with quote

I received the same warning message ("Value too long in Statement...") today when I was trying to append records to a newly created table. The records I was copying from Calc contained exactly the same data fields as the table I was pasting them into except for the primary key field, which is an automatic number and therefore doesn't appear in the data I was appending. In the paste dialogue, one of the windows shows two columns, with the names of the fields copied from Calc on the left, and the names of the table fields on the right. In my case the primary key is the first field in the table record. The two columns looked something like this:

Field 1 .......... Key field
Field 2 .......... Field 1
Field 3 .......... Field 2

and so on. Because of the presence of the key field, the field names on the right appeared one line lower than in the column on the left. When I clicked on the Create button I received the "Value too long" warning message and the append operation failed.

I solved the problem by working the key field to the bottom of the right-hand column. I couldn't move it directly, but instead had to click on Field 1 and then on the Up arrow to move it above the key field. Then click on Field 2 and move it up too, and the same with all the other fields. In the end I had the key field at the bottom of the right-hand column. At that point the field names were aligned horizontally, and if I clicked on a field name in the right-hand column to select it, exactly the same field name was also highlighted in the left-hand column.

I clicked on Create, and the records were added to the table - slowly (about 20 minutes for 60,000 records), and with a worrying "program not responding" message appearing at the top of the screen while the append operation was in progress. But they got there in the end.

Hope this helps.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group