"We are back" « oc.at

datenbank problem

Umlüx 16.07.2002 - 23:02 938 10
Posts

Umlüx

Huge Metal Fan
Avatar
Registered: Jun 2001
Location: Kärnten
Posts: 9006
ich hab mich etwas mit datenbanken rumgespielt. lesen ist kein problem, funktioniert prächtig *a bissel stolz bin*. Doch sobald ich etwas reinschreiben will kommt nur:
Code:
Microsoft OLE DB Provider for ODBC Drivers Fehler '80004005' 

[Microsoft][ODBC Microsoft Access Driver] Operation muss eine aktualisierbare Abfrage verwenden.

was könnt da sein?

usstribe

Little Overclocker
Registered: Jun 2002
Location: Wien
Posts: 94
Der User unter dem das Programm läuft hat keine Schreibrechte auf die DB oder die DB ist prinzipiell schreibgeschützt

Umlüx

Huge Metal Fan
Avatar
Registered: Jun 2001
Location: Kärnten
Posts: 9006
wie oder wo kann ich das ändern?

edit: verdammt, überall steht ich soll die zugriffsrechte auf dateiebene checken. aber da gibts nix zu checken da steht nix!
Bearbeitet von Umlüx am 17.07.2002, 00:03

usstribe

Little Overclocker
Registered: Jun 2002
Location: Wien
Posts: 94
Welches OS? welche Access Version? welche MDAC Version?

Umlüx

Huge Metal Fan
Avatar
Registered: Jun 2001
Location: Kärnten
Posts: 9006
WinXP, Access2000, keine ahnung wo steht das?

mitterweile hab ich entdeckt dass man im IIS Panel schreibrechte verteilen kann, fehler bleibt aber dennoch bestehen...

Ringding

Pilot
Avatar
Registered: Jan 2002
Location: Perchtoldsdorf/W..
Posts: 4300
Schaut mir eher aus, als ob du in einer Query was ändern wolltest.

Yeahman

OC Addicted
Avatar
Registered: Jul 2001
Location: on top of my sol..
Posts: 1775
Post mal den Query, und wast sonst noch so rumgespielt hast ...

usstribe

Little Overclocker
Registered: Jun 2002
Location: Wien
Posts: 94
Also entweder fehlt da ein Schreibrecht auf Filesys-ebene (ja leicht zu überprüfen) oder aber sieh mal in Acc2000 unter Extras/Sicherheit nach. Da kannst zusätzliche Berechtigungen vergeben. Der Fehler geht eindeutig in die Richtung

Ringding

Pilot
Avatar
Registered: Jan 2002
Location: Perchtoldsdorf/W..
Posts: 4300
Also so eindeutig ist das überhaupt nicht. Wenn er ein select mit joins oder irgendwelchen Funktionen macht, dann kann er darin meistens nichts mehr ändern, und genau das will er anscheinend machen.

usstribe

Little Overclocker
Registered: Jun 2002
Location: Wien
Posts: 94
Technet:
PSS ID Number: Q175168
Article last modified on 08-23-2001

:2.0,2.1,2.1 SP2,2.5,2.6,4.0,5.0




======================================================================
-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Active Server Pages
- Microsoft Internet Information Server versions 4.0, 5.0
- ActiveX Data Objects (ADO), versions 2.0, 2.1, 2.1 SP2, 2.5, 2.7
- Microsoft Data Access Components versions 2.5, 2.6, 2.7
-------------------------------------------------------------------------------

SYMPTOMS
========

You may encounter the following common error when you use ActiveX Data Objects
(ADO) with Active Server Pages (ASP):

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access 97 Driver] Operation must use an updateable
query.

CAUSE
=====

This article explains the four primary causes of this error and the
corresponding workarounds. Although this article refers to Microsoft Access
databases, the information provided here also applies to other types of
databases.

RESOLUTION
==========

This error is typically encountered when your script attempts to perform an
UPDATE or some other action that alters the information in the database. This
error occurs because ADO is unable to write to the database for one of the
following reasons:

1. The most common reason is that the Internet Guest account (IUSR_MACHINE),
which is by default part of the "Everyone" group, does not have Write
permissions on the database file (.mdb). To fix this problem, use the
Security tab in Explorer to adjust the properties for this file so that the
Internet Guest account has the correct permissions.

NOTE: When using Microsoft Access databases with ADO, it is also necessary to
give the Internet Guest account Write permissions on the directory containing
the .mdb file. This is because Jet creates an .ldb file to handle database
locking. You may also need to give read/write permission on the "Temp" folder
because Jet may create temporary files in this directory.

2. A second cause of this error is that the database was not opened with the
correct MODE for writing. If you perform the Open on the Connection object,
you use the Mode property to indicate the permissions on the connection as
shown here:

SQL = "UPDATE Products Set UnitPrice = 2;"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Mode = 3 '3 = adModeReadWrite
Conn.Open "myDSN"
Conn.Execute(SQL)
Conn.Close

NOTE: By default, the MODE is set to 0(adModeUnknown), which generally allows
updates.

3. Another cause of this error is that the "Read Only" setting may be checked in
the Options page for this DSN in the ODBC Manager.

4. The last issue and work around pertains to any SQL data source. The error can
be caused by SQL statements that violate referential integrity of the
database. Here are a few of the most common queries that fail:

- The simplest group to deal with are those you cannot change: crosstab, SQL
pass-through, union, or update (or make-table) action queries that have
UniqueValue properties set to Yes.

- Another very common cause is when the join includes linked ODBC tables
that do not have unique indexes. In this case, there is no way for SQL to
guarantee that records are unique in a table that has fields whose value
will change with the query.

- One cause does have a robust workaround. If you try to update a join field
on the "one" side of a "one-to-many" query it will fail unless you turn on
cascading updates. This way, you delegate referential integrity to the JET
engine.

STATUS
======

This behavior is by design.

Additional query words:

======================================================================
Keywords : kberrmsg kbASP kbDatabase kbGrpDSASP kbGrpDSMDAC kbDSupport kbMDAC210SP2 kbMDAC250 kbiis400 kbiis500 kbGrpDSASPDB kbMDAC260 kbATM kbmdac270 kbado270
Technology : kbiisSearch kbAudDeveloper kbADOsearch kbASPsearch kbADO210 kbADO200 kbADO210sp2 kbADO250 kbiis500 kbiis400 kbMDACSearch kbMDAC250 kbMDAC260 kbMDAC270 kbADO270
Version : :2.0,2.1,2.1 SP2,2.5,2.6,4.0,5.0
Issue type : kbprb
=============================================================================
Copyright Microsoft Corporation 2001.

Umlüx

Huge Metal Fan
Avatar
Registered: Jun 2001
Location: Kärnten
Posts: 9006
danke, des problem iss gelöst.
es war echt nur ein zugriffsfehler. in WinXP musst des Panel erst freischalten wo für ein File den verschiedenen Usern verschiedene Rechte zuteilen kannst. und das hab ich noch ned entdeckt gehabt.
Die DB settings waren alle in ordnung. zerscht hab ich nur gedacht ich muss noch was bei den DB Treibern verstellen aber ich hab sowieso einen Zugriff ohne DSN, also wärs das eh ned gewesen.
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz