|
-
Jan 21st, 2003, 03:23 AM
#1
Thread Starter
New Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|