Za :
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<!-- #INCLUDE file="adovbs.inc"-->
<%
Dim DB
Set DB = Server.CreateObject ("ADODB.Connection")
DB.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=c:\inetpub\wwwroot\asp_test\studenti.mdb")
Dim RS
Set RS = Server.CreateObject ("ADODB.Recordset")
RS.Open "Students", DB, adOpenStatic, adLockOptimistic
RS.AddNew
RS ("FirstName") = "aaa"
RS ("LastName") = "bbb"
RS ("EmailAddress") = "
[email protected]"
RS ("Birthdate") = CDate("19.7.1977")
RS.Update
RS.Close
DB.Close
%>
</body>
</html>
greska je:
Technical Information (for support personnel)
Error Type:
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.
/asp_test/tabela_insert.asp, line 20
-----------------------------------
a za:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
Dim DB
Set DB = Server.CreateObject ("ADODB.Connection")
DB.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=c:\inetpub\wwwroot\asp_test\studenti.mdb")
SQLStmt = "INSERT into students(StudentsID,FirstName,LastName,Birthdate,EmailAddress)"
SQLstmt = SQLstmt & " VALUES ("
SQLstmt = SQLstmt & "'100', 'aaa','bbb','20.6.1999','
[email protected]')"
Set RS = DB.execute(SQLstmt)
RS.Close
DB.Close
%>
</body>
</html>
greska je :
Technical Information (for support personnel)
Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/asp_test/tabela_insert1.asp, line 19