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:
* * * * txtC
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*
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 & "'")
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL