help me : how to get next record in the same recordset? 
Author Message
 help me : how to get next record in the same recordset?

 hello! all
   Private Sub Form_Load()

initinfo

End Sub

Private Sub Command2_Click()
Dim adoPrimaryRSCDE, dnconn, sql
Set dnconn = CreateObject("adoce.connection.3.0")
dnconn.Open "data source=\my documents\test.cdb"

Set adoPrimaryRSCDE = CreateObject("adoce.recordset.3.0")
Set sql = "select * from test900 "
adoPrimaryRSCDE.Open dnconn, sql
   If (Not adoPrimaryRSCDE.EOF) And (Not
adoPrimaryRSCDE.BOF) Then

info.Text1.Text = adoPrimaryRSCDE.Fields("tt_name").Value
info.Text2.Text = adoPrimaryRSCDE.Fields("tt_age").Value
info.Text3.Text = adoPrimaryRSCDE.Fields("tt_danwei").Value
info.Text4.Text = adoPrimaryRSCDE.Fields("tt_sex").Value
info.Text5.Text = adoPrimaryRSCDE.Fields("tt_edu").Value
info.Text6.Text = adoPrimaryRSCDE.Fields("tt_school").Value
info.Text7.Text = adoPrimaryRSCDE.Fields("tt_born").Value
info.Text8.Text = adoPrimaryRSCDE.Fields("tt_work").Value
info.Text9.Text = adoPrimaryRSCDE.Fields("tt_work1").Value
rs1.MoveNext
Else: rs1.MoveFirst
End If
rs1.Close

Set rs1 = Nothing
End Sub

Private Function initinfo()
Dim GotRecord
Dim CDRecordCDE, errObj
Dim adoPrimaryRSCDE As ADOCEConnection
Dim rs As AdoceRecordset
Set adoPrimaryRSCDE = CreateObject("ADOCE.Recordset.3.0")
 GotRecord = GetFirstCDRecord(adoPrimaryRSCDE, "select *
from test900", CDRecordCDE)
   Do While GotRecord
    info.Text1.Text = CDRecordCDE(0, 0)
    info.Text2.Text = CDRecordCDE(1, 0)
    info.Text3.Text = CDRecordCDE(2, 0)
    info.Text4.Text = CDRecordCDE(3, 0)
    info.Text5.Text = CDRecordCDE(4, 0)
    info.Text6.Text = CDRecordCDE(5, 0)
    info.Text7.Text = CDRecordCDE(6, 0)
    info.Text8.Text = CDRecordCDE(7, 0)
    info.Text9.Text = CDRecordCDE(8, 0)

   GotRecord = GetNextCDRecord(adoPrimaryRSCDE,
CDRecordCDE)
   Loop
   Set adoPrimaryRSCDE = Nothing
End Function

Private Sub Command1_Click()
Me.Hide
End function

please help me

thanks!



Fri, 27 Aug 2004 09:41:46 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Getting records from recordset (between Nth and Mth records)

2. Oracle Newbie needs help getting recordset with multiple records

3. getting CR 4.6 to print this and next record

4. Runtime error when reading next record in recordset

5. Runtime error when reading next record in recordset

6. ActiveX Tab to next record in recordset

7. ActiveX Tab to next record in recordset?

8. Disconnected Recordset will not move to the next record

9. Enter,Next Row and Clear for Next record

10. Module-level multiple-record recordset vs temp single-record recordset

11. Module-level multiple-record recordset vs temp single-record recordset

12. SQL problem - not getting all the records into the recordset

 

 
Powered by phpBB® Forum Software