p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: Execute permission denied error - help!


Message #1 by KevinJRiley@Y... on Fri, 23 Mar 2001 14:01:53
make sure you installed most recent service pack for 6.5.
There is a known bug similar to this has been fixed in SQL 6.5 SP2

Richard Xin

>From: KevinJRiley@Y...
>Reply-To: "Code Clinic" <proasp_codeclinic@p...>
>To: "Code Clinic" <proasp_codeclinic@p...>
>Subject: Execute permission denied error - help!
>Date: Fri, 23 Mar 2001 14:01:53
>
>I am receiving an error message of "Execute permission denied for Object
>TC_MATLS_USAGE owner dbo".  The object TC_MATLS_USAGE is a table in an SQL
>Server 6.5 database that I am accessing, and the UserID that I am using
>has Select, Insert, Update, and Delete permissions for this table.  If I
>run this code with a dbo alias UserID, then I do not receive the error.
>Also, I have tried using similar code to access another table in the same
>database (Select & Update permissions), and I do not receive the error
>with either UserID.
>
>Here is the code I am using.  The error message indicates that the error
>occurs on the line with the Open method:
>
>	set oRS = Server.CreateObject("ADODB.Recordset")
>	oRS.ActiveConnection = oConn
>	oRS.CursorType = adOpenKeyset
>	oRS.LockType = adLockOptimistic
>	oRS.Source = "TC_MATLS_USAGE"
>	oRS.Open
>	oRS.AddNew
>	oRS.Fields("tcMatlsId") = vsMatlsId
>          ...
>
>I have recently been told that I cannot use this type of Recordset-based
>script to update a recordset without dbo access, but this seems to
>conflict with the fact that I can successfully perform the update with
>similar code on a different table.
>
>Any help is greatly appreciated.


  Return to Index