INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

"Item does not pass validation test" in relation with thread144-425622

"Item does not pass validation test" in relation with thread144-425622

"Item does not pass validation test" in relation with thread144-425622

(OP)
thread144-425622: Item "" does not pass validation test?
Another reason for "Item does not pass validation test" error message to occur.
If your column size is bigger in database table but the corresponding column is shorter in your datawindow then this error appears. In my case the DB (ORacle) table column size was 6 characters with 4 characters + two spaces and datawindow had only size of 4 this error came up. I had to trim the column for trailing 2 spaces. Then it worked.
I am writing this as the trailing two spaces was little harder to find if you are new to PB

RE: "Item does not pass validation test" in relation with thread144-425622

Only intended as an addtional information on how to do stuff (it's just my little opinion):
-----------------------------------------------------------------------------------------
If your database column size is bigger than the size allowed in your column in the datawindow, the normal thing would be to increment the size (limit) of your column in the database, instead of doing trim of every case that gets you into trouble.

The trimming - by script - is unnecessary if you can 'always' trim trailing blanks, which is advisable since I've seen users that "couldn't type anything" since the full field length was already filled up with blanks. Since they don't show (that's why they call them white space), they're normally unwanted anyway.

You can use :

1 - the database settings of Oracle to achieve a 'trimmed' output always, like you can tell your DB administrator to set the "blank_trimming" property to TRUE on your Oracle database/Schema. Seem to remember it might be posible to do so only on certain tables or event certain fields of tables. (don't shoot me if I'm wrong).
2 - you can do a "SET TRIMOUT ON" using 'execute dynamic' (don't remember if this has to be before or after connecting to the database from powerscript).
3 - or your can use dbparm="trimspaces=1" when connecting from powerbuilder, though this one has to be taken into consideration when reading: http://infocenter.sybase.com/help/index.jsp?topic=... , especially for the part where they talk about doing an "update" or "delete" that might give 'rows changed between retrieve and update' error message. (that one might be solved using the 'ResetUpdate()' function right after retrieval from the database
----------------:

ODBC database interface Some ODBC drivers, such as SQL Anywhere, trim trailing spaces before the data reaches the fetch buffer—even when TrimSpaces is set to 0.

If your DBMS makes a distinction between Char data with trailing spaces and Char data without trailing spaces when evaluating a WHERE clause expression, you might receive the message Row changed between retrieve and update when your DataWindow object’s update properties are set to “Key and updateable columns.” To prevent this, change your DataWindow object’s update properties. In embedded SQL, you can check Sqlca.Sqlnrows after each update to determine if the update took place. Avoid using Char data columns in the WHERE clause of an UPDATE or DELETE statement when TrimSpaces=1.

regards,
Miguel L.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close