remove space

  • Thread starter Thread starter Georg
  • Start date Start date
G

Georg

hi,

how can i in ado.net remove all spaces in a name eg "S P A C E" must be
showed as "SPACE" . with a trim function ?

regards Georg
 
Georg said:
hi,

how can i in ado.net remove all spaces in a name eg "S P A C E" must
be showed as "SPACE" . with a trim function ?

regards Georg

ADO .NET has nothing to do with modifying a string value. ADO .NET is
simply the part of the .NET Framework Base Class Library that provides
classes for data access via providers like SQL, ODBC, OleDB, etc.

What you need is simply to utilize the String object's methods in whichever
..NET language you are using:

[VB .NET]
Dim startString As String = "S P A C E"
Dim resultString As String = startString.Replace(" ", "")

[C#]
String startString = "S P A C E";
String resultString = startString.Replace(" ", "");

-Scott
 
Scott M. said:
Georg said:
hi,

how can i in ado.net remove all spaces in a name eg "S P A C E" must
be showed as "SPACE" . with a trim function ?

regards Georg

ADO .NET has nothing to do with modifying a string value. ADO .NET is
simply the part of the .NET Framework Base Class Library that provides
classes for data access via providers like SQL, ODBC, OleDB, etc.

What you need is simply to utilize the String object's methods in
whichever .NET language you are using:

[VB .NET]
Dim startString As String = "S P A C E"
Dim resultString As String = startString.Replace(" ", "")

[C#]
String startString = "S P A C E";
String resultString = startString.Replace(" ", "");

-Scott
Hi Scott,
it works with replace in Vb.net

thnx, Georg
 
Back
Top