Hi! It's been about 10 years since I've done any code writing so please bear with me
I have a website that uses .asp and an Access database (I know, it's not the best choice). I decided that I would like to add a couple more functions to the website and wrote the new code.
I have had nothing but problems with the new functions and cannot for the life of me figure out what the problem is. I have spent about 4 straight days on this so far, and don't have much patience left
This is NOT a permissions problem. I have been in contact with my server troubleshooting guys and they say there is NOTHING on their end that can be changed. Additionally, the other functions work fine...update, addnew, delete etc
Here is the code from the most simple of the new functions.
a check shows that request("Email") is correct and transfers to strEmail fine. data("Email") receives from strEmail fine too. The error description I get is [ODBC Microsoft Access Driver] Cannot update. Database or object is read-only. The error occurs at data.update.
<% @language = vbscript%>
<%on error resume next%>
<%dim connection, check, data, strEmail
if session("loginOK") <> "true" then
Select Case request("Page")
Set connection = Server.createObject( "ADODB.Connection")
check = "Select * from ReportEmailContacts"
set data = Server.createObject ("ADODB.Recordset")
data.open check, connection, adOpenDynamic, adLockOptimistic
do until data.eof
if data("Email") = strEmail then
response.write "That email address is already in use. Please hit the back button to try again"
data("Email") = strEmail
I have tried tried adding "data.close" and "set data = nothing" but that creates another set of errors.
Thanks for any help that you can give
Erin the frustrated