#1 (permalink)  
Old 07-20-04, 03:57 AM
peejay peejay is offline
New Member
 
Join Date: Jul 2004
Location: Philippines
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Question Asp

how would you know that there is no value in the database field you have retrieved? I have a code here and it doesn't work:

<%
If oRs.Fields("projmgr") = "" Then
response.Write("No Selection")
Else
response.Write oRs.Fields("projmgr")
End If
%>
__________________
peejay
Reply With Quote
  #2 (permalink)  
Old 07-26-04, 06:10 PM
Naresh Rohra Naresh Rohra is offline
Newbie Coder
 
Join Date: Jun 2004
Location: India
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Try some built-in functions

Your code should work. But sometime (may be) it depends on the field’s Datatype. Try with some functions like IsEmpty, IsNull, IsDate etc.
Reply With Quote
  #3 (permalink)  
Old 07-28-04, 03:51 PM
Mikeirv Mikeirv is offline
Newbie Coder
 
Join Date: May 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
if you do this:

<%
If oRs.Fields("projmgr") & "" = "" Then
response.Write("No Selection")
Else
response.Write oRs.Fields("projmgr")
End If
%>

it will work no matter what the data type
Reply With Quote
  #4 (permalink)  
Old 08-01-04, 10:43 PM
peejay peejay is offline
New Member
 
Join Date: Jul 2004
Location: Philippines
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
:=) thanks!

thanks mikeirv. It worked!
__________________
peejay
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Server object error 'ASP 0177 : 800401f3' violet ASP 3 09-02-04 09:02 PM
Whats best asp or php ? BoGuS PHP 4 07-16-04 01:22 PM
Email interaction through ASP vnpneo ASP 1 06-26-04 01:37 PM
Can ASP check registry janice_2k ASP 0 05-31-04 03:28 AM
PHP integrated with ASP Mikeirv PHP 7 05-25-04 05:00 AM


All times are GMT -5. The time now is 02:59 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.