Can you land me a hand with ADO


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Can you land me a hand with ADO

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Can you land me a hand with ADO

    [Originally posted by zane]

    Hello, my friend!

    Please HELP ME!

    -I have 2 tables T1 and T2, in a database MSAcces.
    -each of tables* have a same column columnID.

    Here is my problem...
    In my form(Form1) I created a DataGrid and some textboxes:

    txtA
    txtB
    * * * * txtC
    txtColumnID

    The DataGrid is connected to ADODC2 and the textboxes to ADODC1.
    Then I put on it 2 ADODC control: one for T1 and the other for T2.
    -ADODC1.RecordSource= "SELECT * FROM T1"
    -ADODC2.RecordSource= "SELECT * FROM T2"

    ADODC2 have Visible properties set to FALSE.
    When I try to manipulate the ADODC1 control with the mouse, moving from record to record, I want to show in DataGrid all records of T2 wich have the same columnID like the records of T1. For this, in the event MoveComplete, I write a SQL for ADODC2 for showing the records with the same columnID ("SELECT * FROM T2 WHERE columnID='" & txtColumnID & "'")...BUT in DataGrid the records appear with delay by one record...Is it the event MoveComplete improper for moveing from record to record?
    Please help me to finish my project...If you have another solution for me please send it to me.

    Thanks in advance* 

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Can you land me a hand with ADO

    [Originally posted by Ron Weller]

    * The MoveComplete event triggers before the bound
    controls are updated. You need to reference the
    recordset directly.* instead of
    ...WHERE columnID='" & txtColumnID & "'")* try
    ...WHERE columnID='" & pRecordset.Fields("columnID").Value & "'")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center