Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 561309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:26:11+00:00 2026-05-13T12:26:11+00:00

I am coding simple 404 seo for my website. I am little confused at

  • 0

I am coding simple 404 seo for my website. I am little confused at one point. I need codes to go over categories table and see if it matches with the string. If yes, then it should print category’s name, if not then it should display “page not found” message. I dont understand where I went wrong here…

> > <%
> >     WebsiteQueryString = Request.QueryString
> >     SplitQueryString = split(WebsiteQueryString, "/")
> > 
> >     SQL = "SELECT C.CATEGORYID,
> > C.CATEGORYNAME"     SQL = SQL & " FROM
> > CATEGORIES C"   Set objCategory =
> > objConn.Execute(SQL)    
> > 
> >     If objCategory("CATEGORYID") =
> > SplitQueryString(4) Then     %>
> > 
> > <%=objCategory("CATEGORYNAME")%>
> > 
> > <% Else %>
> > 
> 
>     enter code here`page not found.
> 
> > 
> > 
> > <% End If %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:26:12+00:00Added an answer on May 13, 2026 at 12:26 pm

    Some hints:

    1/ use cInt (or cStr)

    If objCategory("CATEGORYID") = SplitQueryString(4) Then   
    

    If SplitQueryString(4) is a number, try putting cInt( before both operands as in

    If cInt(objCategory("CATEGORYID")) = cInt(SplitQueryString(4)) Then   
    

    If have come across situations where I needed to do this to have a good comparison.

    2/ try writing the values on screen before you compare them (are you sure you are comparing with the correct element ?)

    Response.Write( "[" & objCategory("CATEGORYID" & "]")
    Response.Write( "[" & SplitQueryString(4) & "]" )
    

    I always put brackets around them as to see if an empty string is present

    3/ Test for IsNull()

    Try testing for IsNull() for your objCategory("CATEGORYID") , since I think field values are Null if not present in the record

    4/ Make sure you use the correct field name (CATEGORYID) – check spelling

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm coding a simple little class with a single method send an email. My
I'm coding simple game which I plan to make multiplayer (over the network) as
I'm having trouble coding a simple task for loop. What I need for the
Im coding a simple c/gtk+ app connected to a mysql database. The gui and
I am coding a simple login UserControl with two TextBoxes (Username and Password) and
I'm coding a simple websocket server on netty. Before a client connection has been
I'm coding a simple android application which contains a list, populated with a SimpleCursorAdapter.
I new with jquery and I can do simple coding with it. and I
I am coding on a simple game and writing the *.xsd file. My Problem
I'm expanding my php and general coding knowledge by writing my own 'simple' CMS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.