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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:30:42+00:00 2026-05-31T01:30:42+00:00

We have a legacy component that has been converted from VB6 to VB.Net. The

  • 0

We have a legacy component that has been converted from VB6 to VB.Net.

The VB component was called from an ASPX page using Request(“param”) to pass optional parameters to function calls. That means the value is null/nothing if the parameter is not present.

The parameters were then added to an ADODB call of a store procedure using Parameters.Append.

When used from VB6 missing, Request(“param”) values were coerced into empty strings when passed to the VB6 component. This meant that the ADODB call was satisfied (for required parameters).

When the code was ported to VB.Net, the null Request(“param”) values are now passed as null values (VB nothing?) and Parameters.Append skips adding the value if it is nothing. This caused the stored procedure calls to break as a required param was missing.

My question is:

If we change the component’s function parameters to be optional and have paramname as string = "" defaults, will a null/nothing value be converted to an empty string, or is null/nothing treated differently to a parameter being simply missing?

Apologies for the use of the term null, but 99% of my work is C# 🙂

  • 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-31T01:30:44+00:00Added an answer on May 31, 2026 at 1:30 am

    If you pass Nothing as the argument for an Optional String parameter that defaults to an empty string, the variable inside the method will have a value of Nothing. It will not have the value of an empty string. They are two different values, because strings in .Net are reference types. You should add code to top of the method to replace Nothing for those parameters with an empty string.

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

Sidebar

Related Questions

I have a legacy VB6 application that was built using MSDE. As many client's
We have a legacy VB6 component that was com+/MTS and is used by asp
I have legacy asp.net 1.1 website. It has a very poor VB layered achitecture.
I have a legacy C++ module that offers encryption/decryption using the openssl library (DES
We have a legacy VB6 application that updates itself on startup by pulling down
I have legacy COM component, and my mission is to write web service that
I have a legacy app that can display crystal reports to the user, using
I have legacy code that is using an enum as a range and iterating
We have a legacy VB6 application which has worked just fine on Windows XP
We have a legacy code that uses MSXML2 with vb6 that works fine. Lately

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.