473,663 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update query problem when using wizard

I have table to update a QUANTITY field using c# Express. What statement
should I put in the query builder wizard? A select statement or an Update
statement? Do I must have a select statement with every update statement?

Here's my update statement I want to run.
UPDATE tabe1
SET Quantity = Quantity - @quantityUsed
WHERE PrimaryKey = @someValue
--
L. A. Jones
Aug 9 '06 #1
0 1105

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1200
by: jiip | last post by:
How can I update records in a excisting table with records from a mysql database without having double entry's. This way i only want to import the new records ! thanks
9
4751
by: Pam Ammond | last post by:
I need the code to update the database when Save is clicked and a text field has changed. This should be very easy since I used Microsoft's wizards for the OleDBAdapter and OleDBConnection, and DataSet; and all I'm doing is showing one record in text fields, allowing the user to modify the text fields, and then updating the database again when the user clicks the Save button. The fields already show the correct data record since I have...
3
1623
by: Simon | last post by:
Hi everyone, I have a small problem regarding a wizard that I'm making on my website. The wizard is obviously a series of pages that take values from the user. My question is: - Should I store all the values entered until the last page and then update the database, or should I do it as I go.
1
1510
by: David | last post by:
Hi, I am trying to a field in a Access database, and I have used the code generated by the Web Matrix UPDATE code wizard. When the update function is called, no errors are generated, but no update to the database happens. (rows affected is 0) I have copied the SQL code into an Access query, and it works fine.
1
2767
by: Mok | last post by:
Hello, I want to pull information from a table in sql server, bind it to a grid and update those values. I would like to know the best way to do it. I used the configure data adapter wizard and it came up with a crazy stored proc. As in this example I would only update and : CREATE PROCEDURE . ( @Description varchar(1000),
17
3813
by: Benoit Martin | last post by:
I'm working on a project in VB.net connecting to a SQL Server 2000 database that I can't modify I created a dataset with a schema identical to the DB. When trying to update the DB from the dataset using the dataAdapter.update sub, I get an error. The problem seems to be that one of the fields was named 'desc' which is a reserved word for SQL. I've been able to work around this design flaw 'till now but it looks like the update sub can't...
0
784
by: Dave | last post by:
I have table to update a QUANTITY field using c# Express. What statement should I put in the query builder wizard? A select statement or an Update statement? Do I must have a select statement with every update statement? Here's my update statement I want to run. UPDATE tabe1 SET Quantity = Quantity - @quantityUsed WHERE PrimaryKey = @someValue --
16
3489
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for renaming the duplicate records? My thinking was to take the results of the duplicate query, and somehow have it number each line where there is a duplicate (tried a groups query, but "count" won't work), then do an update query to change the duplicate to...
2
1889
by: jjb1214 | last post by:
Hi all, I've been unable to find the answer I'm looking for on the forums, so I'm asking my first-ever question. I'm building a windows forms application in Visual Basic using Visual Studio 2008. I have an Access database behind it that I'm building on. I've only been playing around with VB for a few months now, so forgive any misconceptions I may have....here's what I'm trying to accomplish: I have two tables in the database, and I need...
0
8435
marktang
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...
0
8345
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,...
1
8547
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,...
0
8633
tracyyun
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...
0
7368
agi2029
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...
0
4181
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...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1754
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.