Closed Thread Icon

Preserved Topic: ASP database problem. Pages that link to <a href="https://ozoneasylum.com/backlink?for=21051" title="Pages that link to Preserved Topic: ASP database problem." rel="nofollow" >Preserved Topic: ASP database problem.\

 
Author Thread
StereoType
Bipolar (III) Inmate

From: the plushdjungle
Insane since: Oct 2001

posted posted 03-19-2002 20:43

(I'm a total newbe with databases)
When I try to add some information into a database, this message appears:
"ADODB.Recordset error '800a0cb3'

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype."

My guess is that the table (Access) is "read-only". where can I change that? I've searched my butt off to find the function in access, but I can't find it...

This is the database-code in the script, if it helps...

<!-- #include virtual="adovbs.inc" -->
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=\\genfs3\www25\banarne\db\forumdb.mdb"

Set RecSet = Server.CreateObject("ADODB.Recordset")
Visa = "SELECT * FROM forumet"
RecSet.Open Visa, Connect ', adOpenStatic, adLockOptimistic

RecSet("Namn") = namn
RecSet("Tid") = tim & ":" & min
RecSet("Datum") = datum2
RecSet("Kommentar") = kommentar
RecSet("Länk") = lank2
RecSet("Namn") = ip
RecSet.AddNew

RecSet.Close
Connect.Close




[This message has been edited by StereoType (edited 03-19-2002).]

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-19-2002 20:48

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

StereoType
Bipolar (III) Inmate

From: the plushdjungle
Insane since: Oct 2001

posted posted 03-19-2002 20:53

I actually have an account at brinkster. I'll go check it out right now.

tomeaglescz
Paranoid (IV) Inmate

From: Czech Republic via Bristol UK
Insane since: Feb 2002

posted posted 03-20-2002 09:48

i had this problem on one of my asp sites

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.

CAUSE
The following conditions cause this error to occur:

You have created a query that contains more than one table.


You are updating the records returned by this query and the update affects fields in more than one table.


Basically, if the query involves tables that have a one-to-many relationship, the query -as a whole- is not updateable.

RESOLUTION
Process one table's fields independently from another. Issue an Update after each table's fields have been modified. For example, in the code sample below, the "cmdTemp.CommandText" property holds the one-to-many query and the fields of parent table are updated independently of the child table.

<Object creation code removed for clarity>
.
.
.
cmdTemp.CommandText = "SELECT stores.state, sales.qty FROM sales INNER
JOIN stores ON sales.stor_id = stores.stor_id"
.
.
.
'update parent table first
Datacommand1("state")="WA"
Datacommand1.update

'now update child table
Datacommand1("qty")=4
Datacommand1.update




InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-20-2002 13:33

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

StereoType
Bipolar (III) Inmate

From: the plushdjungle
Insane since: Oct 2001

posted posted 03-20-2002 15:50

I don't get it. If I update the database with RecSet.Execute("UPDATE blah blah blah..."), wouldn't that just update an allready existing field?

or am I totally wrong..? I don't understand...

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-20-2002 15:57

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

StereoType
Bipolar (III) Inmate

From: the plushdjungle
Insane since: Oct 2001

posted posted 03-20-2002 16:14

oh, I think I understand now... I tested this line of code instead of the update-code;

RecSet.Execute("INSERT into forumet (Namn,Tid,Datum,Kommentar,Länk,IP) = (namn,tim & ':' & min,datum2,kommentar,lank2,ip)")

but then this message appeared:

"Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'RecSet.Execute'"

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-20-2002 16:18

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

StereoType
Bipolar (III) Inmate

From: the plushdjungle
Insane since: Oct 2001

posted posted 03-20-2002 16:53

ok, it should work now, but it doesn't. the code:

Connect.Execute("INSERT into forumet (Namn, Tid, Datum, Kommentar, Länk, IP) VALUES (namn, tim, datum2, kommentar, lank2, ip)")

the error:

"Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 6."

I can't see where those missing parameters would be...



[This message has been edited by StereoType (edited 03-20-2002).]

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-20-2002 17:17

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

StereoType
Bipolar (III) Inmate

From: the plushdjungle
Insane since: Oct 2001

posted posted 03-20-2002 17:30

ehm... well, when I put all values in single quotes, it finally works. BUT the values are variables, and in single quotes they are treated like simple text.
example:
'namn' becomes namn in the database, but the variable namn is 'StereoType'...


InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-20-2002 19:45

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

StereoType
Bipolar (III) Inmate

From: the plushdjungle
Insane since: Oct 2001

posted posted 03-20-2002 21:39

ah, I tested that, but I forgot to have the quotes AND the single quotes at the same time...

Thanks for helping a little newbe like me!

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 03-20-2002 21:53

One more thing (noticed you are a swede)

Do not use å, ä, ö in variables, table names and so on, in fact, lose them altogether in script/programming.

You have them here: "(Namn, Tid, Datum, Kommentar, Länk, IP)"

OverAndOut/Dan


-{ a vibration is a movement that doesn't know which way to go }-

StereoType
Bipolar (III) Inmate

From: the plushdjungle
Insane since: Oct 2001

posted posted 03-20-2002 22:04

well, I know that. I never use å ä ö in variables or so on. most of all because it doesn't work at all. BUT... I noticed that I, for the first time in history, can use å ä ö in access. that made me happy. very happy. so I decided to use it.

that's the whole story.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-20-2002 22:06

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

« BackwardsOnwards »

Show Forum Drop Down Menu