From searching on that error message number, it appears to be either a
permissions problem, or a sql statement problem. To check the sql statement,
open a new query, change to SQL view, and copy the entire sql statement into
the query. If the sql won't execute, that's the problem. If it does, I would
still guess it's a permissions issue.
Looking at the sql statement, maybe DSuspend and DTreatBusyAsWell are
boolean data types? If so, specifying a string value of 'off' might be the
problem. Try replacing 'off' with the number 0 (no quotes) and see if that
works.
You can get more details on the error that is occuring. Start by including
err.Description as well as err.Number. Here is a routine I used in asp to
get more info on errors. You can safely call this procedure using the
included sample call line anywhere in your code. If the error number is 0 it
doesn't do anything, but if there is an error it inserts details into the
page output. For now, try adding it after the line of code that is causing
your error.
Function pjsShowErrors( _
strSource, _
lngErrNumber, _
strErrDescription, _
strErrSource, _
oConn _
)
'Example: pjsShowErrors("Updating login date", err.number, err.description,
err.source, oConn)
on error resume next
Dim lngError, lngErrorCount, oErr, fSuccess, strMsg
Dim fErrorVBScript, fErrorDatabase
strMsg = ""
fErrorVBScript = True 'Safe default here
fErrorVBScript = Not (lngErrNumber = 0)
If fErrorVBScript Then
strMsg = strMsg & "Error #" & lngErrNumber & " in " & strSource & ".<BR>"
& vbCrLf
If Application("ErrorDetailDisplay") Then
strMsg = strMsg _
& " VBScript Error Detail: " & strErrDescription _
& " (in " & strErrSource & ")<br>" & vbcrlf
End If
err.clear
End If
If IsObject(oConn) Then
fErrorDatabase = False 'Default before testing
lngErrorCount = oConn.Errors.Count
If lngErrorCount > 0 Then
'See if there is an error or just an informational warning
If fErrorVBScript Then 'No need to check DB error status. Assume an
error.
fErrorDatabase = True
ElseIf Application("SQLServer") Then
'Positive error numbers are informational warnings in SQL Server?
For each oErr in oConn.Errors
If (oErr.number < 0) Then
fErrorDatabase = True
Exit For
End If
Next
Else
'Using MSAccess
'Zero error number seems to occur in Jet 4.0 database
' if it's been opened by MSAccess?
For each oErr in oConn.Errors
If (oErr.number <> 0) Then
fErrorDatabase = True
Exit For
End If
Next
End If
If fErrorDatabase Then
'Summary intro to the error list
strMsg = strMsg & lngErrorCount
If lngErrorCount = 1 Then
strMsg = strMsg & " error "
Else
strMsg = strMsg & " errors "
End If
strMsg = strMsg & " occurred in the Data Connection:<br>" & vbcrlf
If Application("ErrorDetailDisplay") Then
strMsg = strMsg _
& " Database Error Detail " & strSource _
& " (in " & strErrSource & ")<br>" & vbcrlf
End If
'Comprehensive error list
For each oErr in oConn.Errors
strMsg = strMsg & "Connection Error hex#" _
& hex(oErr.number) & ".<br>"
If Application("ErrorDetailDisplay") Then
strMsg = strMsg & " " & oErr.description
strMsg = strMsg & " (in " & oErr.source & ")<br>" & vbcrlf
strMsg = strMsg & " Native Error: " & oErr.nativeError & _
", SQL State: " & oErr.SQLState & "<BR>" & vbcrlf
End If
Next
End If
oConn.Errors.Clear
End If
End If
If len(strMsg)>0 Then
Response.Write strMsg
End If
fSuccess = Not (fErrorVBScript Or fErrorDatabase)
pjsShowErrors = fSuccess
end function
Get the complete asp error message and post it here.
You can check the file and folder security settings. The account under
which
the website is running needs Modify access to the folder and the db file
so
it can create the .ldb file when it opens the db. You can also look in the
Windows event log for detailed messages.
The asp file logs this:
INSERT INTO clientTable (SFirstName, SLastName, SAddress, SApt, SCity,
SStateProvince, SPostalCode, SCountry, STelephone, SEmailAddress,
DFirstName, DLastName, DAddress, DApt, DCity, DStateProvince,
DPostalCode, DCountry, DTelephone, DCallTime, DAmPm, DRetryInterval,
HName1, HTelephone1, HName2, HTelephone2, HName3, HTelephone3,
DSuspend, DTreatBusyAsWell) VALUES ('bull', 'shot', '1', '',
'calgary', 'ab', 'a2b2c3', 'canada', '4035551212', '(e-mail address removed)',
'calf', 'shot', '2', '', 'Calgary', 'ab', 'a2b2c3', 'Canada',
'4035551313', '1', 'AM', '15', 'ca1', '4035551414', 'ca2',
'4035551515', 'ca3', '4035551616','off','off')
Err = -2147217900