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,or deredquantity)
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 (avaliablequant ity) 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 . - Dim as strcon
-
Try
-
Strcon="provider=Microsoft.jet.oledb.4.0;data source=Sales.mdb"
-
-
Dim con as new oledbconnection(Strcon)
-
Con.open
-
Dim cmd as new oledb command
-
cmd.commandtext=" insert into parts (orderno,partno,orderedquantity)values(" & textbox1.text & "," & textbox2.text & "," & textbox3.text & ")"
-
cmd.executenonqeur
-
-
con.close
-
catch exp as exception
-
msgbox(exp.tostring)
-
end try
with thanx
0 1166 Sign in to post your reply or Sign up for a free account.
Similar topics |
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 make-believe
challenge in order to avoid confusing the issue further.
Suppose I was hosting a dinner and I wanted to invite exactly 12 guests
from my neighborhood. I'm really picky about that... I have 12 chairs
besides my own, and I want them all...
|
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 product sold in that transaction. I
have a subtransaction table that maintains record of each subtransaction,
with data such as: ProductID, Quantity, TransactionID etc.
The Products table has fields: ProductID, UnitsSold, UnitsOrdered,...
|
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
|
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 printer total is now 20
instead of 23) while also logging the transaction in another table
(for example, logging the date and -3 printers).
I have another question, while a value is selected by a combo box, how
can I retrieve it? I mean, I want...
|
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 quantity*UnitPrice and in sqlDataAdoptor's
commands
I just update the first 2columns(mean quantity and UnitPrice)
but unfortunately when use SqlDataAdoptor.Update method to update
DataTable,it gives me the followinf error "Cannot change ReadOnly property...
| |
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 pressing on button the datagrid not
define
and body of function recognize the object i think is becuase view
state
but i don't know how to solv it
|
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 value;
double totalvalue=0;
int r, c;
setcolor (11);
for( r=0; r<row; r++ )
|
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 column named
*Quantity* in a database table also gets updated with the changes made
by the user. The Form has a Label as well which shows the total cost
of all the items that are currently present in his cart. This the
OnUpdateCommand event...
|
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 shipped to a client.
This form is created using a query that combines all fields of Orders and Order Details table.
The upper part of the order entry form is used to enter basic information such as the order date, client name, address etc.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |