<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic lineItems load from database C# in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/lineItems-load-from-database-C/m-p/72417#M44729</link>
    <description>&lt;P&gt;I am trying to load info from a database into "lineItems". Like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                        lineItems[intLoop] = new lineItemType
                        {
                            itemId = "1",
                            name =  strItem,
                            quantity = intQty,
                            unitPrice = decPrice
                        };&lt;/PRE&gt;&lt;P&gt;If I set&amp;nbsp;&lt;/P&gt;&lt;P&gt;strItem="Another test description";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;before the lineItems, it WORKS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reading a value from the database with spaces in the name,&lt;/P&gt;&lt;P&gt;I put that into a variable string, a few examples&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                    strItem = String.Format("\"{0}\"", str5_Item);&lt;/PRE&gt;&lt;PRE&gt;var response = controller.GetApiResponse();&lt;/PRE&gt;&lt;P&gt;I get a&amp;nbsp;&lt;/P&gt;&lt;P&gt;response is null .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However if I read from database a field with no spaces, it all WORKS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the strItem above has spaces in it, I get a response is null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suggestions on how to read a column data with SPACES in the field and put that value into&amp;nbsp;&lt;/P&gt;&lt;P&gt;the "NAME" listed above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;P&gt;Steve2301&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 05 Jul 2020 17:33:09 GMT</pubDate>
    <dc:creator>steve2301</dc:creator>
    <dc:date>2020-07-05T17:33:09Z</dc:date>
    <item>
      <title>lineItems load from database C#</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/lineItems-load-from-database-C/m-p/72417#M44729</link>
      <description>&lt;P&gt;I am trying to load info from a database into "lineItems". Like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                        lineItems[intLoop] = new lineItemType
                        {
                            itemId = "1",
                            name =  strItem,
                            quantity = intQty,
                            unitPrice = decPrice
                        };&lt;/PRE&gt;&lt;P&gt;If I set&amp;nbsp;&lt;/P&gt;&lt;P&gt;strItem="Another test description";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;before the lineItems, it WORKS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reading a value from the database with spaces in the name,&lt;/P&gt;&lt;P&gt;I put that into a variable string, a few examples&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                    strItem = String.Format("\"{0}\"", str5_Item);&lt;/PRE&gt;&lt;PRE&gt;var response = controller.GetApiResponse();&lt;/PRE&gt;&lt;P&gt;I get a&amp;nbsp;&lt;/P&gt;&lt;P&gt;response is null .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However if I read from database a field with no spaces, it all WORKS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the strItem above has spaces in it, I get a response is null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suggestions on how to read a column data with SPACES in the field and put that value into&amp;nbsp;&lt;/P&gt;&lt;P&gt;the "NAME" listed above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;P&gt;Steve2301&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jul 2020 17:33:09 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/lineItems-load-from-database-C/m-p/72417#M44729</guid>
      <dc:creator>steve2301</dc:creator>
      <dc:date>2020-07-05T17:33:09Z</dc:date>
    </item>
  </channel>
</rss>

