index | search | no replies | posting guidelines | help login | register
Index » Products » ASP Report Wizard v2
search this forum:
:: Access Denied :: (6)Post a New Message | Post a Reply
Aug 3 2006, 6:06 AM
 Access DeniedPost a Reply
 wballhorst

View this author's profile Send this author a private message

since: Aug 3, 2006
from: Mechanicsburg, PA

The following code is working to some degree.

The first issue is that the list of tables and stored procedures displayed is incomplete.  Why would it display some stored procs and not others?

The second issue is that when I try to create a report   When I click finish I get
Errors Occured!!
Error #-2147024891
Access is denied.

I have created a reports.xml file and it is in the same directory as my page.  it contains the following:  Do I need to set some permissions on this file.  I am using IIS5.1 on Windows XP Pro SP2.  I am using Visual Studio 6 SP5 for asp development and SQL server 2000 SP2 is my database.  .Net framework installed is V2 with latest patches.

Second Issue at bottom of post.


reports.xml below:

<report_wizard version="2">
    <groups>
       <group id="" title="General Reports" />
    </groups>
    <reports />
</report_wizard>



Default.asp below:

<%
Dim objWiz
Set objWiz = Server.CreateObject("AspWebSolution.ReportWizard2")
    
objWiz.Init("Provider=SQLOLEDB.1;Persist Security Info=False;User ID=SA;PWD=Vecter3;Initial Catalog=Retail_commerce;Data Source=gsvusmecltwball")
    
objWiz.DisplayReports
    
Set objWiz = Nothing
%>

Using the sample project downloaded from the website.  When I do the simple demo I get the following whenever I click on a report

Errors Occured!
Error #:-2147467259
Unspecified error
Price by State Build Report    Home

--------------------------------------------------------------------------------

The connection cannot be used to perform this operation. It is either closed or invalid in this context.


Files were not changed from the download and all files are in the folder structure from the zip file.


Aug 3 2006, 6:24 AM
 Re: Access DeniedPost a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

Make sure you IIS recognizes your asp folder as an application.


-------------------------
Ghost
Aug 3 2006, 6:30 AM
 Re: Access DeniedPost a Reply
 wballhorst

View this author's profile Send this author a private message

since: Aug 3, 2006
from: Mechanicsburg, PA

It does and I can debug from Visual Studio on the files in the project.  Also I am using MS Office 2003 with latest patches if that matters since it is an Access database.

Aug 3 2006, 7:00 AM
 Re: Access DeniedPost a Reply
 wballhorst

View this author's profile Send this author a private message

since: Aug 3, 2006
from: Mechanicsburg, PA

I tried the following and get a Microsoft JET Database Engine (0x80004005)
Unspecified error

Dim objConn, objRS, strConn

'TODO: Change Table1 below to an existing table name in your database
strSQL = "SELECT * FROM Employees"
  
strConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("../data/sample.mdb") & ";"
  
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConn
      
Set objRS = objConn.Execute(strSQL)
If Not objRS.EOF  Then
    Do While Not objRS.EOF
        Response.Write objRS(0) & "<br>"
        objRS.MoveNext
    Loop
    objRS.Close
End  If

Set objRS =  Nothing
      
objConn.Close  
Set objConn =  Nothing

Note a slight variation of this code to put output to a testbox works in Visual Basic.  I have also tried creating an ODBC entry and using that, however,  VB works and asp doesn't.

Aug 3 2006, 8:03 AM
 Re: Access DeniedPost a Reply
 wballhorst

View this author's profile Send this author a private message

since: Aug 3, 2006
from: Mechanicsburg, PA

I have made some more progess.  I had to mess with the security settings for the site.  The only issue remaining is that all of the stored procedures in the database are not displayed.  Is this a limitation of the demo version?

Aug 3 2006, 9:46 AM
 Re: Access DeniedPost a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

We use the generic “dbo” account to query SQL Server for the stored procedures as shown below:

SELECT [NAME] FROM dbo.SYSOBJECTS WHERE XTYPE='P' AND STATUS>0 ORDER BY 1

If the above statement does not return all your stored procedures, you can change it by using the DatabaseProceduresQuery property of the report wizard which will be available in the next minor release due tomorrow (Friday 3rd August 3, 2006). AS follows:

objWiz.DatabaseProceduresQuery = “SELECT NAME FROM SYSOBJECTS WHERE XTYPE='P' AND STATUS>0 ORDER BY 1”


-------------------------
Ghost
Pages: (1)   [1]

search this forum: