updating calculated fields to database in asp.net 2.0

i'm doing a inventory management website. whenever the new stocks come in, i want to update my qtyinstock in the database by adding the new stocks and the exsiting qtyinstock. currently, i'm able to calculate the total and also to update the new stocks. but i wasn't able to update the calculated values to qtyinstock in my database. i'm using formview to carry out the various functions. i think that the fault lies with the update command.

 i want the qtyinstock to be replaced by the calculated fields in expr1.

SelectCommand="SELECT SUM(QtyInStock + NewStocks) AS Expr1, ProductID, NewStocks, QtyInStock FROM Products WHERE (ProductID = ?) GROUP BY ProductID, NewStocks, QtyInStock"

UpdateCommand="UPDATE Products SET NewStocks = @NewStocks ,QtyInStock = @QtyInStock WHERE ProductID = @ProductID"

thanks

0
deorne
6/28/2007 12:32:35 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

2 Replies
459 Views

Similar Articles

[PageSpeed] 3
Get it on Google Play
Get it on Apple App Store

UpdateCommand="UPDATE Products SET NewStocks = @NewStocks ,QtyInStock =  QtyInStock +  @QtyInStock WHERE ProductID = @ProductID"


"Object reference not set to an instance of an object"
0
che3358
6/28/2007 12:40:21 PM
thank you so much!! i've been stuck at this part for so long. thanks for solving my problem! =)
0
deorne
6/28/2007 12:59:42 PM
Reply:

Similar Artilces:

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links http://en.wikipedia.org/wiki/.NET_Framework http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx http://www.codeproject.com/aspnet/ComparisonASP1xASP20.aspAshok Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

.Net 2.0 Web application using Vb.net is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one ASP.net web application using Vb.net which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

Clickonce deployment anyone (DW.NET 2.0 and .NET 2.0)?
I saw someone had posted a question about this already, and there were no responses. So I am hoping that this will get some. We had problems with the previous version of DW.NET 1.5 + VS2003 when attempting to deploy applications via a web server. So many problems that we eventually decided to run off a network drive (which is OK if your user base doesn't roam around the country). Anyway, we gave up on DW.NET, and started to use the datagrid control. Since then, much has changed. Our development team now has VS2005 professional and may start using DW.NET 2.0 (pending my inv...

Access .Net 2.0 Application from .Net 2.0 Web Site
I need to populate a specific form in a .Net desktop application from a .net web application.  Is there an easy way to go about this? Hi, Based on my understanding, you want to start an executable application from your ASP.NET websit, right? We can invoke Process.Start method (http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx) to launch an executable application from ASP.NET application. Note: Please keep in mind, the ASP.NET application is running on the server, so it will start the executable application that exists in the server.   I look...

.NET 3.0 or .NET 2.0?
I'm going to move my exiting software to .net soon. I'm just wondering if I should wait for the .NET 3.0 framework to be released or if I can start with the 2.0 now? I'd say you can go ahead and move your code to .Net 2.0 as .Net 3.0 uses the CLR version 2.0.Basically, .net 3.0 is .net 2.0 PLUS some new features for presentation (GUI), communication and workflow process.  So the compiler as well as the language features used by the 2.0 runtime will be the same in 2.0 and 3.0"Never argue with an idiot; He will drag you down to his level and beat you with experienc...

.NET 2.0 Data Connection (.NET 2.0 Beta Data Provider)
I have installed the .NET 2.0 Beta Data Provider, in the server explorer in Visual Studio 2005 I have tried to connect to this provider but I can not see it in the list. Is there something else you need to do to see this other than what is in the instructions or is this not supported yet? Hi Dean, I assume you mean ASE ADO.NET 2.0 Beta. I'm attaching the html readme for this product that you should have from downloading it. Are you talking about using Server Explorer to see the Provider? This functionality isn't working yet and should be available on GA or shortly thereafter. You can register this in GAC, and also there is instructions to manually register to the system explained in the readme file. -Paul <Dean Oldfield> wrote in message news:464db42b.253.1681692777@sybase.com... >I have installed the .NET 2.0 Beta Data Provider, in the > server explorer in Visual Studio 2005 I have tried to > connect to this provider but I can not see it in the list. > Is there something else you need to do to see this other > than what is in the instructions or is this not supported > yet? begin 666 adonet_2.0_readme.htm M/&AT;6P@>&UL;G,Z=CTB=7)N.G-C:&5M87,M;6EC<F]S;V9T+6-O;3IV;6PB M#0IX;6QN<SIO/2)U<FXZ<V-H96UA<RUM:6-R;W-O9G0M8V]M.F]F9FEC93IO M9F9I8V4B#0IX;6QN<SIW/2)U<FXZ<V-H96UA<RUM:6-R;W-O9G0M8V]M.F]F M9FEC93IW;W)D(@T*>&UL;G,Z<W0Q/2)U<FXZ<V-H96UA<RU...

