|
 |
asp_database_setup thread: Cannot update. Database or object is read-only.
Message #1 by "Tonya O'Donnell" <tonya@b...> on Mon, 17 Mar 2003 13:27:42
|
|
I have created a table that lists some database entries with links to
edit. it then switches to a form that displays that record using recid to
locate record & allows me to edit. i make the change then try & update &
get an error.
its says database or object is read only??? what am i missing
here is my script
<%
Dim ID, mySQL, myRS
ID = Request.Form("ID")
mySQL = "SELECT * FROM journal WHERE ID = " & ID
Set myRS = Server.CreateObject("ADODB.Recordset")
myRS.Open mySQL, myConn, adOpenKeyset, adLockOptimistic
myRS("date") = Request.Form("date")
myRS("title") = Request.Form("title")
myRS("text") = Request.Form("text")
myRS("pic") = Request.Form("pic")
myRS.Update
Response.Write "Record number " & ID & " was updated."
%>
<p>Return to <a href="../display1.asp">Display Table</a>.</p>
Message #2 by khalid qureshi <khalidone@y...> on Mon, 17 Mar 2003 07:33:28 -0800 (PST)
|
|
Hello I hope the this will solve your problem
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & DBPath & ";"
strSQL1= "Select * from Feedback"
Set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open ConnStr
set objRs = Server.CreateObject ("ADODB.RecordSet")
objRs.Open strSQL1, DBConn, 1, 3
--- Tonya O'Donnell <tonya@b...> wrote:
> I have created a table that lists some database
> entries with links to
> edit. it then switches to a form that displays that
> record using recid to
> locate record & allows me to edit. i make the change
> then try & update &
> get an error.
>
> its says database or object is read only??? what am
> i missing
>
>
> here is my script
>
>
> <%
> Dim ID, mySQL, myRS
> ID = Request.Form("ID")
> mySQL = "SELECT * FROM journal WHERE ID = " & ID
> Set myRS = Server.CreateObject("ADODB.Recordset")
> myRS.Open mySQL, myConn, adOpenKeyset,
> adLockOptimistic
> myRS("date") = Request.Form("date")
> myRS("title") = Request.Form("title")
> myRS("text") = Request.Form("text")
> myRS("pic") = Request.Form("pic")
> myRS.Update
> Response.Write "Record number " & ID & " was
> updated."
> %>
> <p>Return to <a href="../display1.asp">Display
> Table</a>.</p>
>
> ---
> You are currently subscribed to asp_database_setup
> as: khalidone@y...
> %%email.unsub%%
>
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com
Message #3 by "Tonya" <tonya@b...> on Mon, 17 Mar 2003 16:06:50 -0000
|
|
Hi
not sure really not using the microsoft jet oledb thingy using
<%
Dim myConn
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open "Student"
%>
& setting up a dsn
is that same ???
bit confused now as that changes my myConn code doesnt it.
help
----- Original Message -----
From: "khalid qureshi" <khalidone@y...>
To: "ASP Database Setup" <asp_database_setup@p...>
Sent: Monday, March 17, 2003 3:33 PM
Subject: [asp_database_setup] Re: Cannot update. Database or object is
read-only.
> Hello I hope the this will solve your problem
>
>
> ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=" & DBPath & ";"
>
> strSQL1= "Select * from Feedback"
>
> Set DBConn = Server.CreateObject("ADODB.Connection")
> DBConn.Open ConnStr
>
> set objRs = Server.CreateObject ("ADODB.RecordSet")
>
> objRs.Open strSQL1, DBConn, 1, 3
>
>
>
>
>
> --- Tonya O'Donnell <tonya@b...> wrote:
> > I have created a table that lists some database
> > entries with links to
> > edit. it then switches to a form that displays that
> > record using recid to
> > locate record & allows me to edit. i make the change
> > then try & update &
> > get an error.
> >
> > its says database or object is read only??? what am
> > i missing
> >
> >
> > here is my script
> >
> >
> > <%
> > Dim ID, mySQL, myRS
> > ID = Request.Form("ID")
> > mySQL = "SELECT * FROM journal WHERE ID = " & ID
> > Set myRS = Server.CreateObject("ADODB.Recordset")
> > myRS.Open mySQL, myConn, adOpenKeyset,
> > adLockOptimistic
> > myRS("date") = Request.Form("date")
> > myRS("title") = Request.Form("title")
> > myRS("text") = Request.Form("text")
> > myRS("pic") = Request.Form("pic")
> > myRS.Update
> > Response.Write "Record number " & ID & " was
> > updated."
> > %>
> > <p>Return to <a href="../display1.asp">Display
> > Table</a>.</p>
> >
> > ---
> > You are currently subscribed to asp_database_setup
> > as: khalidone@y...
> > %%email.unsub%%
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
>
%%email.unsub%%
>
>
Message #4 by "Tonya" <tonya@b...> on Mon, 17 Mar 2003 16:09:31 -0000
|
|
Hi
I am assuming the parameters 1 & 3 mean somthing but what i can't fathom ?
can u help explain to me thanks
Tonya
----- Original Message -----
From: "khalid qureshi" <khalidone@y...>
To: "ASP Database Setup" <asp_database_setup@p...>
Sent: Monday, March 17, 2003 3:33 PM
Subject: [asp_database_setup] Re: Cannot update. Database or object is
read-only.
> Hello I hope the this will solve your problem
>
>
> ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=" & DBPath & ";"
>
> strSQL1= "Select * from Feedback"
>
> Set DBConn = Server.CreateObject("ADODB.Connection")
> DBConn.Open ConnStr
>
> set objRs = Server.CreateObject ("ADODB.RecordSet")
>
> objRs.Open strSQL1, DBConn, 1, 3
>
>
>
>
>
> --- Tonya O'Donnell <tonya@b...> wrote:
> > I have created a table that lists some database
> > entries with links to
> > edit. it then switches to a form that displays that
> > record using recid to
> > locate record & allows me to edit. i make the change
> > then try & update &
> > get an error.
> >
> > its says database or object is read only??? what am
> > i missing
> >
> >
> > here is my script
> >
> >
> > <%
> > Dim ID, mySQL, myRS
> > ID = Request.Form("ID")
> > mySQL = "SELECT * FROM journal WHERE ID = " & ID
> > Set myRS = Server.CreateObject("ADODB.Recordset")
> > myRS.Open mySQL, myConn, adOpenKeyset,
> > adLockOptimistic
> > myRS("date") = Request.Form("date")
> > myRS("title") = Request.Form("title")
> > myRS("text") = Request.Form("text")
> > myRS("pic") = Request.Form("pic")
> > myRS.Update
> > Response.Write "Record number " & ID & " was
> > updated."
> > %>
> > <p>Return to <a href="../display1.asp">Display
> > Table</a>.</p>
> >
> > ---
> > You are currently subscribed to asp_database_setup
> > as: khalidone@y...
> > %%email.unsub%%
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
>
%%email.unsub%%
>
>
|
|
 |