2uzhan.com
Advertisement
Now Place:2uzhan.com » Datagrid does not show records

Datagrid does not show records

Software Development @ May 16, 2010   Views:0

sir
I design a small application in vb (Windows-xp system) which displays the records from the sql database tables. Entering a table name in the text box and clicking the Button, its records are displayed in the data grid. The code for the button is

adodc1.recordsource="select * from " & txttable.text
adodc1.refresh
set datagrid.datasource=adodc1

The code works fine . when I create a setup program for it and install on a system running windows Vista, the application runs Ok without any error but the grid is not filled with any record. any help or suggestion plz?

--------------Solutions-------------

Have you tried binding your data to your grid?

adodc1.recordsource = "select * from " & txttable.text
adodc1.refresh
set datagrid.datasource = adodc1
datagrid.DataBind()

Which version of VB are you using? You posted this in a VB 4/5/6 forum, but it looks like you may be using .NET.

thx for the reply
I m using vb6 with windows xp. the problem mentioned here works well on my system but not on with windows vista.The program runs on windows vista but doesnot display records.There is not even an error message shown. moreover I have never find a need of using line 4 in any of my programs, only line 3 is enough to populate datagrid with records.

with kind regards

Bashir

Write a java program that asks a person for his height (in meters) and weight (in kilograms) and
outputs one of the messages: underweight, normal, or obese, using the BMI ...

Before I get into the specific issues, I want to provide some other details:

  • Normally, I work on a live, paid server (even in dev); I realize that is ...

Yes, WPF. The learning curve is steep, but what amazing things you can do with it!
Look at this hexagon window for instance. Serves no purpose in a business environment ...

© 2018 2uzhan.com Contact