![]() |
| ||
| ASP.Net VB Page to update a users profile not updating. My page displays the info in the text boxes, but when we run the click sub for the update button it returns the info that it has been updated sucessfully. Here is the page code and below that is the stored procedure it uses, but not update in the database. <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="The Car Masseuse - Profile Update" %> CREATE PROCEDURE userUpdate Any help would be greatly appreciated. Thanks |
| ||
| Re: ASP.Net VB Page to update a users profile not updating. Ok first off, have you tested your Stored Procedure? Here is what it should look like : CREATE PROCEDURE userUpdate And with your ASP.Net Codebehind I found some issues: 1. No Input direction set for your parameters going into the stored procedure. 2. No parameter created to store those values in the parameters collection. 3. AddWithValue is not a member of the parameters collection 4. You are requesting a return value called ReturnValue which you haven't declared in your Stored Procedure. Here is what it should be like: Protected Sub butUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Again I can't stress this enough in the world of programming / information technology. There are standards set, and they should be followed.
:cool: |
| ||
| Re: ASP.Net VB Page to update a users profile not updating. Guess what.. I HAD the same problem.. after about 3-4 hours searching the net for a solution i gave up.. I even notice you posted on another site.. To correct the guy above AddWithValue Exists in ASP.NET v2 TO FIX the problem.. add a if statement if(!IsPostBack) { // Bind Data Here.. } OnClick Event Handler { // UPDATE SP Routine Bind Data.. } If you have a problem drop me an email ckolenko@ausclans.com any emails are welcome.. |
| ||
| Re: ASP.Net VB Page to update a users profile not updating. Hello, I use Java & Oracle, not .NET & SQL Server. Nevertheless, unless I am missing something about .NET, you need a 'commit' after the update and before you close the connection. Otherwise after the connection is colsed all your updates will be rolled back by the database by default. Kate |
| All times are GMT -4. The time now is 2:15 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC