View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Why am i getting errors from the Wizards code

Thread began 9/02/2009 4:09 pm by ryan.boyington264642 | Last modified 9/02/2009 6:58 pm by ryan.boyington264642 | 558 views | 1 replies

ryan.boyington264642

Why am i getting errors from the Wizards code

Microsoft JET Database Engine error '80040e14'

Syntax error in FROM clause.

/speaker_system_beta/TBL Speaker Biography_Update.asp, line 22

When i adjust the wizards code it then works

Wizards code:
Set WADATBLSpeakerBiography_cmd = Server.CreateObject ("ADODB.Command")
WADATBLSpeakerBiography_cmd.ActiveConnection = MM_speaker_bio_entry_STRING
WADATBLSpeakerBiography_cmd.CommandText = "SELECT ID, [Contact Photo] FROM TBL Speaker Biography"
WADATBLSpeakerBiography_cmd.Prepared = true

When I add square brackets around the from table it works - FROM [TBL Speaker Biography]

Update page errors

Here is the error i am getting:
Microsoft JET Database Engine error '80040e14'

Syntax error in UPDATE statement.

/speaker_system_beta/TBL Speaker Biography_Update.asp, line 57

Here is the asp code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../WA_DataAssist/WA_AppBuilder_VB.asp" -->
<!--#include file="../Connections/speaker_bio_entry.asp" -->
<%
Dim WADATBLSpeakerBiography__ParamID
WADATBLSpeakerBiography__ParamID = "-1"
If (Request.QueryString("ID") <> "") Then
WADATBLSpeakerBiography__ParamID = Request.QueryString("ID")
End If
%>
<%
Dim WADATBLSpeakerBiography
Dim WADATBLSpeakerBiography_cmd
Dim WADATBLSpeakerBiography_numRows

Set WADATBLSpeakerBiography_cmd = Server.CreateObject ("ADODB.Command")
WADATBLSpeakerBiography_cmd.ActiveConnection = MM_speaker_bio_entry_STRING
WADATBLSpeakerBiography_cmd.CommandText = "SELECT ID, [Contact Photo] FROM [TBL Speaker Biography] WHERE ID = ?"
WADATBLSpeakerBiography_cmd.Prepared = true
WADATBLSpeakerBiography_cmd.Parameters.Append WADATBLSpeakerBiography_cmd.CreateParameter("param1", 5, 1, -1, WADATBLSpeakerBiography__ParamID) ' adDouble

Set WADATBLSpeakerBiography = WADATBLSpeakerBiography_cmd.Execute
WADATBLSpeakerBiography_numRows = 0
%>
<%
' WA Application Builder Update
if (cStr(Request.Form("Update")) <> "") then
WA_connection = MM_speaker_bio_entry_STRING
WA_table = "TBL Speaker Biography"
WA_redirectURL = "TBL Speaker Biography_Results.asp"
WA_keepQueryString = false
WA_indexField = "ID"
WA_fieldNamesStr = "Contact Photo"
WA_fieldValuesStr = "" & cStr(cStr(Request.Form("Contact Photo"))) & ""
WA_columnTypesStr = "',none,''"
WA_comparisonStr = " LIKE "
WA_fieldNames = Split(WA_fieldNamesStr,"|")
WA_fieldValues = Split(WA_fieldValuesStr,"|")
WA_columns = Split(WA_columnTypesStr,"|")
WA_comparisions = Split(WA_comparisonStr, "|")

WA_where_fieldValuesStr = "" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
WA_where_columnTypesStr = "none,none,NULL"
WA_where_comparisonStr = "="
WA_where_fieldNames = Split(WA_indexField,"|")
WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
WA_where_columns = Split(WA_where_columnTypesStr,"|")
WA_where_comparisions = Split(WA_where_comparisonStr, "|")


updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)

set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = WA_connection
MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
MM_editCmd.Execute()
MM_editCmd.ActiveConnection.Close()
if (WA_redirectURL <> "") then
if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
if (inStr(WA_redirectURL,"?") > 0) then
WA_redirectURL = WA_redirectURL & "&"
else
WA_redirectURL = WA_redirectURL & "?"
end if
WA_redirectURL = WA_redirectURL & Request.QueryString
end if
Response.Redirect(WA_redirectURL)
end if
end if
%>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...