p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: insert


Message #1 by mr_mcdo@y... on Fri, 21 Jun 2002 16:44:23
Every time i try to do update or insert into a database, here is the 
message a get:

/////////////////////////////////////////////////////////////

Type d'erreur :
Microsoft JET Database Engine (0x80004005)
L'opération doit utiliser une requête qui peut être mise à jour.
/Conger/DayOff.asp, line 21

/////////////////////////////////////////////////////////////

for geting information, no probleme, here my code:

<%
dim objConn, objRs, objComm,sql

set objConn = Server.CreateObject ("ADODB.Connection")
set objRs = Server.CreateObject ("ADODB.Recordset")
set objComm =Server.CreateObject("ADODB.Command")

 objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
               "Data Source=C:\Inetpub\wwwroot\Conger\conger.mdb"


objComm.ActiveConnection = objConn



sql = "INSERT INTO tbl_JourConger 
(Nom,Prenom,Motif,DateDepart,DateRetour,NbJour,NbHeure,Commentaire) VALUES 
('" & request("nom") & "','" & request("prenom") & "','" & request
("choix") & "','" & request("depart") & "','" & request("retour") & "','" 
& request("jour") & "','" & request("heure") & "','" & request
("commentaire") & "')"
response.write(sql)

objComm.CommandText = sql

(ligne 21) objComm.execute


objConn.close
objRs.close

set objConn = nothing
set objRs = nothing
set objComm = nothing

%>


i don't understand.

Mario
Message #2 by "Vincent Vandermeeren \(mailinglists Only\)" <vinnie@j...> on Sun, 23 Jun 2002 22:11:43 +0200
Hi Mario,
what you have is a permission problem.

When you connect to server you have also user called Internet User (IUser)
You have to be sure that your database file (conger.mdb) also has write
permissions for this user.

If you still have questions,
shoot !!

Greetings,
Vinnie

----- Original Message -----
From: <mr_mcdo@y...>
To: "ASP Databases" <asp_databases@p...>
Sent: Friday, June 21, 2002 4:44 PM
Subject: [asp_databases] insert


> Every time i try to do update or insert into a database, here is the
> message a get:
>
> /////////////////////////////////////////////////////////////
>
> Type d'erreur :
> Microsoft JET Database Engine (0x80004005)
> L'opération doit utiliser une requête qui peut être mise à jour.
> /Conger/DayOff.asp, line 21
>
> /////////////////////////////////////////////////////////////
>
> for geting information, no probleme, here my code:
>
> <%
> dim objConn, objRs, objComm,sql
>
> set objConn = Server.CreateObject ("ADODB.Connection")
> set objRs = Server.CreateObject ("ADODB.Recordset")
> set objComm =Server.CreateObject("ADODB.Command")
>
>  objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
>                "Data Source=C:\Inetpub\wwwroot\Conger\conger.mdb"
>
>
> objComm.ActiveConnection = objConn
>
>
>
> sql = "INSERT INTO tbl_JourConger
> (Nom,Prenom,Motif,DateDepart,DateRetour,NbJour,NbHeure,Commentaire) VALUES
> ('" & request("nom") & "','" & request("prenom") & "','" & request
> ("choix") & "','" & request("depart") & "','" & request("retour") & "','"
> & request("jour") & "','" & request("heure") & "','" & request
> ("commentaire") & "')"
> response.write(sql)
>
> objComm.CommandText = sql
>
> (ligne 21) objComm.execute
>
>
> objConn.close
> objRs.close
>
> set objConn = nothing
> set objRs = nothing
> set objComm = nothing
>
> %>
>
>
> i don't understand.
>
> Mario
>

Message #3 by "Kim Iwan Hansen" <kimiwan@k...> on Sun, 23 Jun 2002 21:47:22 +0200
I don't understand either.

But if you could supply an english translation of the error message, it'd
help many of us a lot more to help you :o)

-Kim

> -----Original Message-----
> From: mr_mcdo@y... [mailto:mr_mcdo@y...]
> Sent: 21. juni 2002 16:44
> To: ASP Databases
> Subject: [asp_databases] insert
>
>
> Every time i try to do update or insert into a database, here is the
> message a get:
>
> /////////////////////////////////////////////////////////////
>
> Type d'erreur :
> Microsoft JET Database Engine (0x80004005)
> L'opération doit utiliser une requête qui peut être mise à jour.
> /Conger/DayOff.asp, line 21
>
> /////////////////////////////////////////////////////////////
>
> for geting information, no probleme, here my code:
>
> <%
> dim objConn, objRs, objComm,sql
>
> set objConn = Server.CreateObject ("ADODB.Connection")
> set objRs = Server.CreateObject ("ADODB.Recordset")
> set objComm =Server.CreateObject("ADODB.Command")
>
>  objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
>                "Data Source=C:\Inetpub\wwwroot\Conger\conger.mdb"
>
>
> objComm.ActiveConnection = objConn
>
>
>
> sql = "INSERT INTO tbl_JourConger
> (Nom,Prenom,Motif,DateDepart,DateRetour,NbJour,NbHeure,Commentaire
> ) VALUES
> ('" & request("nom") & "','" & request("prenom") & "','" & request
> ("choix") & "','" & request("depart") & "','" & request("retour") & "','"
> & request("jour") & "','" & request("heure") & "','" & request
> ("commentaire") & "')"
> response.write(sql)
>
> objComm.CommandText = sql
>
> (ligne 21) objComm.execute
>
>
> objConn.close
> objRs.close
>
> set objConn = nothing
> set objRs = nothing
> set objComm = nothing
>
> %>
>
>
> i don't understand.
>
> Mario


  Return to Index