update database

ok i have dreamweaver mx 2004 for asp.net programing and i need to update a database and it worked in the last release but now then i click the submit button it just sends the user back to the admin page where the button to edit it is.... you clikc the edit button.... edit the information.... click submit... it redirects you to the admin page and dosent update the db(access 2000 database) i was wondering what would cause it just to stop working
zeurxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CoolATIGuyCommented:
Well, I don't think DWMX2004 would have changed your ASP.NET code...sounds like you need to double check and make sure that your database update stuff is setup correctly before it does it's header() or whatever to redirect back to the admin page.

Can you post some code, please...


CoolATIGuy
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
zeurxAuthor Commented:
ummm it shouldnt go back to that page.... it should display an error or go to the post to view which means there is no code but that of dreamweaver
0
zeurxAuthor Commented:
when i click the button it goes right back to the edit page when i take my security out and i dont know y
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

zeurxAuthor Commented:
This is the update code from dw...
<MM:Update
runat="server"
CommandText='<%# "UPDATE Main SET DaysLast=?, EBaySellingPrice=?, Link=?, ListingPrice=?, Payment=?, ReservePrice=?, SellingPrice=?, StartingPrice=?, TrackName=? WHERE TrackNumber=? AND DateStarted=?" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_ebaytrackerdatabase"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_ebaytrackerdatabase"] %>'
Expression='<%# Request.Form["MM_update"] == "form1" %>'
CreateDataSet="false"
Debug="true"
><Parameters>
  <Parameter Name="@DaysLast" Value='<%# ((Request.Form["Days"] != null) && (Request.Form["Days"].Length > 0)) ? Request.Form["Days"] : "" %>' Type="Integer" />  
  <Parameter Name="@EBaySellingPrice" Value='<%# ((Request.Form["EbayPrice"] != null) && (Request.Form["EbayPrice"].Length > 0)) ? Request.Form["EbayPrice"] : "" %>' Type="WChar" />  
  <Parameter Name="@Link" Value='<%# ((Request.Form["Link"] != null) && (Request.Form["Link"].Length > 0)) ? Request.Form["Link"] : "" %>' Type="WChar" />  
  <Parameter Name="@ListingPrice" Value='<%# ((Request.Form["ListPrice"] != null) && (Request.Form["ListPrice"].Length > 0)) ? Request.Form["ListPrice"] : "" %>' Type="WChar" />  
  <Parameter Name="@Payment" Value='<%# ((Request.Form["Payment"] != null) && (Request.Form["Payment"].Length > 0)) ? Request.Form["Payment"] : "" %>' Type="WChar" />  
  <Parameter Name="@ReservePrice" Value='<%# ((Request.Form["Reserve"] != null) && (Request.Form["Reserve"].Length > 0)) ? Request.Form["Reserve"] : "" %>' Type="WChar" />  
  <Parameter Name="@SellingPrice" Value='<%# ((Request.Form["SoldPrice"] != null) && (Request.Form["SoldPrice"].Length > 0)) ? Request.Form["SoldPrice"] : "" %>' Type="WChar" />  
  <Parameter Name="@StartingPrice" Value='<%# ((Request.Form["StartPrice"] != null) && (Request.Form["StartPrice"].Length > 0)) ? Request.Form["StartPrice"] : "" %>' Type="WChar" />  
  <Parameter Name="@TrackName" Value='<%# ((Request.Form["ItemName"] != null) && (Request.Form["ItemName"].Length > 0)) ? Request.Form["ItemName"] : "" %>' Type="WChar" />  
  <Parameter Name="@TrackNumber" Value='<%# ((Request.Form["ItemID"] != null) && (Request.Form["ItemID"].Length > 0)) ? Request.Form["ItemID"] : "" %>' Type="WChar" />  
  <Parameter Name="@DateStarted" Value='<%# ((Request.Form["ItemID"] != null) && (Request.Form["ItemID"].Length > 0)) ? Request.Form["ItemID"] : "" %>' Type="WChar" />  
</Parameters>
</MM:Update>

