Forums
This topic is locked
Error 0x800A000D
Posted 26 Dec 2005 16:40:12
1
has voted
26 Dec 2005 16:40:12 allan khalil posted:
<font face='Tahoma'>Hi,
Can somebody please help... I'm attempting to create a posting board on a site using dreamweaver 8. Using a MS Access DB, I have created a table with all the relevant columns, set the recordset and and debug it without error. When the script is executed I get the following error;
<b>Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'LBound'</b>
Here is the code;
<%
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert") <> "" Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
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_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & " values (" & MM_dbValues & ""
If (Not MM_abortEdit) Then
' execute the insert
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
%>
The error shows that this statement For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
is the problem, but i cant see where it has gone wrong... PLEASE HELP!
Many Thanks in Advance
</font id='Tahoma'>
Replies
Replied 26 Dec 2005 18:42:39
26 Dec 2005 18:42:39 allan khalil replied:
sorted it all out... Thanks
Replied 14 Feb 2006 12:51:35
14 Feb 2006 12:51:35 Isaac Weathers replied:
Could you please share what you did to correct the error?
Replied 12 Jul 2007 12:04:10
12 Jul 2007 12:04:10 Oisin O Gallachoir replied:
This is usually !!! caused by Dreamweaver Update & PURE ASP Upload inserting fields at the end of the form that are replica's:
<input type="hidden" name="MM_update" value="imgs">
<input type="hidden" name="MM_recordId" value="<%= rsData.Fields.Item("ID".Value %>">
<input type="hidden" name="MM_update" value="imgs">
<input type="hidden" name="MM_recordId" value="<%= rsData.Fields.Item("ID".Value %>">
Just delete the replica's and most times its works.
<input type="hidden" name="MM_update" value="imgs">
<input type="hidden" name="MM_recordId" value="<%= rsData.Fields.Item("ID".Value %>">
<input type="hidden" name="MM_update" value="imgs">
<input type="hidden" name="MM_recordId" value="<%= rsData.Fields.Item("ID".Value %>">
Just delete the replica's and most times its works.