#1  
Old 25th January 2004, 04:44 PM
Lachlan Gemmell
 
Posts: n/a
Default Updating string fields with wider values

Hello there,

The following SQL statements result in the error message "Source string
data is too wide for the target field".

create table Person (
FullName char(20)
)

insert into Person (FullName)
values ('His most imperial highness and ruler of the left side of the
Galaxy, Porky the Pig')

I guess this is WAD however it doesn't match the behaviour of other DBs
like MySQL. Is it configurable perhaps?

Regards,

Lachlan
  #2  
Old 25th January 2004, 04:54 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Updating string fields with wider values

> I guess this is WAD however it doesn't match the behaviour of other
> DBs like MySQL. Is it configurable perhaps?


It is WAD, yes. Most DBs try to avoid losing data.

--


Eivind Bakkestuen [NDD]
Please, no email unless requested.
Search Borland and third-party newsgroups here: www.tamaracka.com



  #3  
Old 29th January 2004, 07:55 AM
Lachlan Gemmell
 
Posts: n/a
Default Re: Updating string fields with wider values

Good point. But it does mean that I have to manually trim data that may be
too long. MySQL trims it for you but I've since discovered Interbase
doesn't. Since I'm targeting all three DBs I guess I'd better get used to
it.

Regards,

Lachlan

On Sun, 25 Jan 2004 14:54:55 +1000, Eivind Bakkestuen [NDD]
<Ieivind.bakkestuenHATE@nexusdb.comSPAM> wrote:

>> I guess this is WAD however it doesn't match the behaviour of other
>> DBs like MySQL. Is it configurable perhaps?

>
> It is WAD, yes. Most DBs try to avoid losing data.
>


  #4  
Old 29th January 2004, 11:04 AM
bruhmhaendoll
 
Posts: n/a
Default Re: Updating string fields with wider values

> MySQL trims it for you

Yeah, MySQL is lax about a few thing, which is both good and bad.



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
updating portal host on remote pc Peter Sanders nexusdb.public.support.portal 5 13th July 2010 09:33 PM
Updating a value of a byte array field sid25 nexusdb.public.support.odbc 1 25th October 2009 06:28 PM
Connection string Tonig123 nexusdb.public.support.adoprovider 1 5th February 2009 06:50 AM
Updating In-Memory Tables Ken Randall nexusdb.public.support.sql 3 23rd January 2004 10:49 PM
Negative values in autoinc fields Robert nexusdb.public.support.sql 2 16th October 2003 11:31 PM


All times are GMT +11. The time now is 11:21 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.