Griffiths, Richard
R.Griffiths at bury.gov.uk
Tue Dec 11 03:30:12 CST 2007
Hi For anyone looking to move in vb.net (or c#.net) I would recommend CSLA.Net by Rocky Lhotka. His framework is excellent. There is too much to mention, a steep learning curve but worth it. Check out http://www.lhotka.net Richard -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: 10 December 2007 20:55 To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have We do that, John, but we create usercontrols for subforms. Our UI objects,forms and subform usercontrols show up in the toolbox, and we simply drag them onto a form as needed. You can embed a form within a form, but when you use it as a usercontrol, you lose some of the methods and properties. We generally put a FillData routine (or some such) into a form or usercontrol where we want to filter the records and pass in the parameters needed to retrieve the right dataset. When the parameters change through navigation, we pass in the new parameters. If the dataset is already filled, you can pass it as an object to the usercontrol and then just adjust the data bindings in the usercontrol to point at the passed dataset. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, December 10, 2007 11:54 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Charlotte, I found the answer in the data sources object. Drag and drop Detail onto the form and voila a "bound" data form. Good enough for now. OTOH, there is now the issue of the child form. I have ExportSpec which defines the export of data. I have ExportMap which defines field level info about a specific ExportSpec. I now know how to build a form to display ExportSpec, and I can also now build a form for ExportMap, but I need to open frmExportMap and filter the data in ExportMap to just the child records of the current ExportSpec. It would be nice but certainly not a requirement to embed frmExportMap in frmExportSpec a la Access. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 10, 2007 2:32 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have John, Can't recommend a tutorial offhand, but we do this all the time. You normally bind the form to a dataset at design time, but you can do it after the fact if necessary. Question is, what exactly do you mean by "create on the form" and then somehow bind? Are you talking about dropping controls on the form at runtime, a la a control array in VB, or something else? In either case, the keyword is DataBindings, which will allow you to take a new recordset and set the objects binding to that recordset. What we do is declare a couple of object variables as bindings, one old and one new. Then we create an arraylist for bindings to remove and bindings to add. After that, it's a matter of stepping through the controls, identifying the bound controls and examining their binding. If the oldbinding DataSource is the old datasource, then we populate NewBindings with a new binding using the original binding property name but the new datasource without removing the old binding. We add the original binding to the oldbindings arraylist and the new binding to the newbindings arraylist. When that's all done, we remove the old bindings and add the new ones. Charlotte Foust _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ----------------------------------------------------------------- Why not visit our website www.bury.gov.uk ----------------------------------------------------------------- The information contained in this e-mail and any files transmitted with it is for the intended recipient(s) alone. It may contain confidential information that is exempt from the disclosure under English law and may also be covered by legal,professional or other privilege. If you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this e-mail in error, please notify us immediately by using the reply facility on your e-mail system. If this message is being transmitted over the Internet, be aware that it may be intercepted by third parties. As a public body, the Council may be required to disclose this e-mail or any response to it under the Freedom of Information Act 2000 unless the information in it is covered by one of the exemptions in the Act. By responding to this e-mail you accept that your response may be subject of recording/monitoring to ensure compliance with the Council's ICT Security Policy. Electronic service accepted only at legalservices at bury.gov.uk and on fax number 0161 253 5119 . *************************************************************