Update for Tabstrip controls to .NET 2.0 ?
Is there an update for the tabstrip control to .NET 2.0  ??? I can't figure out how to use the tabstrip in vs 2005. The tabs just return plain text -------------------------------------------------------------- VS2005 don't use the standard ISS to execute web-applications, so I have tried to place the webctrl_ client folder in my project folder (c:\projects\) and also in my website folder  (c:\projects\website) but it still don't work. I've also tried to put some code in my web.config file to change the path: <configurationSections><...

web.config problems when upgrading from .NET 2.0 Beta to .NET 2.0 release version
We uninstalled .NET 2.0 Beta and replaced it with .NET 2.0 release version.  And it messed everything up.  All applications now give weird errors indicating the lack of web.config files, despite the fact that they already have web.config files in place.  For example, the following error occurs even though the web.config file has <customErrors="Off">: Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for securit...

Running server controls compiled for .NET 1.1 in .NET 2.0
Hello, I have tried upgrading our ASP.NET 1.1 application to .NET 2.0 by using Web Application Projects, and it works beautifully. We use several 3rd party controls that we bought for use in .NET 1.1 and these seem to just work in .NET 2.0, except that I get an intermittent problem with one of them. Should DLLs compiled using .NET 1.1 simply work, except if they access classes that have been removed from the framework in .NET 2.0? If I have both .NET 1.1 and .NET 2.0 present on the machine and the ASP.NET application is configured to run using .NET 2.0 and I have a DLL compiled using .NE...

DetailView control does not update (AP.NET 2.0)
I have a simple page with GridView, DetailView and 2 SqlDataSource controls. DetailView is linked to the GridView and displays the record selected in the grid. Both controls use thier own data source controls. GridView is not updatable, but the DetailView is. Everything seems to work except that DetailView does not update the database. When I click "Update" changes are not being saved. To be honest with you that is exactly why I do not like the autobinding etc.. there is no code to debug, a particular setting is not correct and go figure which one. What adds...

Will AJAX Extensions 1.0 (for .NET 2.0) be affected by .NET 3.0?
Hello all,I have a web server that has a couple of site running using .NET 2.0 with the AJAX Extensions 1.0 (but not the ControlKit) and I need to install another Web App site that uses .NET 3.0. I need to know if installing .NET 3.0 will affect the sites that currently use 2.0 and the AJAX Extensions 1.0 as these sites are live and any down time would get me in the @~!£$.If there are issues, are there any work arounds? Many Thanks in advance  The .net Framework 3.0 and 3.5 add features to the .net framework 2.0 so installing the additional framework should not cause any pro...

.NET 2.0 and .NET 3.0 Running parallel
Are there any known issues for both of the frameworks running in parallel on same machine Also searched on the web but would like to know complete reference, before I dirty my hands on the 3.0.Any help is appreciated.regardsRaheel Hussain--------------------------------Blog: http://www.dnfug.com/web/blogs/raheel/URL: http://www.raheelhussain.com/--------------------------------This posting is provided "AS IS" with no warranties, and confers no rights. The 2.0 and 3.0 frameworks don't run separately, they run together.  Think of .NET 3.0 as an extension of 2.0, ...

Where is the ADO.NET Sybase driver for .NET 1.1 and .Net 2.0?
Hi All Does anyone know where I can get the Sybase drivers for ADO.NET for both versions, 1.1 and 2.0/3.0? Cheers Chris Burrell Hi Chris, There is no release of ASE ADO.NET Provider 2.0 (I assume you refer to ASE provider, not ASA - if ASA please port to sybase.public.sqlanywhere.general). For the 1.1 Provider: It is available in the ASE SDK for windows or the PC Client CDRom included with ASE product. On the SDK its available as 12.5.1 and 15.0 On ASE PC Client I think 12.5.1 is part of ASE 12.5.X and 15.0 is part of ASE 15.X 2.0 provider should release sometime this summer - there is a beta program - look in the sybase.public.connectivity.adonet.beta newsgroup for details -Paul <Chris Burrell> wrote in message news:466ea680.5729.1681692777@sybase.com... > Hi All > > Does anyone know where I can get the Sybase drivers for > ADO.NET for both versions, 1.1 and 2.0/3.0? > > Cheers > Chris Burrell ...

Custom Paging .Net 2.0 to .Net 3.0
 I have a web app written in VS 2005 that uses griviews with custom paging and sorting done as follows. <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="rec_id" BorderColor="White" BackColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" AllowPaging="True" AllowSorting="True" PageSize="20" OnSorting="Gvemp_sort&q...

Master Details in two seperate GridView Controls
I am simply trying to have a list of people in the top grid control (works fine), then when selected have the second Grid Control show details for that person(not working). Here is what I am trying from the load event: Sub BindData() Dim myConnection As New MySql.Data.MySqlClient.MySqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnectionSql")) Dim strPersonSQL, strActSQL As String strPersonSQL = "select row_id, first_name, last_name, middle_initial, dsi_id, created, created_by, program_of_study, email from tbl_person" Dim myPerCommand As New MySqlClient.MySqlComm...

Datagrid(.net 1.1) to GridView(.net 2.0) and using the RowUpdating event how to extract the values from the controls.
Ok  This is the settings: I use a Viewgrid with only itemtemplate colums for example. <asp:TemplateField HeaderText="Test"><ItemTemplate><asp:Label id="LBL_Test" text='<%# DataBinder.Eval(Container.DataItem, "Test1") %>' runat="server" meta:resourcekey="LBL_TestResource1"></asp:Label></font></ItemTemplate> <EditItemTemplate><asp:TextBox ID="HDN_Test" Text='<%# DataBinder.Eval(Container.DataItem, "Test1") %>' Runat="server" meta:resourcekey="HDN_TestResource1" /></EditItemTemplate></asp:TemplateField>  The ...

LDAP Authentication .Net 1.0 code to .Net 2.0
A few years ago with help of Dunry (I think he wrote most of the LDAP part) we came up with the below C# that works in our environment. We now need to migrate this to .Net 2.0.Does anyone have any examples of something simliar that works in .Net 2.0? Thanks in advance.private void btnSubmit_Click(object sender, System.EventArgs e)  {   if(Page.IsValid)   {    SearchDirectoryUsername(txtUsername.Text);   }  }  private void SearchDirectoryUsername(string username)  {   using ...

.NET v1.1 SP1 and .NET 2.0 beta 2
Hi all I want to install VWD and .NET 2.0 beta 2 on the same machine that I am using Delphi.NET and .NET v1.1 SP1. I am considering jumping from Delphi to C# and this is an ideal way to do it. I do however have too many web applications on the v1.1 framework that are published on servers that do not support 2.0 as yet. Can these 2 versions of the framework co-exist so I can carry on in Delphi with existing sites but start new ones in VWD? I did take the chance on one of my machines and both VWD and Delphi seem to compile their respective web apps okay. I have not tested deplo...

How to migrate from .NET V 1.0 to .NET v 2.0
  I have a asp.net applicatin currently running with v1.1.4322, I want to migrate to v2.0.50727 . I have run a "aspnet_regiss.exe -i". But it seems to be not enouft. When i open a page i get a "The 'system.serviceModel/serviceHostingEnvironment' configuration section cannot be created". And what about Visual Studio, I am using Visual Studio 2003. Does i have to change anything to make Visual Studio 2003 compile with version 2. And does i need to change somthing in machine.config ?  Best Regards   To get vs2003 to build the app for .NET 2.0, you need to upgrade to ...

Installing .Net Framework 1.0 Over .Net Framework 2.0
Hi all,My server has .Net Framework 2.0. Can I install .Net Framework 1.0 or I have to uninstall .Net 2.0, then install .net 1.0, then .net 2.0?Marking a Reply as 'Answered', not only GAIN us some POINTS, but it also HELP others to find RIGHT solution.  Hi,Hey no issues, u can directly install .Net 1.0 no matter you already have .Net 2.0 If this reply is answer to your question then mark this reply as Answer Get more solutions in SQL Server, C#.Net 3.5/2.0/1.1, SharePoint-Mohammad Nizamuddin What I know is if you install .Net Framework 2.0, the older version gets already i...

Error with using .Net 3.0 instead of .Net 2.0
Hi,  I have recently made a website in microsoft visual web developer 2005.  When I have uploaded my site to my host I am having trouble.  when I visit the page www.amcnewzealand.co.nz I get an error message.  My web hosting company does not support .net 3.0 but instead use .net 2.0.  My website is made with file extensions .aspx.  I am usure how to tell what version of .net I am using and wether this is the only cause.  At first there was a 403 error occuring. Help would be much appreciated as I have been struggling with this for some time. The version...

How can i upgrade my project from .net 2.0 to .net 3.0
I have been developing my project in .net 2.0 and and its already deployed for testing. Its not yet in use but its already deployed for testing purposes. Then i realised that i already have .net 3.0 installed both on my developement computer and on our production sever posiibly through these microsoft updates because i did not install .net 3.0 manually, i just found them in the installed programs. So how can i configure this project and all the applications that i will develop in future to use .net 3.0 instead of 2.0 that iam currently using. Basically what i want to do is move my applicati...

ado.net and .net 2.0
Does anyone know if there has been any notable changes to ADO.NET in .NET 2.0 in the areas of data access (both reads and writes) except for the new SqlDataSource and equivalent user controls? Try these links for  tutorials. Hope this helps.http://beta.asp.net/QUICKSTART/aspnet/doc/data/advanced.aspx#nulls http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/mandataaccess.aspKind regards,Gift Peddie...

Crystal reports don't run well after Windows Update installs .net 2.0 and .net 3.5
 I have a web reporting application build using VS2003 and Crystal ver 9.5.Everything was working fine until the infrastructure team run the windows 2003 server WINDOWS UPDATE where the new .net 2.0 & .net 3.5 got installed.I started to get CrystalDecisions.CrystalReports.Engine.InternalException: Error in File:crreport5.rpt -The request could not be submittted for background processing.After I restart IIS , the reports start working again but they stop after a while and I have to restart again ...Please, advise.    ...

Web resources about - updating calculated fields to database in asp.net 2.0 - asp.net.presentation-controls

Calculated Risk - Wikipedia, the free encyclopedia
^ Streitfeld, David (December 1, 2008). "Doris Dungey, Prescient Finance Blogger, Dies at 47" . New York Times. p. A27, New York edition . h ...

Image from page 12 of "The American anti-slavery almanac, for ... : calculated for Boston, New York ...
Identifier: americanantislav1838chil Title: The American anti-slavery almanac, for ... : calculated for Boston, New York, and Pittsburgh .. Year: ...

Cosy deal calculated to aid fund managers
A few years back, the corporate regulators did the fund managers a big favour.

Paris shooting: Charlie Hebdo gunmen were not crazy, just calculated
Sometimes crazy men are not crazy; not in any clinical sense. Some crazy men do what they do because they make a cold and reasoned decision that ...

Joe Hockey's change of heart on uni fees is calculated
Thank you, Waleed Aly, for your eye-opening article ("Gotcha politics is just light entertainment", May 30). It would be hypocritical not to ...

Taylor Swift is terribly calculated and mean, says Grizzly Bear's Edward Droste
The lead singer from Brooklyn indie band Grizzly Bear has taken down Taylor Swift on Twitter and admitted to being genuinely scared of the successful ...

Canterbury Bulldogs' calculated leap of faith in Michael Lichaa places weight of expectation on his shoulders ...
Even the expectation of bursting into the NRL as the hottest rookie in the game could not have prepared Michael Lichaa for what would unfold ...

Keystone XL Emissions Could Be Four Times Higher Than U.S. Calculated, Says New Study
WASHINGTON - The much-debated Keystone XL pipeline could produce four times more global warming pollution than the State Department calculated ...

Size matters, but so does how it is calculated
Size matters, but so does how it is calculated

Stop Giving Away the Store: “Reasonably Calculated” does not define the scope of discovery. (And it never ...
For over a hundred years Americans have enjoyed Josh Billing’s chestnut, “I’d rather not know so much, than to know so much that ain’t so.” ...

Resources last updated: 2/21/2016 4:19:12 AM