Pos inventory system
<p>I am making an inventory system but the problem is:</p>

<p>Database: ItemName, Quantity<br></p>

<p>ItemName: Anything<br>
Quantity: 10</p>

<p>Now if I input something on my program like:</p>

<p>ItemName: Anything<br>
Quantity : 20</p>

<p>The data on my database should be </p>

<p>ItemName: Anything<br>
Quantity :30</p>

<p>But in my case it's just creating another line and displaying the output that I input on my program . </p>

<p>I'm using Visual Basic 2010 </p>

<pre><code>   Dim str as String
   str = "SELECT * FROM Table_name"
   If ItemName.text = str then
      str = "Update Table_name set ItemName=?,Quantity = Quantity+Quantity.text Where ID = ?"
  End if
</code></pre>

<p>and the problem about this query is, it can update the quantity though but all of the items on my database will be the same output as what I input in my program, for example </p>

<pre><code>Database-ItemName  Quantity
A                  10 
b                  10 
</code></pre>

<p>Now if i input C and 20 on my program the result will be:</p>

<pre><code>Database-Itemname  Quantity
C                  30 
C                  30 
C                  20 
</code></pre>