We help IT Professionals succeed at work.
Get Started

vb6 with Sheridan ssOleDBGrid shows no data

Last Modified: 2012-05-12
My VB6 application uses theSheridan ssOleDBGrid to display table data from a MS SQL Server data base. The data grid is bound via a MS ADO Data Control named "adoDC". The connection occurs thru the DataEnvironment "deAlpha" via connection "Alpha" (an ODBC connection).
Test example:

Private Sub Form_Load()
  Dim sql As String
  Dim sConnect As String
  sConnect = deAlpha.Alpha.ConnectionString
  sql = "Select * from Alpha"
  With adoDc
    .ConnectionString = sConnect
    .RecordSource = sql
    MsgBox .Recordset.RecordCount
  End With 'adoDC
  ssgTest.Caption = "Rows: " & Format$(ssgTest.Rows, "0")
End Sub

On WinXP the message box reads"50782". The Grid displays data as expected and the caption is "Rows: 50782".
On Win7 the message box reads "50782". The Grid displays nothing and the caption is "Rows: 0".
So it seems that no data at all are connected to the grid.
As far as I know all needed dll's and ocx are placed into the directory where the exe file is residing.
What may be going wrong?
Watch Question
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE