Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: ould not update access2000 database


Message #1 by "Sohini Sengupta" <sohini_sengupta@w...> on Sun, 21 Apr 2002 11:23:08 -0700
This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C1E926.E9B31020
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I could select data for viewing from a access2000 database but cannot 
update it. Following is my code:

<%
  Option Explicit
  Dim strConnect
%>
<!-- #INCLUDE FILE =3D "DataStore.asp" -->

<!--METADATA TYPE =3D "typelib"
     FILE =3D "C:\Program Files\Common Files\System\ado\msado15.dll"-->


<HTML>
<HEAD>
<TITLE>Using SQL</TITLE>
</HEAD>
<BODY>

<%
  Dim objCommand, objRS, intNoOfRecords
  Set objCommand =3D Server.CreateObject("ADODB.Command")

  objCommand.ActiveConnection =3D strConnect
  objCommand.CommandText =3D "UPDATE Contact SET Lastname =3D 
'Sengupta'"

                           
  objCommand.CommandType =3D adCmdText

  objCommand.Execute  intNoOfRecords
  Response.Write "This update has affected " & _
                  intNoOfRecords & " records"
 
  objCommand.CommandText =3D "SELECT * FROM  Contact"  
                           
  objCommand.CommandType =3D adCmdText

  Set objRS =3D objCommand.Execute
  Set objCommand =3D Nothing


  While Not objRS.EOF
        Response.Write objRS("PersonID") & "  " & _
                       objRS("Firstname") & "  " & _
                       objRS("Lastname") & "<BR>" & _
        objRS.MoveNext
  Wend

  objRS.Close
  Set ObjRS =3D Nothing
%>
</BODY>
</HTML>              

I am getting the following error message


Microsoft JET Database Engine error '80004005'

Operation must use an updateable query.

/BegASP/sqlupdate.asp, line 27

My datastore.asp is


<%
strConnect =3D "Provider=3DMicrosoft.Jet.OLEDB.4.0; " &_
                "Data 
Source=3DC:\inetpub\wwwroot\BegASPFiles\rolodex.mdb; " &_
                "Persist Security Info=3DFalse"   
   

%>
  Eagerly waiting for any ideas my 'SELECT * FROM ' query works fine.

Sohini.



Message #2 by "Ken Schaefer" <ken@a...> on Mon, 22 Apr 2002 11:04:39 +1000
Sounds like a permissions problem:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q175168

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Sohini Sengupta" <sohini_sengupta@w...>
Subject: [access_asp] ould not update access2000 database


I could select data for viewing from a access2000 database but cannot update
it. Following is my code:

<snip>

I am getting the following error message

Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
/BegASP/sqlupdate.asp, line 27
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Message #3 by "sohini sengupta" <rumni_sg@h...> on Mon, 22 Apr 2002 06:09:53 +0000
Thanks a lot I got it.

Sohini.

>From: "Ken Schaefer" <ken@a...>
>Reply-To: "Access ASP" <access_asp@p...>
>To: "Access ASP" <access_asp@p...>
>Subject: [access_asp] Re: ould not update access2000 database
>Date: Mon, 22 Apr 2002 11:04:39 +1000
>
>Sounds like a permissions problem:
>
>http://support.microsoft.com/default.aspx?scid=kb;en-us;Q175168
>
>Cheers
>Ken
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>From: "Sohini Sengupta" <sohini_sengupta@w...>
>Subject: [access_asp] ould not update access2000 database
>
>
>I could select data for viewing from a access2000 database but cannot 
>update
>it. Following is my code:
>
><snip>
>
>I am getting the following error message
>
>Microsoft JET Database Engine error '80004005'
>Operation must use an updateable query.
>/BegASP/sqlupdate.asp, line 27
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>




_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


  Return to Index