VB ado recordset problem... 
Author Message
 VB ado recordset problem...

hi all

I create a report use Crystal Reports and use the MS-SQL.
but now I need to narow its datasize in VB,
i got a recordset from MS-SQL (the recordset's SQL string is the same as
string that used in Crystal Reports ).
i follow the references of Crystal Reports to bind the recordset to report,
but there are something error.
the following is my VB code:

    Dim strSql As String
    Dim rsRet As ADODB.Recordset

    ' i use "WHERE" to narow down my datasize.
    strSql = " SELECT field1,field2,field3 From table1 WHERE field1='A' AND
field2='B' AND ........"
    .....
    ................
    ' get rscordset from MS-SQL server
    ...........................
    ...............................

    CrystalReport1.Database.SetDataSource rsRet, 3, 1
    CrystalReport1.ReadRecords
    CRViewer1.ReportSource = CrystalReport1
    CRViewer1.ViewReport

but when i run the application, the report always get the whole datas from
MS-SQL.
the recordset assigment doesn't seem to work. WHY????

Can someone please give me a hint....
THANKS



Fri, 23 Apr 2004 12:10:47 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem using VB to retrieve ASP/XML using ADO recordset

2. Open ADO recordset on another ADO recordset - possible?

3. ADO ADO ADO ADO ADO VB examples / samples book wanted

4. Problem Converting ADO Recordset to XML

5. ADO recordset sorting problem

6. ADO recordset problem

7. ADO recordset refresh problems

8. ADO Recordset Sort Problem

9. Problem with ADO Locktypes for Recordsets

10. ADO Recordset object problem

11. ADO , MSFlexGrid.recordset problems!

12. ADO-Problems w. Recordset.Open method

 

 
Powered by phpBB® Forum Software