-
INSERT INTO Error
This is the error that i get:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use.
here is my code:
Dim objConnection
Dim rsRiskFactorScores
Dim strConnectionString
Dim strSQL
strConnectionString = "DSN=testdb"
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open strConnectionstring
strSQL = ""
strSQL = strSQL & "INSERT INTO tblRiskFactorScores ("
strSQL = strSQL & "CaseNumber ,"
strSQL = strSQL & "chkSinus "
strsql = strsql & ") VALUES ( "
strSQL = strSQL & Request.Form("casenum") & ", "
strSQL = strSQL & TestChecked(request.Form("chksinus")) & " "
strsql = strsql & ") "
on error resume next
objConnection.Execute (strSQL)
if err.number=-2147217904 then
response.Write("ERROR! DATA WAS NOT SAVED.")
elseif err.number <> 0 then
response.write err.description
response.Write("An unkown error has occured. data was not saved.")
end if
Please can someone help
thanks
-
It usually means that either incorrect permissions are set on the server or the incorrect version of MDAC (Microsoft Data Access Components installed on the server or the version is not correctly installed). You need to ensure the ODBC version you have is 4 or greater.
Check the *NTFS* permissions for:
a) the .mdb file (needs to be RX)
b) the /folder/ that the .mdb file is in - this is so that Access can create and delete the .ldb lockfile
c) the %systemroot%\temp folder (Access needs to be able to read/write to
this folder to create Jet temporary files