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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:52:49+00:00 2026-05-25T11:52:49+00:00

I have this code and it evaluates to false instead of a string. All

  • 0

I have this code and it evaluates to false instead of a string. All its doing is building a string. Any ideas why?

 Dim statement As String = "Insert into table dbo.IV00101 values(" +
        "ITEMNMBR=" + "@ITEMNMBR" + "," +
        "ITEMDESC=" + "@ITEMDESC" + " , " +
        "NOTEINDX=" + "@NOTEINDX" + "," +
        "ITMSHNAM=" + DBNull.Value + "," +
        "ITEMTYPE=" + "1" + "," +
        "STNDCOST=" + "@STNDCOST" + "," +
        "CURRCOST=" + "@CURRCOST" + "," +
        "ITEMSHWT=" + "0" + "," +
        "DECPLQTY=" + "3" + "," +
        "DECPLCUR=" + "3" + "," +
        "ITMTSHID=" + DBNull.Value + "," +
        "TAXOPTNS=" + "1" + "," +
        "IVIVINDX=" + "0" + "," +
        "IVIVOFIX=" + "0" + "," +
        "IVCOGSIX=" + "0" + "," +
        "IVSLSIDX=" + "0" + "," +
        "IVSLDSIX=" + "0" + "," +
        "IVSLRNIX=" + "0" + "," +
        "IVINUSIX=" + "0" + "," +
        "IVINSVIX=" + "0" + "," +
        "IVDMGIDX=" + "0" + "," +
        "IVVARIDX=" + "0" + "," +
        "DPSHPIDX=" + "0" + "," +
        "PURPVIDX=" + "0" + "," +
        "UPPVIDX=" + "0" + "," +
        "IVRETIDX" + "0" + "," +
        "ASMVRIDX=" + "0" + "," +
        "ITMCLSCD=" + DBNull.Value + "," +
        "ITMTRKOP=" + "1" + "," +
        "LOTTYPEAC=" + DBNull.Value + "," +
        "KPERHIST=" + "0" + "," +
        "KPTRXHST=" + "0" + "," +
        "KPCALHST=" + "0" + "," +
        "KPDSTHST=" + "0" + "," +
        "ALWBKORD=" + "0" + "," +
        "VCTNMTHD=" + "1" + "," +
        "UOMSCHDL=" + "@UOMSCHDL" + "," +
        "ALTITEM1=" + DBNull.Value + "," +
        "ALTITEM2=" + DBNull.Value + "," +
        "USCATVLS_1=" + DBNull.Value + "," +
        "USCATVLS_2=" + DBNull.Value + "," +
        "USCATVLS_3=" + DBNull.Value + "," +
        "USCATVLS_5=" + DBNull.Value + "," +
        "USCATVLS_4=" + DBNull.Value + "," +
        "USCATVLS_6=" + DBNull.Value + "," +
        "MSTRCDTY=" + "1" + "," +
        "MODIFDT=" + Date.Today.ToString() + "," +
        "CREATDDT=" + Date.Today.ToString() + "," +
        "WRNTYDYS=" + "0" + "," +
        "PRCLEVEL=" + DBNull.Value + "," +
        "LOCNCODE=" + DBNull.Value + "," +
        "PINFLIDX=" + "0" + "," +
        "PURMCIDX=" + "0" + "," +
        "IVINFIDX=" + "0" + "," +
        "INVMCIDX=" + "0" + "," +
        "CGSINFLX=" + "0" + "," +
        "CGSMCIDX=" + "0" + "," +
        "ITEMCODE=" + DBNull.Value + "," +
        "TCC=" + DBNull.Value + "," +
        "PriceGroup=" + DBNull.Value + "," +
        "PRICMTHD=" + "1" + "," +
        "PRCHSUOM=" + DBNull.Value + "," +
        "SELNGUOM=" + DBNull.Value + "," +
        "KTACCTSR=" + "0" + "," +
        "LASTGENSN=" = DBNull.Value + "," +
        "ABCCODE=" + "1" + "," +
        "Revalue_Inventory=" + "1" + "," +
        "Tolerance_Percentage=" + "0" + "," +
        "Purchase_Item_Tax_Schedu=" + DBNull.Value + "," +
        "Purchase_Tax_Options=" + "1" + "," +
        "ITMPLNNNGTYP=" + "1" + "," +
        "STTSTCLVLPRCNTG=" + "0" + "," +
        "CNTRYORGN=" + DBNull.Value + "," +
        "INACTIVE=" + "0" + "," +
        "MINSHELF1=" + "0" + "," +
        "MINSHELF2=" + "0" + "," +
        "INCLUDEINDP=" + "0" + "," +
        "LOTEXPWARN=" + "0" + "," +
        "LOTEXPWARNDAYS=" + "0" + "," +
        "LASTGENLOT=" + DBNull.Value + "," +
        "Lot_Split_Quantity=" + "0.00000" + "," +
        "DEX_ROW_TS=" + Date.Today.ToString() + "," +
        "DEX_RoW_ID=" + "@DEX_RoW_ID" +
        ")"
  • 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-25T11:52:49+00:00Added an answer on May 25, 2026 at 11:52 am

    As I mentioned in comment, you have a typo in your string concatentations:

    "KTACCTSR=" + "0" + "," +
    "LASTGENSN=" ***=*** DBNull.Value + "," +
    "ABCCODE=" + "1" + "," +
    

    Changing that to a + should get you going again.

    With the = in place, it was just comparing the two strings for equality (which of course is false) and then converting that result into the string "False".

    There a couple ways to avoid this kind of snafu in the future. One is to put Option Strict On at the top of the file, which will warn you about this kind of thing. Another would be use smaller, more manageable string chunks, so that each one has a lower probability of being the problem.

    In terms of debugging something like this, I compiled the code, then opened it using ILSpy. It showed the code being generated (i.e. the string compare) as well as which strings were actually being compared. Seeing that made it easy to locate the offending = (since it appeared right after the end of the first argument to the string comparison.)

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

Sidebar

Related Questions

I have code like this: Type typPrecise = MostPrecise(typeof(int), typeof(double));//Evaluates to double var varGeneric
The following code fails in 'Evaluate' with: This expression was expected to have type
I have this code in jQuery, that I want to reimplement with the prototype
I have this code: chars = #some list try: indx = chars.index(chars) except ValueError:
I have this code that performs an ajax call and loads the results into
I have this code #include <iostream> using namespace std; int main(int argc,char **argv) {
I have this code: CCalcArchive::CCalcArchive() : m_calcMap() { } m_calcMap is defined as this:
I have this code: myVariable which I want to change into trace(myVariable: + myVariable);
I have this code while($row = mysql_fetch_row($result)) { echo '<tr>'; $pk = $row[0]['ARTICLE_NO']; foreach($row
I have this code <?php session_start(); if (isset($_GET[cmd])) $cmd = $_GET[cmd]; else die(You should

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.