sir, i hav a binding navigator which is binded to a dataset which is fetching data from customer and insurance tables.while navigating i am displaying the data in some controls in the page.it is working fine.but i hav a datagrid in the form which i want to bind with another table glasses containg customerid as foreign key.so when u navigate thru the records i want the data in the datagrid to change according to the customerid coming on 1 label in the form.how can i do this?also i want to display the last accessed record to display first after i close and open the application.can u help me on this issue
Every time Ibve started using the built in data designers Ibve got frustrated and given up and gone straight in to code it. At Tech Ed they told us for VS 2005 it would be different, these designers are more than just demoware. Anyway I wanted to see how far I can get with out writing any code.
This is really simple, create a data entry form for a single table. But it all fails apart because I choose a guid as the ID for the table:
1. New WinForms VB.Net project.
2. Add a new data source
3. Create a table bNotesb
1. Add column bIDb as uniqueidentifier, rowid, not null and set as the primary key
2. Other columns too; Body, DateCreated etc..
4. I use the DataSource Configuration Wizard and my new table is shown.
5. Then I drag Details from the Table in the Data Sources treeview onto the form and a nice lot of controls and toolbar appear.
Now when the BindingNavigator tries to add a new record it, the DataSet rejects it. Column ID does not allow nulls. Even if I edit the generated DataSet schema, change it to read only , AllowDBNulls etc.. it has no effect. If I remove the column entirely then the DataAdapter update fails because it needs to know what row to update. The DataColumn.DefaultValue in the schema isnbt smart enough for SQL Server statements like newid() either.
So is there a simple way to make my little test app work GUID as the primary key? (without generating the guid in code)