Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : J2EE : JSP : MY data is not updating Signup · Login
Author Thread
MY data is not updating
Posted in tutorial: Updating records in the Database using JDBC with Java Servlets
·  summersmile
User
Joined: 21 Oct 2002
Total Posts: 1

MY data is not updating

Posted: 21 Oct 2002
Hello
I am new in web development and am stuck with a page i am working on .I have done everything i think on the page for it to update the information but once i get to the update page i change the information that i want updated it is not changing .Can u tell me what i should look for that would cause the problem .

here is the sql statment i have <%
fp_sQry="UPDATE contact SET ""Surname""=''::surname::'' , ""First""=''::First::'' , ""Department""=''::Department::'' , ""Ext""=''::Ext::'' , ""E-MailAddress""=''::E-mailAddress::'' , ""PagerNo""=''::PagerNo::'' , ""CellularNo""=''::Cellularno::'' WHERE ID=::ID::"
fp_sDefault="surname=&First=&Department=&Ext=&E-mailAddress=&PagerNo=&Cellularno=&ID="
fp_sNoRecords="<tr><td colspan=16 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="Phone"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>


share a smile :)
·  Faisal Khan
AdminAdminAdminAdmin
Joined: 24 Sep 2002
Total Posts: 594
There is something wrong with your query
Posted: 22 Oct 2002
Either you have not properly pasted your code, or there is something wrong with your query. Btw are you using VBScript ( ASP ) to update records?

Here is your query:

fp_sQry = "UPDATE contact SET ""Surname""=''::surname::'',
""First""=''::First::'',
""Department""=''::Department::'',
""Ext""=''::Ext::'',
""E-MailAddress""=''::E-mailAddress::'',
""PagerNo""=''::PagerNo::'',
""CellularNo""=''::Cellularno::''
WHERE ID=::ID::"


Change it to ( in VBScript ):


fp_sQry = "UPDATE contact SET Surname = ''" & surname & "''," & _
"First = ''" & First & "''," & _
"Department = ''" & Department & "''," & _
"Ext = ''" & Ext & "''," & _
"E-MailAddress = ''" & E-mailAddress & "''," & _
"PagerNo = ''" & PagerNo & "''," & _
"CellularNo = ''" & Cellularno & "'' " & _
"WHERE ID = " & ID

Faisal Khan.
Stardeveloper.com
Read Blog | Follow on Facebook, Twitter
Want to leave a comment? Login or Register for free!

Users Who Have Visited This Thread In Last 24 Hours
2 Visitors

Login to post a comment or start a new thread
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.