Link to home
Start Free TrialLog in
Avatar of northeyk
northeyk

asked on

Data Binding Problem

I have an ADO data control with a grid and textboxes bound to it.  Everything works fine when running XP, but when running 2000, the grid retrieves the data but the textboxes don't.

   With mconnTest
      .CursorLocation = adUseServer
      .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                          "Persist Security Info=False;" & _
                          "Data Source=" & DatabaseName()
      .Mode = adModeReadWrite
      .Open
   End With

   mrsTimecards.Open "SELECT * FROM Timecards", mconnTest, adOpenKeyset, adLockOptimistic

   Set datTimecards.Recordset = mrsTimecards
   datTimecards.Recordset.Requery


I also tried bypassing the data control and binding the controls directly to the recordset:

   Set grdTimecards.DataSource = mrsTimecards

   Set txtEmployeeName.DataSource = mrsTimecards

   txtEmployeeName.DataField = "EmployeeName"

which also works with XP but not with 2000.  I have service packed 2000 and installed the latest MDAC and Jet Components.  Still no dice.

MSADODC.OCX and MSBIND.DLL have been installed and registered.

I have also tried using a client-side cursor with no luck.

Avatar of leonstryker
leonstryker
Flag of United States of America image

Stop using ADODC, use ADO directly.

Leon
Avatar of northeyk
northeyk

ASKER

As posted earlier, I tried binding directly to the recordset (without ADODC) with the same results.

   Set grdTimecards.DataSource = mrsTimecards

   Set txtEmployeeName.DataSource = mrsTimecards

This works with XP but not with 2000.
When you tried doing this directly did you remove all references to the ADODC?

Leon
Yes.  It doesn't seem to matter either way, but yes - I removed all references to datTimecards with the same results.  I even removed it from the project to make sure.

My code works perfectly on XP - not only on my development PC, but also the client PC's (I've tested six).  They have two PC's running 2000 which have the problem.  I have a 2000 box here which I use for testing.  The problem exists here too.
> I have service packed 2000 and installed the latest MDAC

Which versions do you have on the 2000 machine and which on XP?
Win2K: SP3,  WinXP: SP2.  MDAC: 2.8   Jet 4.0 SP8.
Do you have MDAC: 2.8   on both?
Yes.  I have also tried it with all versions of MDAC from 2.5 on and with Jet Components SP3 and on.
Have you tried compiling the program in 2000 enviroment or running it uncompilied in 2000 to debug it?
I just tried that.  I get Error 545 - unable to bind to field or datamember.

I have created a simple test app that will show the problem:

http://northey.com/download/test.zip

  * all files scanned with latest symantec definitions

If you're running XP, you will notice that all's fine.
ASKER CERTIFIED SOLUTION
Avatar of leonstryker
leonstryker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I just tried that with no success.  I will re-image my 2000 box and with a vanilla image and re-build with MDAC 2.6.  I'll keep you posted.  Thanks for the tip.
Ok, let me know.

Leon
Just tried it on XP with MDAC 2.6 and it worked.
No luck.  I have tried referencing 2.5, 2.6, 2.7 and 2.8 with no success.

I think the problem might be with msbind.dll.  Can you please tell me the version and date stamp on yours.  The one I'm installing is 6.1.97.82 dated Feb 23, 2004.
On 2000 its 6.00.8862 July 15, 2000

On XP its 6.0.88.62 May 11, 2000

Leon
MSBIND.DLL has a dependency file - MSSTDFMT.DLL.  This file must be installed and registered on the Win2K PC's.