ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 24th, 2003, 06:52 AM
aliaga61 aliaga61 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 63 aliaga61 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 45 sec
Reputation Power: 6
stripping down database results

i have a record that is returned by the database as domain/username. i want to be able to strip off "domain/" and just display "username". is this possible? if so, how would i go about doing this?

Reply With Quote
  #2  
Old November 24th, 2003, 07:44 AM
kkong's Avatar
kkong kkong is offline
Monkey Magic
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: UK
Posts: 103 kkong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to kkong
Hi,

this should do the trick

Code:
Dim lsTemp

lsTemp = Split(nameofrecordvar,"/")

Response.Write lsTemp(1)


Kong.

Reply With Quote
  #3  
Old November 24th, 2003, 07:55 AM
aliaga61 aliaga61 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 63 aliaga61 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 45 sec
Reputation Power: 6
i tried implementing it with what i have... but it didn't work. cmuser is the field that i am referring to...the format is "domain/username" i want to just display username

StrSQL = "Select Distinct CMUSER, CMLDAT, CMDENY, CMEXPD, CMLLOG, CMHITS from tblUserInfo where CMUSER='" & trim(session("strUserID")) & "'"
Set adoRSWEBtest = adoConnWEBtest.Execute(StrSQL)

Dim lsTemp

lsTemp = Split(CMUSER,"/")

%>

<table width=75% cellspacing='1px'>
<th class='Main'>
<span id='SpaceImg'>
<img src='Graphix/spacer.gif' width='600px' height='0px' valign='top'>
<br></span>
Account Summary & Statistics
<br>
<span id='SmNote'><% =lsTemp(1) %></span>
</th>
</tr>

Reply With Quote
  #4  
Old November 24th, 2003, 09:36 AM
kkong's Avatar
kkong kkong is offline
Monkey Magic
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: UK
Posts: 103 kkong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to kkong
Hi,

you need to reference the sql query var as well. Something like this should work:

Code:

lsTemp = split(adoRSWEBtest("CMUSER"),"/")


Kong.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > stripping down database results


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT