| .NET DotNet Forum Index » ADO .NET Forum » remove space... |
|
Page 1 of 1 |
|
| Author |
Message |
| Georg... |
Posted: Fri Oct 09, 2009 3:49 pm |
|
|
|
Guest
|
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 |
|
|
| Back to top |
|
|
|
| Mark Rae [MVP]... |
Posted: Fri Oct 09, 2009 4:04 pm |
|
|
|
Guest
|
"Georg" <georg at (no spam) sgreorgl> wrote in message
news:4acfaf5a$0$2859$ba620e4c at (no spam) news.skynet.be...
Quote: How can I in ADO.NET remove all spaces in a name eg "S P A C E" must be
shown as "SPACE" with a trim function?
You're confusing ADO.NET with a programming language like C# or SQL. ADO.NET
is a collection of components which .NET languages can use to interface with
RDBMS.
How you will achieve this will depend on what programming language you are
using to instantiate the various ADO.NET objects, and what RDBMS you're
pointing ADO.NET at...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net |
|
|
| Back to top |
|
|
|
| Scott M.... |
Posted: Fri Oct 09, 2009 4:19 pm |
|
|
|
Guest
|
"Georg" <georg at (no spam) sgreorgl> wrote in message
news:4acfaf5a$0$2859$ba620e4c at (no spam) news.skynet.be...
Quote: 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 |
|
|
| Back to top |
|
|
|
| Georg... |
Posted: Sat Oct 10, 2009 1:57 am |
|
|
|
Guest
|
"Scott M." <s-mar at (no spam) nospam.nospam> schreef in bericht
news:%23f%23mm5SSKHA.1236 at (no spam) TK2MSFTNGP05.phx.gbl...
Quote:
"Georg" <georg at (no spam) sgreorgl> wrote in message
news:4acfaf5a$0$2859$ba620e4c at (no spam) news.skynet.be...
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 to top |
|
|
|
|