Skip to main content
Participant
May 12, 2006
Question

Insert records error message - PLEASE HELP

  • May 12, 2006
  • 1 reply
  • 228 views
Any one know what this means? I am really having a hard time getting the insert feature to work. Using ASP. Thanks so much!

Microsoft VBScript runtime error '800a000d"
Type mismatch: 'LBound'
/admin_employee_insert.asp, line 101


' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 [LINE 101]
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
This topic has been closed for replies.

1 reply

May 12, 2006
The error can occur in a SELECT, UPDATE, INSERT or other SQL query. Usually, each simply means that you are trying to query, change, or add to a given field but the data you are using does not match the type of that field or that the field name you are using doesn't exist. Check your code and check your database to ensure that the field type is correct for the data type you are trying to edit / update.