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 140083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:33:04+00:00 2026-05-11T07:33:04+00:00

I have the following code on an ASP page: <% QueryToJSON(conn, execute WebGetEmployeesPlanned’ +Request.QueryString(customercode)+’,

  • 0

I have the following code on an ASP page:

<%     QueryToJSON(conn, 'execute WebGetEmployeesPlanned''     +Request.QueryString('customercode')+'',      ''+Request.QueryString('lang')+'',      ''+Request.QueryString('date')+''').flush %> 

There is no other code on this page except some includes, as I call this page with ajax from another page, using $.getJSON()

The problem is that I don’t know how I can send NULL as one of the parameters to the SP.

Sometimes Request.QueryString(‘customercode’) will be empty. I need to know how I can put that in the code above to make the SP see this parameter as NULL.

I have access to the SP code so I can change something on that side to convert an empty string to null.

Thanks in advance.

  • 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. 2026-05-11T07:33:04+00:00Added an answer on May 11, 2026 at 7:33 am

    You’re on the right track. Query string parameters are just strings. So you have to choose a string representative for NULL which won’t conflict with any of the actual string values you will be sending. You could use empty string, ‘null’, or ‘Thomas’s special null flag’; it doesn’t matter. There is no ‘official’ representation of NULL in a query string parameter.

    Update: no, I don’t think the stored procedure is the place to handle this translation. The reason is that the fact that you are converting your string representation of the null in the query string parameter to a ‘real’ null is something that you have to do because of the limitations of what you can put into a query string parameter. Doing this conversion in the stored procedure would make the procedure, to some degree, ‘aware’ of the query string, and that doesn’t feel right. Instead, I would do it in the aspx markup, which is expected to be web-aware. Here’s a source example (untested, so fix my syntax errors or, better, change to string.Format() or a parameterized query…

    Change:

    QueryToJSON(conn, 'execute WebGetEmployeesPlanned'' +Request.QueryString('customercode')+'',  ''+Request.QueryString('lang')+'',  ''+Request.QueryString('date')+''').flush 

    to:

    QueryToJSON(conn, 'execute WebGetEmployeesPlanned '     + (string.IsNullOrEmpty(Request.QueryString('customercode')) ?           'null, ''           :           ''' + Request.QueryString('customercode') + '','')     +Request.QueryString('customercode')+'',      ''+Request.QueryString('lang')+'',      ''+Request.QueryString('date')+''').flush 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 149k
  • Answers 149k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use void notMethod(Foo::mapType::iterator it) { // ... } and put… May 12, 2026 at 9:29 am
  • Editorial Team
    Editorial Team added an answer It seems that some backends are leaking memory. Try setting… May 12, 2026 at 9:29 am
  • Editorial Team
    Editorial Team added an answer Yes Eclipse contains it's own incremental compiler. An incremental Java… May 12, 2026 at 9:29 am

Related Questions

I have the following code on an ASP page: <% QueryToJSON(conn, execute WebGetEmployeesPlanned' +Request.QueryString(customercode)+',
I need to create a group of DropDownList s to show and allow change
I've been doing some research on how to globally handle errors in my ASP.NET
I have jquery code that is being reused by a repeatable partial view on
This is a follow up question to that at Can I create a HTML

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.