Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Problem with recordset interaction
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with recordset interaction

 Post Reply Post Reply
Author
Message
ViperSnake View Drop Down
Newbie
Newbie


Joined: 13 March 2008
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ViperSnake Quote  Post ReplyReply Direct Link To This Post Topic: Problem with recordset interaction
    Posted: 02 February 2009 at 12:16pm
Im using Report Control V11.2 and im having a problem when i insert a new row from a record set. The code below worked fine until now. Im using a RecordSet with a OLEDB connection to add records to the report control:
 
Sub LoadGrd()
 
    Dim L As Integer 
    
    ReportControl.Records.DeleteAll
   
    For L = 0 To (adoRS.RecordCount - 1)
       AddRecord adoRS!Cod_Aluno, adoRS!Aluno,adoRS!Cod_Turma,    adoRS!Localidade_Aluno
       
        If Not adoFichasAlunoRS.EOF  Then adoFichasAlunoRS.MoveNext
        
    Next
    
    ReportControl.Populate
End Sub
 
'------------------------------------------------------------------------------------
Sub AddRecord(pNumero, pNome, pTurma, pLocalidade As Variant) 

    Dim Record As ReportRecord
   
    Set Record = Me.ReportControl.Records.Add()
   
    Record.AddItem pNumero
    Record.AddItem pNome
    Record.AddItem pTurma
    Record.AddItem pLocalidade
   
    Set AddReportRecord = Record
   
End Sub
 
 
The problem is that when i do the movenext event on the recordset, it changes the data of all previous records of the report control and puts them like the one on the recordset...
 
So if I have 10 records on the recordset i end up with 10 records on the report control equal to the last one on the recordset.
 
Any ideas?
 
Tank You for your time..
Product: Xtreme SuitePro(ActiveX) version 11.2.2
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2009 at 4:16am
Hi,
 
Can you upload test project? I haven't had any problems with loading records from database but it would be easier to when you could create test for this
 
Thanks
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 0.063 seconds.