-
Can't add a new record to a table!help me
I am a new learner,could you help me?
I want to add a record to the table,but couldn't.
when I run it,it said:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access 97 Driver] Can't update. Database or object is read-only.
/goverment/test1.asp, line 17
This my asp file:
<html>
<!--#include virtual="/ASPSAMP/SAMPLES/ADOVBS.INC"-->
<head>
<title>dbnewrec.asp</title>
</head>
<body bgcolor="#FFFFFF">
<%
conn="DSN=goverment;uid=gov;pwd=gov"
Set RS = Server.CreateObject("ADODB.Recordset"
RS.Open "year",Conn,3,3
RS.AddNew
RS("year"="1998"
'RS("Author" = auname
'RS("Year_Born"= int(auyear)
RS.Update
RS.Close
Set rs=nothing
%>
</body>
</html>
-
Can't add a new record to a table!help me (reply)
Hi sunmoon,
Sounds like your database is read-only. This is due to one of three things:
1) Problem: Your .MDB file is read only.
Solution: Go to the explorer, right-click on the .MDB file, choose
properties and turn OFF the read-only flag (and system or hidden too!)
2) Problem: Your DSN has the read-only attribute set.
Solution: Go to Control Panel, ODBC, System DSN, click on the DSN then
click Configure. Click Options and turn OFF the read-only checkbox.
3) Problem: You registered the ASP-db DLL under MTS, and the ID you are
using to access it with only has READ ONLY priviledges to the directory
or file you're trying to open.
Solution: Open up the Internet Information Server / Microsoft Transaction
Server and change the ID for the package that contains ASP-db to an
Admin level ID, or else, go to the explorer and give the ID mentioned
above, full rights to the MDB file.
Hope this helps!
John
On 12/22/98 2:38:31 AM, sunmoon wrote:
> I am a new learner,could you help me?
I want to add a record to the
> table,but couldn't.
when I run it,it said:
Microsoft OLE DB
> Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC
> Microsoft Access 97 Driver] Can't update. Database or object is
> read-only.
/goverment/test1.asp, line 17
This my asp
> file:
<html>
<!--#include
> virtual="/ASPSAMP/SAMPLES/ADOVBS.INC"-->
<head>
<title>dbnewrec.
> asp</title>
</head>
<body
> bgcolor="#FFFFFF">
<%
conn="DSN=goverment;uid=gov;pwd=gov"
>
Set RS = Server.CreateObject("ADODB.Recordset"
RS.Open
> "year",Conn,3,3
RS.AddNew
RS("year"="1998"
'
> RS("Author" = auname
'RS("Year_Born"=
> int(auyear)
RS.Update
RS.Close
Set rs=nothing
%>
</body>
</html>
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
|
|