[VBE.NET] Spaties achter velden uit databinding

Pagina: 1
Acties:
  • 45 views sinds 30-01-2008

  • WimB
  • Registratie: Juli 2001
  • Laatst online: 30-03-2024
Als ik in Visual Basic .NET Express 2005 een formulier met een databinding, dan wordt alle data in de tekstvelden getoond met allemaal spaties achter. Ik werk met een SQL 2005 MDF bestand.

Als ik bijvoorbeeld in de database een nchar(25) gebruik en ik sla een naam van 10 karakters op, dan krijg ik er in mijn VB.NET programma nog 15 spaties bij.

Is er een manier om deze extra spaties niet op mijn formulier te tonen?

  • Slagroom
  • Registratie: Juni 2001
  • Laatst online: 04-12-2025
varchar(15) gebruiken... had ik ook last van

  • NMe
  • Registratie: Februari 2004
  • Laatst online: 15-04 22:07

NMe

Quia Ego Sic Dico.

Unicode Character Strings

nchar

Fixed-length Unicode data with a maximum length of 4,000 characters.

nvarchar

Variable-length Unicode data with a maximum length of 4,000 characters. sysname is a system-supplied user-defined data type that is functionally equivalent to nvarchar(128) and is used to reference database object names.

ntext

Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters.
Gewoon even de documentatie lezen dus.

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.


Dit topic is gesloten.