Microsoft KB Archive/819829

= FIX: When you run a program or a Web browser script that uses the Command object in the ADO programming interface to run a SQL Server stored procedure, you may receive an &quot;EXECUTE permission denied on object...&quot; error message in SQL Server 2000 =

Article ID: 819829

Article Last Modified on 11/2/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Developer Edition
 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Personal Edition
 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Workgroup Edition
 * Microsoft SQL Server 2000 Desktop Engine (Windows)
 * Microsoft SQL Server 2000 Developer Edition
 * Microsoft SQL Server 2000 Enterprise Edition 64-bit

-



Bug #: 469385 (SQL Server 8.0)



Microsoft distributes SQL Server 2000 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2000 fix release.



SYMPTOMS
When you run a program or a Web browser script that uses the Command object in the Microsoft ActiveX Data Objects (ADO) programming interface to run a SQL Server stored procedure, you may receive an error message that is similar to the following:

EXECUTE permission denied on object '', database ' with the name of your instance of SQL Server. Dim cn Dim cmd Dim rs Dim params Dim param set cn=createobject(&quot;ADODB.Connection&quot;) set cmd=createobject(&quot;ADODB.Command&quot;) set rs=createobject(&quot;ADODB.Recordset&quot;)

cn.Provider = &quot;SQLOLEDB&quot; cn.Open &quot;Data Source = &quot;, &quot;testlogin&quot;

Set cmd.ActiveConnection = cn cmd.CommandType = &H0004 cmd.CommandText = &quot;mainproc&quot; cmd.CommandTimeout = 0

' Prepare the command cmd.Prepared = True Set rs = cmd.Execute Wscript.echo rs(0) cn.Close

Set cmd = Nothing Set cn = Nothing  Run the Microsoft Visual Basic Test.vbs script file.

