Saturday, September 22, 2012 6:14 AM
I just installed Visual Studio Express version and would like to try to place a textbox on the form and bind the data, but I can not find the place for the data fields.
Can you please advise how to binding data to build desktop application?
Your help and information is great appreciated,
Saturday, September 22, 2012 4:25 PM
Have you created a data source for your project (Data->Add new data source...)?
Once you have a data source, you can use the TextBox properties, DataBindings->Advanced... to connect the TextBox to your data source.
Saturday, September 22, 2012 8:11 PM
yes, I do and i can get data when I execute the query, but it does not show the data when I run the applicaiton.
Thanks again for helping and informaiton,
Sunday, September 23, 2012 3:23 AM
Are you sure your query returns any rows? Did you write a special query, or are you using the default?
If you need to check, open the Data Sources window and drag a table under your Dataset to your form and drop it. This will automatically create a DataGridView control on your form and all needed connection objects to set up binding between the table and the DataGridView. Run your app. The DataGridView should populate.
Sunday, September 23, 2012 1:28 PM
Thanks for helping,
I use default query, I do not modify the query.
The query does return the rows, but it does not populate the data on the DataGridView.
I click on the right upper corner of DataGridView and click on Preview Data and preview and I got data there, but not running the application.
Do I need set any property to read and write data?
Sunday, September 23, 2012 3:14 PM
Please try a new project, either VB Windows Forms or C# Windows Forms (doesn't matter, as you will not be writing any code.
Create a new data source in this project, connected to your database file. Open the Data Sources window in your visual studio, then drag a table from the Data Source to your form, then drop it.
When you drop the table on the form, a DataGridView control should be created that will automatically be connected to your data. When you run the app, the DataGridView should populate.
I'm asking you to do this in a new project because I suspect there is something wrong in your existing project that is preventing the data from appearing. If you can connect and display successfully in a new project, you should consider trying Textboxes, etc. in the new project where the basic data connection is functional.
If you are still unable to connect, please upload your database file to a site where I can download it for testing purposes.