|
 |
asp_database_setup thread: error Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
Message #1 by "Max" <Twinsen24@h...> on Tue, 11 Dec 2001 18:08:35
|
|
Hi people,
I try to make a update data whit DB(access) with ASP
So i try 2 way but the 2 give me a error !!
This is the first way:
<%@ LANGUAGE = "VBScript" %>
<% response.buffer = true %>
<% session.LCID=&H040c %>
<%
'open DB
Set cn = Server.CreateObject("ADODB.Connection")
strpath = server.mappath("DATA.mdb")
cn.connectionstring="driver={microsoft access driver (*.mdb)};" & "dbq=" &
strpath & ";pwd=The pass;"
cn.open
strSQL = "SELECT * FROM menu"
set objsql = server.createobject("ADODB.Recordset")
objsql.open strsql, cn
objsql("item") = "meno"
objsql.update
objsql.movenext
more code but cut)
objsql.close
set objsql = nothing
cn.close
set cn = nothing
%>
THIS IS THE ERROR FOR THE FIRST WAY:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x924 Thread 0x994
DBC 0x20de234 Jet'.
THIS IS THE SECOND WAY
-----------------------
<%@ LANGUAGE = "VBScript" %>
<% response.buffer = true %>
<% session.LCID=&H040c %>
<%
'ouverture DB
Set cn = Server.CreateObject("ADODB.Connection")
strpath = server.mappath("DATA.mdb")
cn.connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strpath & ";Persist Security Info=true"
cn.Properties("Jet OLEDB:Database Password") = "the pass"
cn.open
strSQL = "SELECT * FROM menu"
set objsql = server.createobject("ADODB.Recordset")
objsql.open strsql, cn
objsql("item") = "meno"
objsql.update
objsql.movenext
more code but cut)
objsql.close
set objsql = nothing
cn.close
set cn = nothing
%>
THIS IS THE ERROR OF WAY 2:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of
the provider, or of the selected locktype.
So I thing i must change something in the regedit but what ?!
or that something else...
thank's bye
MAX
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 12 Dec 2001 17:24:53 +1100
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
: registry key 'Temporary (volatile) Jet DSN for process 0x924 Thread 0x994
: DBC 0x20de234 Jet'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First error:
www.adopenstatic.com/faq/whyOLEDB.asp
Use OLEDB, not ODBC. If you really want to stick with ODBC, delete the DSN
and recreate it in your ODBC Control Panel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: ADODB.Recordset (0x800A0CB3)
: Current Recordset does not support updating. This may be a limitation of
: the provider, or of the selected locktype.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Second error:
You are using the default locktype for your recordset: adLockReadOnly. You
can't update a ReadOnly recordset. Open the recordset with an
adLockOptimistic locktype:
www.adopenstatic.com/faq/800a0bb9.asp
Cheers
Ken
|
|
 |