ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Database Insert Failures

Post new topic  Reply to topic
 Database Insert Failures « View previous topic :: View next topic » 
Author Message
goldym
PostPosted: Tue Nov 01, 2005 9:20 am    Post subject: Database Insert Failures Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

I am using a compute node to insert data into a database table, every now and then we get an incoming field that is too long, longer than the VARCHAR(100) that is specified.

We decided to increase the field lenght to 150 or so, but is there any setting that will allow a partial insert and not cause the insert to fail and throw an exception?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 01, 2005 9:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If the incoming field is too big, then the problem is not in your flow, it's in the upstream application.

If your database field is too small, that's a different story.

The "setting" you want is the function "SUBSTRING".

But that causes data loss - as would any such setting. And the value of the data that will be lost needs to be considered - to determine if it is really useless.

If it is really useless, then the upstream app shouldn't be sending it.

If it's not really useless, then your field should be enlarged to hold it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
goldym
PostPosted: Tue Nov 01, 2005 9:32 am    Post subject: Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

[quote="jefflowrey"]If the incoming field is too big, then the problem is not in your flow, it's in the upstream application.

If your database field is too small, that's a different story.

The "setting" you want is the function "SUBSTRING".

But that causes data loss - as would any such setting. And the value of the data that will be lost needs to be considered - to determine if it is really useless.

If it is really useless, then the upstream app shouldn't be sending it.

If it's not really useless, then your field should be enlarged to hold it.

[/quote]

Thanks for responding, I gues the problem is the field is too small they don't want to fail any messages if this happens which they aren't expecting to happen but want to prepared if it does. I didn't know if there was something I could set on the compute node to just insert whatever it could and then just truncate the remainder.
Back to top
View user's profile Send private message
wschutz
PostPosted: Tue Nov 01, 2005 10:42 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Sounds dangerous to me. Jeff's answer (substring) is the best way to handle it. But I'd get in writing (and keep in a safe place) that is the behaviour that's wanted. Also, perhaps it would made sense to detect the fact that this is happening and report it somewhere (log, q, db ...etc).
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Database Insert Failures
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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.