Active Data - No Data! 
Author Message
 Active Data - No Data!

Anyone know why I am getting NO DATA in the preview of the following?:

    Set acnConnection = New ADODB.Connection
    With acnConnection
        .Provider = "SQLOLEDB"
        .Properties("Data Source") = "{server name}"
        .Properties("Initial Catalog") = "{db name}"
        .Properties("Integrated Security") = "SSPI"
    End With

    Set acmCommand = New ADODB.Command
    With acmCommand
        Set .ActiveConnection = acnConnection
        .CommandText = "{sql or usp name}"
        .CommandType = adCmdStoredProc
    End With

    Set arsRecordset = New ADODB.Recordset
    With arsRecordset
        .CursorLocation = adUseClient
        .CursorType = adOpenStatic
        .LockType = adLockBatchOptimistic
        .Open acmCommand
    End With
    Set acmCommand.ActiveConnection = Nothing

    ' report
    Set craApplication = CreateObject("Crystal.CRPE.Application")
    Set crrReport = craApplication.OpenReport("{report name}")
    Set crdDatabase = crrReport.Database
    Set crtsTables = crdDatabase.Tables
    Set crtTable = crtsTables.Item(1)

    '...set data to ADO recordset and preview
    crtTable.SetPrivateData 3, arsRecordset

I do NOT get any run-time errors, and the preview displays fine.  Just
has no data in it.

I have tried pulling from a single table (ie., eliminating joins in the
SQL), and ensuring that 3+ records are returned (to avoid the old 2-
record-clip problem).

Note that I have MANUALLY created the TTX file.  I get a bogus "Memory
Full" error message when I try to use the CreateReportOnRuntimeDS API
call (flakey as...).  The TTX is {*filter*}y simple, so I can't see how it
could be wrong!  Seen this before?


Sent via

Fri, 27 Jun 2003 18:38:50 GMT  
 [ 1 post ] 

 Relevant Pages 

1. HELP: Printing with Crystal Data Object/Active Data

2. Sharing one instance of a TCP Active X Ctrl among multiple Active X data controls

3. Data-bound Masked Edit makes all data-bound controls not display data

4. Binary Data in SQL 2000/Conver to Bitmap Data For Data Grid View

5. Help - Simply Getting Data from Extrenal Data Files (not from Access Data Base)

6. Getting data from the Active Directory

7. Logging data from an active port

8. Sending Data to the Active MDI Parnet?

9. Advanced Programming -- Reading Data from an Active Program

10. Active Server Pages and the (CCur) Data Type...

11. Active X exe - Data Repository question

12. Active X form to save data into MS-Access via web


Powered by phpBB® Forum Software