Source language: Translate to:

Using Editfields (String length char-fields)

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Using Editfields (String length char-fields)

Postby christian » Fri Jul 27, 2007 3:52 am

Hello!

When using a edit-mask for editing datafields, after reading the contents of an record, all fields are filled with blank spaces, belonging to the fieldsize.

It would be nice if the fields could be right-trimmed, as the "old" NBdb-Plugin does. So the cursor is placed after the last character and not after all that spaces.

Thanks,
Christian
Last edited by christian on Tue Jul 31, 2007 4:00 am, edited 2 times in total.
User avatar
christian
 
Posts: 39
Joined: Sat Apr 02, 2005 9:25 am
Location: Germany

Postby Neosoft Support » Fri Jul 27, 2007 1:28 pm

Are you using a Text Entry field or the edit mask assigned to the grid?

What edit mask are you using?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby christian » Sat Jul 28, 2007 3:16 am

... the automatically by NB produced and pasted from the clipboard ones... After dbpOpenTable: "Would you like to create text entry fields ...?".
Thanks Christian

{NeoBook 5 Objects}
NeoBookVer=5,54
ObjectType=9
Name=gruppe
X=76
Y=36
W=300
H=24
Anchor=0
VarName=[drcrr.artikel.gruppe]
EditLen=35
LineColor=0
LineWidth=1
LineStyle=0
FillColor=16777215
FillPattern=0
Font=Arial
FontSize=8
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=38
User avatar
christian
 
Posts: 39
Joined: Sat Apr 02, 2005 9:25 am
Location: Germany

Postby Neosoft Support » Mon Jul 30, 2007 5:26 pm

I think this might be a function of the database or field type you're using. I don't have Postgres, but this doesn't happen with MS Access or other databases that I can tell. Also, the Char field type is interpreted by some databases as fixed-width character field. The String field type is interpreted as variable-width character field. Different databases may store these types differently. Maybe Postgres is padding the fixed-width field type?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby christian » Tue Jul 31, 2007 3:51 am

Hello,
you are right :D , the problem belongs to char()!
When using varchar() it works.
So I will change my database structure for further use, it's no problem because I have not to alter my program-code.
Thanks! Christian

PostgreSQL-example:
CREATE TABLE XXX
(
menuein char(32),
idatum date,
ibestand varchar(5), <========= that works fine!
upload char(1),
)
User avatar
christian
 
Posts: 39
Joined: Sat Apr 02, 2005 9:25 am
Location: Germany


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest