Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid not showing recordset

Status
Not open for further replies.

csjoseph

MIS
Jan 2, 2001
247
0
0
US
I am using VB 6.0
ADO 2.5

I have a program that is searching a data base. I have all my search logic to create a SQL Statement. Then I open the record set. I have verified that the data is in the record set. But when I set the datasource property of the datagrid to the record set I am still left with a blank datagrid, although the number of blank lines in the datagrid is now equal to the number of records in the record set.
 
You have to include the reference to the "Microsoft Data Binding Collection" in the project. If you are having the problem only after distribution and installation on a client machine then insure that you are including the msBind.dll in the installer.
 
The SQL is correct, I have verified the contents of the recordset using a msgbox. I added this reference and it is still doing the same thing
 
I have figured this out.

With the datagrid control if you make formatting changes during design time the data may not load at run time this has something to do with the control. I removed all formatting then I set the data source to a recordset. After that, in code, I made the formatting changes I wanted. Worked fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top