I actually have a few questions...
I have a data source to an access dB set up in the server explorer, I am trying populate a combo box. On the combo box I select use Data binding mode. I select the table I want to select the data from, but all fields are selected. I want to restrict this to just 2 for the display and value members but when I click add query and adjust the SQL I get the following error...
The schema returned by the new query differs from the base query. How do I fix this?
2nd question.
Can I access the query container in the access dB?
Last question(s)...
When I right click on the data source in the server explorer I click on new query and I can build a new query. Can this SQL be saved, if so where is it saved and how do I access it?
Can anyone suggest a book that goes through using form controls, populating forms / text boxes etc. Most books I've looked at on c# are 90% OO and a chapter at the end talking about ado.net and populating a data grid from a single table, but I need one that builds a desk top application.
Thanks in advance.
Len LPosted Mar 29, 2008, 6:45 PM
For your combo problem, I have a combo box where you specify the data field and it will populate it with a single method call. --- LoadData(ServerSource)
Before you call this method you will need to setup a couple of properties
- lizardSqlDataSource.
- CatalogName.
- ColumnName.
- WantRecordId if you want to store it for use quering the database again.
the lizardSqlDataSource is given the sql statement to execute
for example;
lizardSqlDataSource1.SqlStatement = "SELECT * FROM customers ORDER BY CustomerName";
lizardComboBox1..CatalogName = "Customers";
lizardComboBox1.ColumnName = "CustomerName"
lizardComboBox1.WantRecordId = true;
finally execute the method lizardComboBox1.LoadData(lizardServerParams1);
If this interests you, I am looking for testers to test the full range of my controls, apart from the combo there is;
lizardTextBox
lizardListBox
lizardCheckBox
lizardDataGrid
lizardLabel
lizardTreeView with enhance tree nodes
--- all of these have a LoadData method
lizardServerParams -- info needed to connect to data source
lizardSqlDataSource -- info needed to connect to a data source catalog
lizardControlGroups -- very special control to manipulate controls too much to go into here
lizardOdbcDataSource -- allow connection to access, MySql and other ODBC sources
If you are interested send me an email to [email protected]