Ask a Question related to ASP Database, Design and Development.
-
tamimi #1
Database Update Error
I have a guestbook form that inserts the fields into an
Access Database. The database is residing in the "fpdb"
folder that was created by FrontPage. The ASP page that
writes the data into the databse uses the
"recordset.addnew" method. The code was working fine a
couple of weeks ago, and now all of a sudden the error
message "Cannot update.Database or object is read-only"
pops up. The ASP code or the database was not changed or
modified in any way, neither were the permissions for the
account. Any ideas regarding this problem is truly
appreciated? Thanks. Here are my connection strings:
<%
Dim connectionToDatabase,recordset
set connection=Server.CreateObject("ADODB.Connection")
set recordset=Server.CreateObject("ADODB.Recordset")
connection.Open "Data
Source=c:\Inetpub\wwwroot\xxxx\fpdb\addnewrecords. mdb" &_
";Provider=Microsoft.Jet.OLEDB.4.0;"
recordset.Open "select * From Table", connection,1,2
recordset.addnew
recordset("socialsecurity")=request.form("ssnumber ")
recordset("name")=request.form("name")
recordset("age")=request.form("age")
recordset.Update
recordset.close
set connection=nothing
response.write "A new record had been added successfully to
the database"
%>
..
tamimi Guest
-
Use a CFC to update a database with a date
Hi All, I am trying to input a date in a database field with the current date. The datefield is in one table and I only want the date to be inserted... -
update database
I have a database where I need to input values that I calculate. I only need to do this once, so I wanted to write a template to do this quickly. I... -
PHP and mySQL database update
I am listing information from a mySQL DB and have edit buttons after each record. I want to be able to update what ever record by clicking the... -
Can a web service update a database ?
Traditionally, examples of web service show them serving some data back to the clients. Can they update to a DB on the server too ? -
update from between database
I have a Informix Database on Solaris and a SQL database. I need to update from Informix to SQL daily. Is there any easy way of doing it? BTW, I... -
Ray at #2
Re: Database Update Error
[url]http://www.aspfaq.com/5003[/url]
Ray at work
"tamimi" <tamimin1@scranton.edu> wrote in message
news:0ce201c3be89$0c8e1160$a001280a@phx.gbl...> I have a guestbook form that inserts the fields into an
> Access Database. The database is residing in the "fpdb"
> folder that was created by FrontPage. The ASP page that
> writes the data into the databse uses the
> "recordset.addnew" method. The code was working fine a
> couple of weeks ago, and now all of a sudden the error
> message "Cannot update.Database or object is read-only"
> pops up. The ASP code or the database was not changed or
> modified in any way, neither were the permissions for the
> account. Any ideas regarding this problem is truly
> appreciated? Thanks. Here are my connection strings:
>
> <%
> Dim connectionToDatabase,recordset
> set connection=Server.CreateObject("ADODB.Connection")
> set recordset=Server.CreateObject("ADODB.Recordset")
>
> connection.Open "Data
> Source=c:\Inetpub\wwwroot\xxxx\fpdb\addnewrecords. mdb" &_
> ";Provider=Microsoft.Jet.OLEDB.4.0;"
>
>
> recordset.Open "select * From Table", connection,1,2
>
> recordset.addnew
>
> recordset("socialsecurity")=request.form("ssnumber ")
> recordset("name")=request.form("name")
> recordset("age")=request.form("age")
>
> recordset.Update
> recordset.close
> set connection=nothing
>
> response.write "A new record had been added successfully to
> the database"
>
> %>
>
> .
Ray at Guest
-
Aaron Bertrand - MVP #3
Re: Database Update Error
> recordset.Open "select * From Table", connection,1,2
Ugh. Do you know how horribly inefficient this is?>
> recordset.addnew
Anyway, for the error message, skim through:
[url]http://www.aspfaq.com/2009[/url]
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
Aaron Bertrand - MVP Guest



Reply With Quote

