Advertisement

08.20.2008 at 07:39AM PDT, ID: 23663279
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

UPDATE statement not working and I can't see it.

Asked by ibtaya in Active Server Pages (ASP), Web Languages/Standards, Databases Miscellaneous

Tags: , ,

Here's the code in question.  I'm getting this error.

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

/loanrates.asp, line 79


I've commented out everything in the update statement except the one field and it's still not working.  I'm sure it's something obvious that my eyes can't see.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
<!-- METADATA TYPE="typelib" UUID="00000200-0000-0010-8000-00AA006D2EA4" NAME="ADO Type Library" -->
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% Option Explicit %>
<!--#include file="Connections/KNBSecure.asp" -->
<%
Const UPDATE_INDICATOR_VALUE = "updating"
 
Dim MM_EditRedirectURL
Dim MM_editAction
Dim MM_Rates
Dim MM_editCmd
 
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
    MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
 
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
  If condition = "" Then
    MM_IIf = ifFalse
  Else
    MM_IIf = ifTrue
  End If
End Function
 
If (CStr(Request("MM_update")) = UPDATE_INDICATOR_VALUE) Then   
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_KNBSecure_STRING
    MM_editCmd.CommandText = "UPDATE LoanRates SET con40yearrate = ? WHERE id = 1" 
	'kyFHArate = ?, kyFHApoints = ?, kyFHAorg = ?, datechanged = ?, kyRHSrate = ?, kyRHSpoints = ?, kyRHSorg = ?, ar1yearrate =?, ar1yearpoints = ?, ar1yearorg = ?, va3yearrate = ?, va3yearpoints = ?, va3yearorg = ?, arm1yestreasury = ?, margin = ?, fha30yearrate = ?, fha30yearoptrate = ?, fha30yearoptpoints = ?, fha30yearoptorg = ?, fha15yearrate = ?, fha15yearpoints = ?, fha15yearorg = ?,  con15yearrate = ?, con15yearpoints = ?, con15yearorg = ?, va30yearrate = ?, va30yearoptrate = ?, va30yearoptpoints = ?, va30yearoptorg = ?, va15yearrate = ?, va15yearpoints = ?, va15yearorg = ?, con40yearoptrate = ?, con40yearoptpoints = ?, con40yearoptorg = ?, con30yearrate = ?, con30yearoptrate = ?, con30yearoptpoints = ?, con30yearoptorg = ?, con20yearrate = ?, con20yearoptrate = ?, con20yearoptpoints = ?, con20yearoptorg = ?, 
	
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("con40yearrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, Request.Form("con40yearoptrate")) ' adVarWChar
	'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 50, Request.Form("con40yearoptpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 50, Request.Form("con40yearoptorg")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 50, Request.Form("con30yearrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 50, Request.Form("con30yearoptrate")) ' adVarWChar
	'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 202, 1, 50, Request.Form("con30yearoptpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 202, 1, 50, Request.Form("con30yearoptorg")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 202, 1, 50, Request.Form("con20yearrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 202, 1, 50, Request.Form("con20yearoptrate")) ' adVarWChar
	'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 202, 1, 50, Request.Form("con20yearoptpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param12", 202, 1, 50, Request.Form("con20yearoptorg")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param13", 202, 1, 50, Request.Form("con15yearrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param14", 202, 1, 50, Request.Form("con15yearpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param15", 202, 1, 50, Request.Form("con15yearorg")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param16", 202, 1, 50, Request.Form("va30yearrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param17", 202, 1, 50, Request.Form("va30yearoptrate")) ' adVarWChar
	'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param18", 202, 1, 50, Request.Form("va30yearoptpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param19", 202, 1, 50, Request.Form("va30yearoptorg")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param20", 202, 1, 50, Request.Form("va15yearrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param21", 202, 1, 50, Request.Form("va15yearpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param22", 202, 1, 50, Request.Form("va15yearorg")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param23", 202, 1, 50, Request.Form("fha30yearrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param24", 202, 1, 50, Request.Form("fha30yearoptrate")) ' adVarWChar
	'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param25", 202, 1, 50, Request.Form("fha30yearoptpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param26", 202, 1, 50, Request.Form("fha30yearoptorg")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param27", 202, 1, 50, Request.Form("fha15yearrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param28", 202, 1, 50, Request.Form("fha15yearpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param29", 202, 1, 50, Request.Form("fha15yearorg")) ' adVarWChar    
	'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param30", 202, 1, 50, Request.Form("ar1yearrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param31", 202, 1, 50, Request.Form("ar1yearpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param32", 202, 1, 50, Request.Form("ar1yearorg")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param33", 202, 1, 50, Request.Form("va3yearrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param34", 202, 1, 50, Request.Form("va3yearpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param35", 202, 1, 50, Request.Form("va3yearorg")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param36", 202, 1, 50, Request.Form("arm1yestreasury")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param37", 202, 1, 50, Request.Form("margin")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param38", 202, 1, 50, Request.Form("kyFHArate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param39", 202, 1, 50, Request.Form("kyFHApoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param40", 202, 1, 50, Request.Form("kyFHAorg")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param41", 202, 1, 50, Request.Form("kyRHSrate")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param42", 202, 1, 50, Request.Form("kyRHSpoints")) ' adVarWChar
    'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param43", 202, 1, 50, Request.Form("kyRHSorg")) ' adVarWChar
	'MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param44", adDate, adParamInput, , Now) 
 
	MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
[+][-]08.20.2008 at 08:55AM PDT, ID: 22271032

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.10.2008 at 05:16AM PDT, ID: 22437477

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), Web Languages/Standards, Databases Miscellaneous
Tags: asp, ie 7.0, Microsoft OLE DB Provider for ODBC Drivers error '80040e14' Syntax error in UPDATE statement
Sign Up Now!
Solution Provided By: ibtaya
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628