Actually - I just changed the following code from this
If oRS.Fields("content") = "NULL" Then
varContent = " "
Else
varContent = oRS.Fields("content")
End If
to this
haystack = oRS.Fields("content")
result = InStr(haystack, "NULL")
If result = 0 Then...
It appears that the values in the table are just NULL with no quotes around them or spaces before or after them. I'm not trimming any of the output so if there was a space somewhere it should show up right?
Actually, oRS is part of the first recordset that is looped through and photoRS is a second recordset that is looped through while still inside of the oRS recordset loop. The problem is that I can do a Response.Write of all fields and have them print to the screen but I am having trouble with...
Yes, here is the code that I am using...don't laugh...beginner here and all that
<%
Sub ShowListing(varSubCategory)
dim conn
dim strconn
dim photoconn
dim strphotoconn
strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & _
Server.MapPath("cms/betco/betco.mdb")...
OK, this is weird...
I just inserted the following code:
If oRS.Fields("content") = "NULL" Then
varContent = " "
Else
varContent = oRS.Fields("content")
End If
And what happens is if oRS.Fields = "NULL" then it does set varContent as a space (i.e. " "). If oRS.Fields <> "NULL" then...
OK. I just inserted a simple Response.Write for the oRS.Fields("content") variable and when I run my web page I get pretty much what I expect:
Where there is content to display it displays the content. Where there is not content to display it displays the word NULL.
If it prints out NULL when...
Basically what I am after with this code is the ability to "filter" out values that are "NULL" so that they don't display on the resulting web page. If the variable oRS.Fields("content") is not "NULL" then place it in the variable named varContent for writing to the web page, if...
Actually, at this point I am not sure about anything. When I was inserting values into my Access 2000 database tables, I was using a function that would convert empty fields into a string literal "NULL" before insertion into the database. I had found the vbscript function on the net and it...
Hello Everyone,
I am having a little problem with the following code and was wondering if anyone could help me out:
If IsNull(oRS.Fields("content")) Then
varContent = " "
Else
varContent = oRS.Fields("content")
End If
When testing the output of varContent with IsNull function they...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.