ASP - DB ReadOnly zasto?
08.09.2004. u 12:36 · pre 269 meseci
#1
Zašto mi javlja da je baza ReadOnly?
ili sledeće:
Code:
<%
Dim DB
Set DB = Server.CreateObject ("ADODB.Connection")
DB.Mode = adModeReadWrite
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
%>
<%
Dim DB
Set DB = Server.CreateObject ("ADODB.Connection")
DB.Mode = adModeReadWrite
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
%>
ili sledeće:
Code:
<%
Dim DB
Set DB = Server.CreateObject ("ADODB.Connection")
DB.Mode = adModeReadWrite
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") = "Manas"
RS ("LastName") = "Tungare"
RS ("EmailAddress") = "[email protected]"
RS ("Birthdate") = CDate("19.7.1977")
RS.Update
RS.Close
DB.Close
%>
<%
Dim DB
Set DB = Server.CreateObject ("ADODB.Connection")
DB.Mode = adModeReadWrite
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") = "Manas"
RS ("LastName") = "Tungare"
RS ("EmailAddress") = "[email protected]"
RS ("Birthdate") = CDate("19.7.1977")
RS.Update
RS.Close
DB.Close
%>