<% ' *** Edit Operations: declare variables Dim MM_editAction Dim MM_abortEdit Dim MM_editQuery Dim MM_editCmd Dim MM_editConnection Dim MM_editTable Dim MM_editRedirectUrl Dim MM_editColumn Dim MM_recordId Dim MM_fieldsStr Dim MM_columnsStr Dim MM_fields Dim MM_columns Dim MM_typeArray Dim MM_formVal Dim MM_delim Dim MM_altVal Dim MM_emptyVal Dim MM_i MM_editAction = CStr(Request.ServerVariables('SCRIPT_NAME')) If (Request.QueryString <> '') Then MM_editAction = MM_editAction & '?' & Server.HTMLEncode(Request.QueryString) End If ' boolean to abort record edit MM_abortEdit = false ' query string to execute MM_editQuery = '' %> <% ' *** Update Record: set variables If (CStr(Request('MM_update')) = 'UpdateForm' And CStr(Request('MM_recordId')) <> '') Then MM_editConnection = MM_connCafe_STRING MM_editTable = 'tblCalendar' MM_editColumn = 'IDMenu' MM_recordId = '' + Request.Form('MM_recordId') + '' MM_editRedirectUrl = 'index.asp' MM_fieldsStr = 'IDMenu|value|menu_date|value|menu_item1|value|menu_item2|value|menu_item3|value |menu_item4|value|menu_item5|value|menu_item6|value|menu_item7|value|menu_item8| value|menu_item9|value|menu_item10|value|timestamp|value' MM_columnsStr = 'IDMenu|none,none,NULL|menu_date|#,none,NULL|menu_item1|',none,''|menu_item2|',n one,''|menu_item3|',none,''|menu_item4|',none,''|menu_item5|',none,''|menu_item6 |',none,''|menu_item7|',none,''|menu_item8|',none,''|menu_item9|',none,''|menu_i tem10|',none,''|timestamp|#,none,NULL' ' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, '|') MM_columns = Split(MM_columnsStr, '|') ' set the form values For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i))) Next ' append the query string to the redirect URL If (MM_editRedirectUrl <> '' And Request.QueryString <> '') Then If (InStr(1, MM_editRedirectUrl, '?', vbTextCompare) = 0 And Request.QueryString <> '') Then MM_editRedirectUrl = MM_editRedirectUrl & '?' & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & '&' & Request.QueryString End If End If End If %> <% ' *** Update Record: construct a sql update statement and execute it If (CStr(Request('MM_update')) <> '' And CStr(Request('MM_recordId')) <> '') Then ' create the sql update statement MM_editQuery = 'update ' & MM_editTable & ' set ' For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_formVal = MM_fields(MM_i+1) MM_typeArray = Split(MM_columns(MM_i+1),',') MM_delim = MM_typeArray(0) If (MM_delim = 'none') Then MM_delim = '' MM_altVal = MM_typeArray(1) If (MM_altVal = 'none') Then MM_altVal = '' MM_emptyVal = MM_typeArray(2) If (MM_emptyVal = 'none') Then MM_emptyVal = '' If (MM_formVal = '') Then MM_formVal = MM_emptyVal Else If (MM_altVal <> '') Then MM_formVal = MM_altVal ElseIf (MM_delim = ''') Then ' escape quotes MM_formVal = ''' & Replace(MM_formVal,''','''') & ''' Else MM_formVal = MM_delim + MM_formVal + MM_delim End If End If If (MM_i <> LBound(MM_fields)) Then MM_editQuery = MM_editQuery & ',' End If MM_editQuery = MM_editQuery & MM_columns(MM_i) & ' = ' & MM_formVal Next MM_editQuery = MM_editQuery & ' where ' & MM_editColumn & ' = ' & MM_recordId If (Not MM_abortEdit) Then ' execute the update Set MM_editCmd = Server.CreateObject('ADODB.Command') MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close If (MM_editRedirectUrl <> '') Then Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim rsUpdate Dim rsUpdate_numRows Set rsUpdate = Server.CreateObject('ADODB.Recordset') rsUpdate.ActiveConnection = MM_connCafe_STRING rsUpdate.Source = 'SELECT * FROM tblCalendar' rsUpdate.CursorType = 0 rsUpdate.CursorLocation = 2 rsUpdate.LockType = 1 rsUpdate.Open() rsUpdate_numRows = 0 %> Update Menu Form
IDMenu: ' size='32'>
Menu_date: ' size='32'>
Menu_item1: ' size='32'>
Menu_item2: ' size='32'>
Menu_item3: ' size='32'>
Menu_item4: ' size='32'>
Menu_item5: ' size='32'>
Menu_item6: ' size='32'>
Menu_item7: ' size='32'>
Menu_item8: ' size='32'>
Menu_item9: ' size='32'>
Menu_item10: ' size='32'>
Timestamp: ' size='32'>
&nbsp;
'> '>

&nbsp;

<% rsUpdate.Close() Set rsUpdate = Nothing %>:confused; [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => jkeeler [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> Microsoft OLE DB Provider for ODBC Drivers error'80040e14' - Dreamweaver AppDev

Microsoft OLE DB Provider for ODBC Drivers error'80040e14' - Dreamweaver AppDev

I keep getting this error on the update asp page. I am very new at this and would appreciate any help. Thank you. Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement. /updatemenu.asp, line 111 This is my script... <%LANGUAGE='VBSCRIPT' CODEPAGE='1252'%> <!--#include file='Connections/connCafe.asp' --> <% ' *** Edit Operations: declare variables Dim MM_editAction Dim MM_abortEdit Dim MM_editQuery Dim MM_editCmd Dim MM_editConnection Dim MM_editTable Dim MM_editRedirectUrl Dim MM_editColumn Dim MM_recordId Dim MM_fieldsStr Dim MM_columnsStr Dim MM_fields Dim MM_columns Dim MM_typeArray Dim MM_formVal Dim MM_delim Dim MM_altVal Dim MM_emptyVal Dim MM_i MM_editAction = ...

  1. #1

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

    I keep getting this error on the update asp page. I am very new at this and
    would appreciate any help. Thank you. Microsoft OLE DB Provider for ODBC
    Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax
    error in UPDATE statement. /updatemenu.asp, line 111 This is my script...
    <%LANGUAGE='VBSCRIPT' CODEPAGE='1252'%> <!--#include
    file='Connections/connCafe.asp' --> <% ' *** Edit Operations: declare variables
    Dim MM_editAction Dim MM_abortEdit Dim MM_editQuery Dim MM_editCmd Dim
    MM_editConnection Dim MM_editTable Dim MM_editRedirectUrl Dim MM_editColumn Dim
    MM_recordId Dim MM_fieldsStr Dim MM_columnsStr Dim MM_fields Dim MM_columns
    Dim MM_typeArray Dim MM_formVal Dim MM_delim Dim MM_altVal Dim MM_emptyVal Dim
    MM_i MM_editAction = CStr(Request.ServerVariables('SCRIPT_NAME')) If
    (Request.QueryString <> '') Then MM_editAction = MM_editAction &amp; '?'
    &amp; Server.HTMLEncode(Request.QueryString) End If ' boolean to abort record
    edit MM_abortEdit = false ' query string to execute MM_editQuery = '' %> <% '
    *** Update Record: set variables If (CStr(Request('MM_update')) = 'UpdateForm'
    And CStr(Request('MM_recordId')) <> '') Then MM_editConnection =
    MM_connCafe_STRING MM_editTable = 'tblCalendar' MM_editColumn = 'IDMenu'
    MM_recordId = '' + Request.Form('MM_recordId') + '' MM_editRedirectUrl =
    'index.asp' MM_fieldsStr =
    'IDMenu|value|menu_date|value|menu_item1|value|men u_item2|value|menu_item3|value
    |menu_item4|value|menu_item5|value|menu_item6|valu e|menu_item7|value|menu_item8|
    value|menu_item9|value|menu_item10|value|timestamp |value' MM_columnsStr =
    'IDMenu|none,none,NULL|menu_date|#,none,NULL|menu_ item1|',none,''|menu_item2|',n
    one,''|menu_item3|',none,''|menu_item4|',none,''|m enu_item5|',none,''|menu_item6
    |',none,''|menu_item7|',none,''|menu_item8|',none, ''|menu_item9|',none,''|menu_i
    tem10|',none,''|timestamp|#,none,NULL' ' create the MM_fields and MM_columns
    arrays MM_fields = Split(MM_fieldsStr, '|') MM_columns =
    Split(MM_columnsStr, '|') ' set the form values For MM_i =
    LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(MM_i+1) =
    CStr(Request.Form(MM_fields(MM_i))) Next ' append the query string to the
    redirect URL If (MM_editRedirectUrl <> '' And Request.QueryString <> '') Then
    If (InStr(1, MM_editRedirectUrl, '?', vbTextCompare) = 0 And
    Request.QueryString <> '') Then MM_editRedirectUrl = MM_editRedirectUrl
    &amp; '?' &amp; Request.QueryString Else MM_editRedirectUrl =
    MM_editRedirectUrl &amp; '&amp;' &amp; Request.QueryString End If End If
    End If %> <% ' *** Update Record: construct a sql update statement and execute
    it If (CStr(Request('MM_update')) <> '' And CStr(Request('MM_recordId')) <>
    '') Then ' create the sql update statement MM_editQuery = 'update ' &amp;
    MM_editTable &amp; ' set ' For MM_i = LBound(MM_fields) To UBound(MM_fields)
    Step 2 MM_formVal = MM_fields(MM_i+1) MM_typeArray =
    Split(MM_columns(MM_i+1),',') MM_delim = MM_typeArray(0) If (MM_delim =
    'none') Then MM_delim = '' MM_altVal = MM_typeArray(1) If (MM_altVal =
    'none') Then MM_altVal = '' MM_emptyVal = MM_typeArray(2) If
    (MM_emptyVal = 'none') Then MM_emptyVal = '' If (MM_formVal = '') Then
    MM_formVal = MM_emptyVal Else If (MM_altVal <> '') Then
    MM_formVal = MM_altVal ElseIf (MM_delim = ''') Then ' escape quotes
    MM_formVal = ''' &amp; Replace(MM_formVal,''','''') &amp; ''' Else
    MM_formVal = MM_delim + MM_formVal + MM_delim End If End If
    If (MM_i <> LBound(MM_fields)) Then MM_editQuery = MM_editQuery &amp; ','
    End If MM_editQuery = MM_editQuery &amp; MM_columns(MM_i) &amp; ' = '
    &amp; MM_formVal Next MM_editQuery = MM_editQuery &amp; ' where ' &amp;
    MM_editColumn &amp; ' = ' &amp; MM_recordId If (Not MM_abortEdit) Then '
    execute the update Set MM_editCmd = Server.CreateObject('ADODB.Command')
    MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText =
    MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close
    If (MM_editRedirectUrl <> '') Then Response.Redirect(MM_editRedirectUrl)
    End If End If End If %> <% Dim rsUpdate Dim rsUpdate_numRows Set
    rsUpdate = Server.CreateObject('ADODB.Recordset') rsUpdate.ActiveConnection =
    MM_connCafe_STRING rsUpdate.Source = 'SELECT * FROM tblCalendar'
    rsUpdate.CursorType = 0 rsUpdate.CursorLocation = 2 rsUpdate.LockType = 1
    rsUpdate.Open() rsUpdate_numRows = 0 %> <!DOCTYPE HTML PUBLIC '-//W3C//DTD
    HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'> <html>
    <head> <meta http-equiv='Content-Type' content='text/html; cht=iso-8859-1'>
    <title>Update Menu Form</title> </head> <body> <form
    action='<%=MM_editAction%>' method='POST' name='UpdateForm' id='UpdateForm'>
    <table align='center'> <tr valign='baseline'> <td nowrap
    align='right'>IDMenu:</td> <td><input type='text' name='IDMenu'
    value='<%=(rsUpdate.Fields.Item('IDMenu').Value)%> ' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap align='right'>Menu_date:</td>
    <td><input type='text' name='menu_date'
    value='<%=(rsUpdate.Fields.Item('menu_date').Value )%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Menu_item1:</td> <td><input type='text' name='menu_item1'
    value='<%=(rsUpdate.Fields.Item('menu_item1').Valu e)%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Menu_item2:</td> <td><input type='text' name='menu_item2'
    value='<%=(rsUpdate.Fields.Item('menu_item2').Valu e)%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Menu_item3:</td> <td><input type='text' name='menu_item3'
    value='<%=(rsUpdate.Fields.Item('menu_item3').Valu e)%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Menu_item4:</td> <td><input type='text' name='menu_item4'
    value='<%=(rsUpdate.Fields.Item('menu_item4').Valu e)%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Menu_item5:</td> <td><input type='text' name='menu_item5'
    value='<%=(rsUpdate.Fields.Item('menu_item5').Valu e)%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Menu_item6:</td> <td><input type='text' name='menu_item6'
    value='<%=(rsUpdate.Fields.Item('menu_item6').Valu e)%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Menu_item7:</td> <td><input type='text' name='menu_item7'
    value='<%=(rsUpdate.Fields.Item('menu_item7').Valu e)%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Menu_item8:</td> <td><input type='text' name='menu_item8'
    value='<%=(rsUpdate.Fields.Item('menu_item8').Valu e)%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Menu_item9:</td> <td><input type='text' name='menu_item9'
    value='<%=(rsUpdate.Fields.Item('menu_item9').Valu e)%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Menu_item10:</td> <td><input type='text' name='menu_item10'
    value='<%=(rsUpdate.Fields.Item('menu_item10').Val ue)%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>Timestamp:</td> <td><input type='text' name='timestamp'
    value='<%=(rsUpdate.Fields.Item('timestamp').Value )%>' size='32'> </td>
    </tr> <tr valign='baseline'> <td nowrap
    align='right'>&amp;nbsp;</td> <td><input type='submit' value='Update
    record'> </td> </tr> </table> <input type='hidden'
    name='MM_update' value='UpdateForm'> <input type='hidden' name='MM_recordId'
    value='<%= rsUpdate.Fields.Item('menu_date').Value %>'> <input type='hidden'
    name='MM_recordId' value='<%= rsUpdate.Fields.Item('IDMenu').Value %>'> </form>
    <p>&amp;nbsp;</p> </body> </html> <% rsUpdate.Close() Set rsUpdate = Nothing
    %>:confused;

    jkeeler Guest

  2. #2

    Default Re: Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

    [url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_18808[/url]

    --
    __________________________________________________ __________________
    UltraSuite Extension Packages: [url]http://www.ultrasuite.com/[/url]
    The *most popular* Suites of DMX 2004 and DMX Server Behaviors
    for ASP, ASP.Net, ColdFusion, JSP, and PHP_MySQL
    __________________________________________________ __________________


    J.S. \(UltraSuite\) Guest

Similar Threads

  1. Question Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
    By Unregistered in forum Brainstorming Area
    Replies: 0
    Last Post: February 17th, 08:15 AM
  2. Replies: 1
    Last Post: August 18th, 12:32 AM
  3. Help!! Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
    By Help!! Microsoft OLE DB Provider for ODBC Drivers error '80040e37' in forum ASP Components
    Replies: 1
    Last Post: August 13th, 07:32 PM
  4. Replies: 1
    Last Post: August 26th, 03:49 PM
  5. Replies: 2
    Last Post: July 1st, 02:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139