473,385 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

help me pleeeeease to update the avaliable quantity column

I'm working on an Access DB and the OLEDB data adapter in a VB.net project,
I've a windows form in vb.net called Customers orders (partno,name,orderedquantity)
When I fill all the texts with it's data Pay attention to the txt of( the ordered quantity ) ,then I press the oreder button which save the entered data to it's table in the DB.
How can I make the (avaliablequantity) column in the other table (parts) updates it's selfe according to the ordered quantity.
I made an update query in the Access which update the table just when I click on it here it's( .
Please help me how can I make the update process work through the following code of the Customerorders .
Expand|Select|Wrap|Line Numbers
  1. Dim as strcon
  2. Try 
  3. Strcon="provider=Microsoft.jet.oledb.4.0;data source=Sales.mdb" 
  4.  
  5. Dim con as new oledbconnection(Strcon)
  6. Con.open
  7. Dim cmd as new oledb command
  8. cmd.commandtext=" insert into parts (orderno,partno,orderedquantity)values(" & textbox1.text & "," & textbox2.text & "," & textbox3.text & ")"
  9. cmd.executenonqeur
  10.  
  11. con.close
  12. catch exp as exception
  13. msgbox(exp.tostring)
  14. end try
with thanx
Jun 10 '06 #1
0 1154

Sign in to post your reply or Sign up for a free account.

Similar topics

28
by: stu_gots | last post by:
I have been losing sleep over this puzzle, and I'm convinced my train of thought is heading in the wrong direction. It is difficult to explain my circumstances, so I will present an identical...
1
by: Kunal | last post by:
Hi, I need some help on writing an update query to update "UnitsSold" field in Products Table whenever I save a transaction. The transaction may contain several "Subtransactions", one for each...
5
by: -elniniol999- | last post by:
I am DESPERATE for a quick reply.. have exhausted my options... i have a table called order details which contains: order id product id product name quantity unit price sale price
5
by: J. Yuan | last post by:
Hi, I am working on a checkout/inventory system. How can I make a button that when pressed, would update the previous fields transaction number to a table (for example, -3 printers, so that...
2
by: perspolis | last post by:
hi everyone I have a table in Sql that have 2 columns name qunatity and Unitprice; In my application I create an additional column name Total and set it's ColumnExpression just to show...
0
by: doronb | last post by:
hello my question is : i define dynamic columns to datagrid , 4 columns are databound and 1 columne is "edit template column" and only this col editable , i define function for update when...
2
by: HarisHohkl | last post by:
Hi, I've this function in a class to update the total value.but when i try to remove the these row highlight in Bold it crash, what should i do???? void display_total_value() { double...
2
by: rn5a | last post by:
When a DataGrid is in the editable mode, users can change the quantity of the items that are currently in his shopping cart by entering a new quantity in a TextBox. After changing the quantity, a...
1
by: RamanS | last post by:
Hi, I am creating an inventory management database. I have three tables in this database, Products, Orders and Order Details. I have a form Order Entry in which i create an order to be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.