Field Space Padding


Author
Message
Fred Seider
Fred Seider
StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)
Group: Forum Members
Posts: 3, Visits: 11
I can't seem to eliminate trailing spaces being padded onto my bound text boxes.  The data type is nvarchar(50), and I always end up with spaces padded after my field data, up to a total of 50.  Even after I Edit the field, remove the spaces, and save it.  If I open the dialog again, and go to edit the field, I have the space padding again!  If I go into the datbase directly, I see the field data truly is padded.   I looked at the sample apps, and it looks like I'm set up the same way, but no doubt I am missing something here.

Thanks in advance for any assistence!

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Well, it might be that the column was originally nchar(50), and when you changed it to nvarchar(50), it didn't get changed.  There isn't anything in the business object that would add trailing spaces to pad the field.  Most likely, it's something in the database column. 

To make sure that it's the database, you can turn on debug mode for the data source (search this forum for SetDebugOn and you'll find several samples on how to do that), then look at the debug file for the UPDATE call.  The parameters will be listed and you should be able to tell whether the value is padding while being saved.  If the value in the debug file is correct, then you've got something in your database that is doing it.

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If you're running it through a stored procedure or anything, if the parameter is nchar(50) or char(50), it will pad it when passing it through the parameter.
Fred Seider
Fred Seider
StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)
Group: Forum Members
Posts: 3, Visits: 11
Ah! I think that's the problem.  Thanks!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search