This is the form code...
<form runat='server' name='form1'  method='POST'>
...
<table width="433" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><span class="style5">Item Name :</span>                    <input name="ItemName" type="text" id="ItemName" value='<%# DataSet1.FieldValue("TrackName", Container) %>' width="114"></td>
                  <td width="63"></td>
                  <td class="style5">Item ID :
                    <input name="ItemID" type="text" id="ItemID" value='<%# Double.Parse(DataSet1.FieldValue("TrackNumber", Container)).ToString("F") %>' width="114"></td>
                </tr>
              </table>
              <table width="433" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>Ebay Link :
                    <input name="Link" type="text" id="Link" value='<%# DataSet1.FieldValue("Link", Container) %>' size="62"></td>
                </tr>
              </table>
              <table width="433" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="145">Starting Price :
                    <input name="StartPrice" type="text" id="StartPrice" value='<%# Double.Parse(DataSet1.FieldValue("StartingPrice", Container)).ToString("C") %>' size="15"></td>
                  <td width="137">Reserve Price :
                    <input name="Reserve" type="text" id="Reserve" value='<%# Double.Parse(DataSet1.FieldValue("ReservePrice", Container)).ToString("C") %>' size="15"></td>
                  <td width="151">Listing Price :
                    <input name="ListPrice" type="text" id="ListPrice" value='<%# Double.Parse(DataSet1.FieldValue("ListingPrice", Container)).ToString("C") %>' size="15"></td>
                </tr>
              </table>
              <table width="433" border="0" cellspacing="0" cellpadding="2">
                <tr>
                  <td width="66" valign="top">Payment :</td>
                  <td width="182"><select name="Payment" size="5" multiple id="Payment" title='<%# DataSet1.FieldValue("Payment", Container) %>'>
                    <option>PayPal</option>
                    <option>Credit Card</option>
                    <option>Money Order</option>
                    <option>Escrow</option>
                    <option>Personal or Cashier's Checks</option>
                    <option>Bank to Bank Transfer</option>
                    <option>Instant Cash Wire Transfer</option>
                  </select></td>
                  <td width="173">(Hold Ctrl and click to select more than one) </td>
                </tr>
              </table>
              <table width="433" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="197">Day Started :
                    <input name="StartDate" type="text" id="StartDate" value='<%# DateTime.Parse(DataSet1.FieldValue("DateStarted", Container)).ToString("d") %>'></td>
                  <td width="57">&nbsp;</td>
                  <td width="179">Days Last :
                    <input name="Days" type="text" id="Days" value='<%# DataSet1.FieldValue("DaysLast", Container) %>'></td>
                </tr>
              </table>
              <table width="433" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="197">Sale Price :
                    <input name="SoldPrice" type="text" id="SoldPrice" value='<%# Double.Parse(DataSet1.FieldValue("SellingPrice", Container)).ToString("C") %>'></td>
                  <td width="57">&nbsp;</td>
                  <td width="179">Ebay Price :
                    <input name="EbayPrice" type="text" id="EbayPrice" value='<%# Double.Parse(DataSet1.FieldValue("EBaySellingPrice", Container)).ToString("C") %>'></td>
                </tr>
              </table>
              <table width="433" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><%# DataSet1.FieldValue("UserName", Container) %>&nbsp;</td>
                  <td align="center"><input type="submit" name="Submit" value="Edit Tracker Now!">                    
                  <label id="Date"></label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                  </tr>
              </table>
                    </center>
                    
             
              <br>
                    
                        </div></td>
          </tr>
        </table>
...
<input type="hidden" name="MM_update" value="form1">
</form>
0
CoolATIGuyCommented:
So you are saying that when you fill out the form (admin page) and click edit, it reloads the form again (still admin page)?  I do some php, not asp...

What is runat='server'?  Is that the way asp posts back to itself, like php posting to the server?

Also, is this correct:

'<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_ebaytrackerdatabase"] %>'


Did you make sure that connection still exists?  That could be your prob...


CoolATIGuy
0
zeurxAuthor Commented:
runat tells the server to compile the code i think
the other one dw made so it sould be right
and i have a manage.aspx and a edit.aspx and a trackercore.aspx that allows session only access to the edit page.... compairs user to filtered selected list and says if it can or cannot be edited via same user auth
0
zeurxAuthor Commented:
users can post but only admins can edit....

user
-----
- post
but cant update

admin
--------
- post
- edit
adminedit.aspx
works like a charm
0
zeurxAuthor Commented:
ummmmmmmm
........................
it works now :O
and i dont know what i did

will split points
0
zeurxAuthor Commented:
edit to last one will give points to only one person  (shake my head in stupidity)
0
CoolATIGuyCommented:
LOL...maybe your hoster was having a bit of trouble?  Or you got caught in the anomaly that we webmasters occasionally get trapped in, where stuff just doesn't work, through no fault of our own. :-)  Or, most possibly, I actually had a dead-on answer that fixed the problem (even though it didn't).


CoolATIGuy
0
zeurxAuthor Commented:
ummmm i found it was my method of security.... i took it out and works grate but when its in i guess im lucky it worked
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.