From jwcolby at colbyconsulting.com Sat Dec 1 11:04:04 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 1 Dec 2007 12:04:04 -0500 Subject: [dba-VB] Converting the value in a field Message-ID: <005501c8343c$2deeb580$647aa8c0@M90> I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Dec 1 11:30:31 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 1 Dec 2007 12:30:31 -0500 Subject: [dba-VB] Ionforge Message-ID: <005601c8343f$e5533a40$647aa8c0@M90> Is anyone using Ionforge VCS? Like it? Easy to use, hard to use? Gotchas for .Net? Misc comments? John W. Colby Colby Consulting www.ColbyConsulting.com From bheid at sc.rr.com Sat Dec 1 15:37:10 2007 From: bheid at sc.rr.com (Bobby Heid) Date: Sat, 1 Dec 2007 16:37:10 -0500 Subject: [dba-VB] Converting the value in a field In-Reply-To: <005501c8343c$2deeb580$647aa8c0@M90> References: <005501c8343c$2deeb580$647aa8c0@M90> Message-ID: <001101c83462$5432e4c0$fc98ae40$@rr.com> Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Dec 2 01:18:04 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 2 Dec 2007 02:18:04 -0500 Subject: [dba-VB] Converting the value in a field In-Reply-To: <001101c83462$5432e4c0$fc98ae40$@rr.com> References: <005501c8343c$2deeb580$647aa8c0@M90> <001101c83462$5432e4c0$fc98ae40$@rr.com> Message-ID: <005e01c834b3$7b3c5140$647aa8c0@M90> And which type is faster? CInt smells of VB6 compatibility code. 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 Bobby Heid Sent: Saturday, December 01, 2007 4:37 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Mon Dec 3 02:02:56 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 03 Dec 2007 09:02:56 +0100 Subject: [dba-VB] Weird table name restriction Message-ID: Hi John Does this from Sybase work: select valid_name("Object_name") http://manuals.sybase.com/onlinebooks/group-asarc/srg1100e/sqlref/@Generic__BookTextView/64305;pt=60135/* /gustav >>> jwcolby at colbyconsulting.com 30-11-2007 20:04:15 >>> I just discovered that SQL Server (or VB.Net) does not like dashes in table names. If I use a table name "ZIP4-AA_X", the BulkCopy.WriteToServer throws an error "can't access destination table" but if I remove the dash "ZIP4AA_X" it works just fine. The problem is that I take the name of the datafile, strip off the extension and use that as my table name. Thus I now have to start doing edits of the file name before I can use it as a field name. The hoops we have to jump through... John W. Colby Colby Consulting www.ColbyConsulting.com From DWUTKA at Marlow.com Mon Dec 3 09:22:59 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 09:22:59 -0600 Subject: [dba-VB] Reserved words In-Reply-To: <002f01c83389$497a0a10$647aa8c0@M90> Message-ID: Why not prepend all your tables with tbl? That would guarantee that you don't hit a reserved word. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, November 30, 2007 1:44 PM To: dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Reserved words Does anyone know if the reserved words in SQL Server (can't be used in table names etc) are in a table anywhere (in sql server)? I have code that builds tables and it really needs to check the proposed table name to make sure that the name isn't a reserved word, and that it does not have special characters. I have had TWO times now where I was hunting down errors caused by issues with what is valid in a table name. I could build a table of reserved words but if any new ones are added my list would be short. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From DWUTKA at Marlow.com Mon Dec 3 09:24:50 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 09:24:50 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From jwcolby at colbyconsulting.com Mon Dec 3 10:19:48 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 11:19:48 -0500 Subject: [dba-VB] Reserved words In-Reply-To: References: <002f01c83389$497a0a10$647aa8c0@M90> Message-ID: <00c901c835c8$53b82ed0$647aa8c0@M90> And that is what I am doing now. Thanks for the suggestion. 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 Drew Wutka Sent: Monday, December 03, 2007 10:23 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Reserved words Why not prepend all your tables with tbl? That would guarantee that you don't hit a reserved word. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, November 30, 2007 1:44 PM To: dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Reserved words Does anyone know if the reserved words in SQL Server (can't be used in table names etc) are in a table anywhere (in sql server)? I have code that builds tables and it really needs to check the proposed table name to make sure that the name isn't a reserved word, and that it does not have special characters. I have had TWO times now where I was hunting down errors caused by issues with what is valid in a table name. I could build a table of reserved words but if any new ones are added my list would be short. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 3 10:20:41 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 11:20:41 -0500 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: <00ca01c835c8$73699610$647aa8c0@M90> Kind of scary a computer that thinks like Susan. Even scarier people who would want to use a computer that thinks like Susan. ;-) 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 Drew Wutka Sent: Monday, December 03, 2007 10:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 3 10:29:05 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:29:05 -0800 Subject: [dba-VB] Ionforge In-Reply-To: <005601c8343f$e5533a40$647aa8c0@M90> References: <005601c8343f$e5533a40$647aa8c0@M90> Message-ID: I have used it in the past and liked it, but I haven't tried it with .Net. It's pretty easy to use. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 9:31 AM To: 'Access Developers discussion and problem solving'; dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Ionforge Is anyone using Ionforge VCS? Like it? Easy to use, hard to use? Gotchas for .Net? Misc comments? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 3 10:32:45 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:32:45 -0800 Subject: [dba-VB] Converting the value in a field In-Reply-To: <005e01c834b3$7b3c5140$647aa8c0@M90> References: <005501c8343c$2deeb580$647aa8c0@M90><001101c83462$5432e4c0$fc98ae40$@rr.com> <005e01c834b3$7b3c5140$647aa8c0@M90> Message-ID: I understand that all the Ctype functions boil down to the same thing under the hood and run about the same speed. The benefit of CType is that you can cast the object as just about anything, including custom objects. Don't recall being able to do that in VBA. ;} You can also use DirectCast if you are absolutely sure the object contains data and is the right type. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 11:18 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field And which type is faster? CInt smells of VB6 compatibility code. 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 Bobby Heid Sent: Saturday, December 01, 2007 4:37 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 10:33:49 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:33:49 -0800 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL From jwcolby at colbyconsulting.com Mon Dec 3 12:22:01 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 13:22:01 -0500 Subject: [dba-VB] Listing distinct values in field Message-ID: <00db01c835d9$66d83580$647aa8c0@M90> In my client's business he needs a "data dictionary" kind of thing which essentially tells him the valid values in any given field (for WHERE clause purposes). I receive CSV and fixed width files which I import into SQL Server. I need to give him a list of the fields and the valid values in each field (actual different data items). I will be writing such a widget if I can't find one already out there. Does anyone have such a widget or know where to find one? John W. Colby Colby Consulting www.ColbyConsulting.com From DWUTKA at Marlow.com Mon Dec 3 11:49:43 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 11:49:43 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: Message-ID: I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From cfoust at infostatsystems.com Mon Dec 3 13:00:30 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 11:00:30 -0800 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: Message-ID: ROTFL Sort of like Susan? Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 9:50 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. From ssharkins at gmail.com Mon Dec 3 13:11:53 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 3 Dec 2007 14:11:53 -0500 Subject: [dba-VB] Listing distinct values in field References: <00db01c835d9$66d83580$647aa8c0@M90> Message-ID: <00ad01c835e0$60baf230$4b3a8343@SusanOne> Well, for the meta data, I'll check out schema recordsets. I know that T-SQL can produce a unique sort, but off the top of my head, I don't remember the keyword. Susan H. > In my client's business he needs a "data dictionary" kind of thing which > essentially tells him the valid values in any given field (for WHERE > clause > purposes). I receive CSV and fixed width files which I import into SQL > Server. I need to give him a list of the fields and the valid values in > each field (actual different data items). I will be writing such a widget > if I can't find one already out there. > > Does anyone have such a widget or know where to find one? > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Mon Dec 3 15:57:22 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 16:57:22 -0500 Subject: [dba-VB] VS2005 Data Form Wizard Message-ID: <00e801c835f7$7c20d5a0$647aa8c0@M90> Does the Data Form Wizard no longer exist in VS 2005? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 3 16:19:26 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 17:19:26 -0500 Subject: [dba-VB] Toolbox data objects Message-ID: <00ea01c835fa$91061450$647aa8c0@M90> My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX objects. I could swear I had used them sometime in the past. Any idea what is going on? Was this a previous version of VS? Need to include some object? help... John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 18:58:57 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 16:58:57 -0800 Subject: [dba-VB] VS2005 Data Form Wizard In-Reply-To: <00e801c835f7$7c20d5a0$647aa8c0@M90> References: <00e801c835f7$7c20d5a0$647aa8c0@M90> Message-ID: What data form wizard are you talking about, John? I must have missed that. 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 03, 2007 1:57 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VS2005 Data Form Wizard Does the Data Form Wizard no longer exist in VS 2005? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 19:05:47 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 17:05:47 -0800 Subject: [dba-VB] Toolbox data objects In-Reply-To: <00ea01c835fa$91061450$647aa8c0@M90> References: <00ea01c835fa$91061450$647aa8c0@M90> Message-ID: I don't have those objects in my toolbox, John. What are you trying to do? 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 03, 2007 2:19 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Toolbox data objects My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX objects. I could swear I had used them sometime in the past. Any idea what is going on? Was this a previous version of VS? Need to include some object? help... John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Mon Dec 3 21:51:20 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 3 Dec 2007 22:51:20 -0500 Subject: [dba-VB] Toolbox data objects References: <00ea01c835fa$91061450$647aa8c0@M90> Message-ID: <000501c83628$ef025b80$ef706c4c@jisshowsbs.local> ...I've removed vs'3 and vs'5 from my systems but those objects are not in the vs'8 toolset either. William ----- Original Message ----- From: "Charlotte Foust" To: Sent: Monday, December 03, 2007 8:05 PM Subject: Re: [dba-VB] Toolbox data objects >I don't have those objects in my toolbox, John. What are you trying to > do? > > 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 03, 2007 2:19 PM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Toolbox data objects > > My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX > objects. I could swear I had used them sometime in the past. > > Any idea what is going on? Was this a previous version of VS? Need to > include some object? help... > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > 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 > From wdhindman at dejpolsystems.com Mon Dec 3 22:42:55 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 3 Dec 2007 23:42:55 -0500 Subject: [dba-VB] Toolbox data objects References: <00ea01c835fa$91061450$647aa8c0@M90> <000501c83628$ef025b80$ef706c4c@jisshowsbs.local> Message-ID: <000301c83630$23d682d0$ef706c4c@jisshowsbs.local> JC ...methinks you may be confusing datasource selection with the tool box. William ----- Original Message ----- From: "William Hindman" To: Sent: Monday, December 03, 2007 10:51 PM Subject: Re: [dba-VB] Toolbox data objects > ...I've removed vs'3 and vs'5 from my systems but those objects are not in > the vs'8 toolset either. > William > > ----- Original Message ----- > From: "Charlotte Foust" > To: > Sent: Monday, December 03, 2007 8:05 PM > Subject: Re: [dba-VB] Toolbox data objects > > >>I don't have those objects in my toolbox, John. What are you trying to >> do? >> >> 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 03, 2007 2:19 PM >> To: dba-vb at databaseadvisors.com >> Subject: [dba-VB] Toolbox data objects >> >> My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX >> objects. I could swear I had used them sometime in the past. >> >> Any idea what is going on? Was this a previous version of VS? Need to >> include some object? help... >> >> John W. Colby >> Colby Consulting >> www.ColbyConsulting.com >> >> _______________________________________________ >> 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 >> > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From DWUTKA at Marlow.com Tue Dec 4 10:43:30 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 4 Dec 2007 10:43:30 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: Message-ID: I didn't say that.... Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 1:01 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction ROTFL Sort of like Susan? Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 9:50 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ssharkins at gmail.com Tue Dec 4 10:56:42 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 4 Dec 2007 11:56:42 -0500 Subject: [dba-VB] Weird table name restriction References: Message-ID: <00a101c83696$ac42ea80$4b3a8343@SusanOne> Macs are for sissies. ;) Susan H. >I didn't say that.... > > Drew > > ROTFL Sort of like Susan? > > Charlotte > > I wasn't trying to be insulting. A Mac does what you expect it to do, > almost regardless of what you actually tell it to do. > > Drew From DWUTKA at Marlow.com Tue Dec 4 11:05:40 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 4 Dec 2007 11:05:40 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: <00a101c83696$ac42ea80$4b3a8343@SusanOne> Message-ID: I wouldn't say that, if you need graphic arts capabilities, Macs win hands down. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Tuesday, December 04, 2007 10:57 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Macs are for sissies. ;) Susan H. >I didn't say that.... > > Drew > > ROTFL Sort of like Susan? > > Charlotte > > I wasn't trying to be insulting. A Mac does what you expect it to do, > almost regardless of what you actually tell it to do. > > Drew _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ssharkins at gmail.com Tue Dec 4 11:30:02 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 4 Dec 2007 12:30:02 -0500 Subject: [dba-VB] Weird table name restriction References: Message-ID: <00d901c8369c$18f02ad0$4b3a8343@SusanOne> I was kidding. :) Susan H. >I wouldn't say that, if you need graphic arts capabilities, Macs win > hands down. > > Drew From newsgrps at dalyn.co.nz Wed Dec 5 18:48:36 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 13:48:36 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: References: Message-ID: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open >the files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From michael at ddisolutions.com.au Wed Dec 5 21:38:01 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 6 Dec 2007 14:38:01 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) References: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> Is this what you are looking for? http://www.useit.com/alertbox/open_new_windows.html or perhaps https://addons.mozilla.org/en-US/firefox/addon/636 I'm not 100% sure but I think the code you have can only be used on the server. cheers Michael M Subject: Re: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open the >files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > > > >_______________________________________________ >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 From Gustav at cactus.dk Thu Dec 6 01:18:50 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 06 Dec 2007 08:18:50 +0100 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) Message-ID: Hi David I have not tried your code ... so just a stupid question: Is Adobe Reader (or another pdf-application) installed on the user's machine? /gustav >>> newsgrps at dalyn.co.nz 06-12-2007 01:48:36 >>> I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open >the files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand From newsgrps at dalyn.co.nz Thu Dec 6 03:24:10 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 22:24:10 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: References: Message-ID: <20071206092107.TJMB17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> There are no stupid questions - just stupid answers :-) Yes the user (who was me) does have adobe reader installed. Part of my program uses the following code to show pdf's that are created from DataDynamic's Active Reports (this was code provided by DataDynamics): Dim m_stream As New System.IO.MemoryStream() Dim rptCombined As New DataDynamics.ActiveReports.ActiveReport3 ' Other code which creates the rptCombined report If Me.PdfExport1 Is Nothing Then Me.PdfExport1 = New DataDynamics.ActiveReports.Export.Pdf.PdfExport End If Me.PdfExport1.Export(rptCombined.Document, m_stream) m_stream.Position = 0 Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment; filename=PVPReports.pdf") Response.BinaryWrite(m_stream.ToArray()) Response.End() It looks like some of this might be able to be used to show the pdf files. What happens is that the user has the option to save or open the file. This is what I want for the pdf's as well. David At 6/12/2007, you wrote: >Hi David > >I have not tried your code ... so just a stupid question: Is Adobe >Reader (or another pdf-application) installed on the user's machine? > >/gustav > > >>> newsgrps at dalyn.co.nz 06-12-2007 01:48:36 >>> >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process >runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >"\PDFFiles\" + strReportFile + ".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this >operation. It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have >thought that it would use the local machines copy. > >David > >At 27/11/2007, you wrote: > >Hi David et al > > > >A lot of useful things can be done with the Process class. > >Some examples here: > > > > http://www.thescarms.com/dotnet/Process.aspx > > > >/gustav > > > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> > >I am using VS 2005 and VB.Net for a web site. > > > >I have a number of PDF files that are stored in a static folder on > the server. > > > >Users select from a list on files on a web page and I want to open > >the files in Adobe. Adobe reader is installed on the server. > > > >Can anyone give me a pointer to how I can take a string with path and > >file name, and open it? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 6 03:28:00 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 22:28:00 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> References: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> Message-ID: <20071206092456.OVAG9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Michael, The first link looks promising - see my reply to Gustav. David At 6/12/2007, you wrote: >Is this what you are looking for? > >http://www.useit.com/alertbox/open_new_windows.html >or perhaps >https://addons.mozilla.org/en-US/firefox/addon/636 > >I'm not 100% sure but I think the code you have can only be used on the >server. > >cheers > > >Michael M > >Subject: Re: [dba-VB] Launch and monitor external programs from .NET >(was: Open PDF file) > >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = >HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + >".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this operation. >It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have thought >that it would use the local machines copy. > >David > >At 27/11/2007, you wrote: > >Hi David et al > > > >A lot of useful things can be done with the Process class. > >Some examples here: > > > > http://www.thescarms.com/dotnet/Process.aspx > > > >/gustav > > > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> > >I am using VS 2005 and VB.Net for a web site. > > > >I have a number of PDF files that are stored in a static folder on the >server. > > > >Users select from a list on files on a web page and I want to open the > >files in Adobe. Adobe reader is installed on the server. > > > >Can anyone give me a pointer to how I can take a string with path and > >file name, and open it? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand > > > > > > > >_______________________________________________ > >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 > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From robert at webedb.com Thu Dec 6 12:28:08 2007 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 06 Dec 2007 12:28:08 -0600 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: Message-ID: <200712061832.lB6IWrgr023718@databaseadvisors.com> David, Here is what I use: Interest and skills assesment survey. As far as I know, Adobe Reader is not installed on the server. Robert At 12:00 PM 12/6/2007, you wrote: >Date: Thu, 06 Dec 2007 13:48:36 +1300 >From: David Emerson >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > (was: Open PDF file) >To: dba-vb at databaseadvisors.com >Message-ID: > <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >Content-Type: text/plain; charset="us-ascii"; format=flowed > >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process >runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >"\PDFFiles\" + strReportFile + ".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this >operation. It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have >thought that it would use the local machines copy. > >David From newsgrps at dalyn.co.nz Thu Dec 6 12:55:57 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 07 Dec 2007 07:55:57 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET References: Message-ID: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Thanks Robert. This looks like it open the pdf in a browser window. Am I correct? I am wanting the box to appear giving the user the option of opening it or saving the file. David At 7/12/2007, you wrote: >David, > >Here is what I use: > > runat="server" > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > Text="Interest and skills assesment survey." > Target="_blank"> > Interest and skills assesment survey. > > >As far as I know, Adobe Reader is not installed on the server. > >Robert > >At 12:00 PM 12/6/2007, you wrote: >>Date: Thu, 06 Dec 2007 13:48:36 +1300 >>From: David Emerson >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET >> (was: Open PDF file) >>To: dba-vb at databaseadvisors.com >>Message-ID: >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >>Content-Type: text/plain; charset="us-ascii"; format=flowed >> >>I included Gustav's code in my web application as below: >> >>Dim runPdf As New System.Diagnostics.Process >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >>"\PDFFiles\" + strReportFile + ".pdf" >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >>runPdf.Start() >> >>However, when it is run by a user I get the following error: No >>application is associated with the specified file for this >>operation. It seems to be wanting to open the file on the server. >> >>Do I need to install Adobe Acrobat on the server? I would have >>thought that it would use the local machines copy. >> >>David From joeo at appoli.com Thu Dec 6 13:19:08 2007 From: joeo at appoli.com (Joe O'Connell) Date: Thu, 6 Dec 2007 14:19:08 -0500 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> References: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: David, I have not followed this thread, so your question may have already been answered. If you want to open a pdf in the user's browser, couldn't the pdf just be the href? Open PDF If the user left clicks, the pdf should open in a new browser window. If the user right clicks, a box will open allowing the user to save the pdf on their local disk drive. Joe O'Connell -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Thursday, December 06, 2007 1:56 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Thanks Robert. This looks like it open the pdf in a browser window. Am I correct? I am wanting the box to appear giving the user the option of opening it or saving the file. David At 7/12/2007, you wrote: >David, > >Here is what I use: > > runat="server" > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > Text="Interest and skills assesment survey." > Target="_blank"> > Interest and skills assesment survey. > > >As far as I know, Adobe Reader is not installed on the server. > >Robert > >At 12:00 PM 12/6/2007, you wrote: >>Date: Thu, 06 Dec 2007 13:48:36 +1300 >>From: David Emerson >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET >> (was: Open PDF file) >>To: dba-vb at databaseadvisors.com >>Message-ID: >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >>Content-Type: text/plain; charset="us-ascii"; format=flowed >> >>I included Gustav's code in my web application as below: >> >>Dim runPdf As New System.Diagnostics.Process >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >>"\PDFFiles\" + strReportFile + ".pdf" >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >>runPdf.Start() >> >>However, when it is run by a user I get the following error: No >>application is associated with the specified file for this >>operation. It seems to be wanting to open the file on the server. >> >>Do I need to install Adobe Acrobat on the server? I would have >>thought that it would use the local machines copy. >> >>David _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 6 14:29:28 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 07 Dec 2007 09:29:28 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <20071206202629.DROX9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Joe, The PDF is one of a number of reports that are shown dynamically on the screen based on table records. The user clicks on check boxes to select the reports they want to run, then the code processes the check boxes and opens the appropriate reports/files etc. Therefore hardcoding the href isn't an option in this case. Thanks for your reply though. David At 7/12/2007, you wrote: >David, > >I have not followed this thread, so your question may have already been >answered. > >If you want to open a pdf in the user's browser, couldn't the pdf just >be the href? Open PDF > >If the user left clicks, the pdf should open in a new browser window. >If the user right clicks, a box will open allowing the user to save the >pdf on their local disk drive. > >Joe O'Connell > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Thursday, December 06, 2007 1:56 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Thanks Robert. This looks like it open the pdf in a browser >window. Am I correct? I am wanting the box to appear giving the >user the option of opening it or saving the file. > >David > >At 7/12/2007, you wrote: > >David, > > > >Here is what I use: > > > > > runat="server" > > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > > Text="Interest and skills assesment survey." > > Target="_blank"> > > Interest and skills assesment survey. > > > > > >As far as I know, Adobe Reader is not installed on the server. > > > >Robert > > > >At 12:00 PM 12/6/2007, you wrote: > >>Date: Thu, 06 Dec 2007 13:48:36 +1300 > >>From: David Emerson > >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >> (was: Open PDF file) > >>To: dba-vb at databaseadvisors.com > >>Message-ID: > >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> > >>Content-Type: text/plain; charset="us-ascii"; format=flowed > >> > >>I included Gustav's code in my web application as below: > >> > >>Dim runPdf As New System.Diagnostics.Process > >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + > >>"\PDFFiles\" + strReportFile + ".pdf" > >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal > >>runPdf.Start() > >> > >>However, when it is run by a user I get the following error: No > >>application is associated with the specified file for this > >>operation. It seems to be wanting to open the file on the server. > >> > >>Do I need to install Adobe Acrobat on the server? I would have > >>thought that it would use the local machines copy. > >> > >>David > >_______________________________________________ >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 From jwcolby at colbyconsulting.com Fri Dec 7 08:38:34 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 09:38:34 -0500 Subject: [dba-VB] Lib object references lib obj Message-ID: <00ea01c838de$d91bebc0$977aa8c0@M90> I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Dec 7 09:51:53 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 7 Dec 2007 07:51:53 -0800 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <00ea01c838de$d91bebc0$977aa8c0@M90> References: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Dec 7 10:44:11 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 11:44:11 -0500 Subject: [dba-VB] Lib object references lib obj In-Reply-To: References: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: <010901c838f0$651a0650$977aa8c0@M90> Charlotte, Thanks for the response. The last time I asked this kind of thing you showed me how to link specific modules from another project, which is the method I am currently using. How do I link the entire project? This is essentially a "framework" I am starting, so it would certainly be appropriate to link that framework to the new project if I knew how. 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: Friday, December 07, 2007 10:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From shamil at users.mns.ru Fri Dec 7 11:13:59 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Fri, 7 Dec 2007 20:13:59 +0300 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: <000301c838f4$8ea91340$6401a8c0@nant> Hello John, Why not use dedicated ClassLibs for different sets of functionality: - in one of the current ASP.NET/C# solutions I'm working here I have 7 classlibs and the main ASP.Net app... VS works very well with that kind of "advanced" stuff... Just set the reference to projects - and you're done - you can debug/trace "navigating" between projects' source code if needed... Note: Cross-referencing projects is not allowed... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 5:39 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Fri Dec 7 11:38:31 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 7 Dec 2007 09:38:31 -0800 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <010901c838f0$651a0650$977aa8c0@M90> References: <00ea01c838de$d91bebc0$977aa8c0@M90> <010901c838f0$651a0650$977aa8c0@M90> Message-ID: Bring up the properties of the project, select references, and add the dll in the selected project's bin folder. That should give you access to the functionality in that project. I'm winging it here, because we do it in a totally different way due in part to the team development environment. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 8:44 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Charlotte, Thanks for the response. The last time I asked this kind of thing you showed me how to link specific modules from another project, which is the method I am currently using. How do I link the entire project? This is essentially a "framework" I am starting, so it would certainly be appropriate to link that framework to the new project if I knew how. 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: Friday, December 07, 2007 10:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From robert at webedb.com Fri Dec 7 12:25:54 2007 From: robert at webedb.com (Robert L. Stewart) Date: Fri, 07 Dec 2007 12:25:54 -0600 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: Message-ID: <200712071829.lB7ISxDd021422@databaseadvisors.com> Yes, David, it opens it in the browser and from there, the user is viewing it and can save it from there. At 11:39 AM 12/7/2007, you wrote: >Date: Fri, 07 Dec 2007 07:55:57 +1300 >From: David Emerson >Subject: Re: [dba-VB] Launch and monitor external programs from .NET >To: dba-vb at databaseadvisors.com >Message-ID: > <20071206185408.YCUE9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >Content-Type: text/plain; charset="us-ascii"; format=flowed > >Thanks Robert. This looks like it open the pdf in a browser >window. Am I correct? I am wanting the box to appear giving the >user the option of opening it or saving the file. > >David From jwcolby at colbyconsulting.com Fri Dec 7 14:27:30 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 15:27:30 -0500 Subject: [dba-VB] Connection closed Message-ID: <012701c8390f$978270e0$977aa8c0@M90> I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Dec 7 23:32:01 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 8 Dec 2007 00:32:01 -0500 Subject: [dba-VB] Connection closed In-Reply-To: <012701c8390f$978270e0$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: <014a01c8395b$a91ebbf0$977aa8c0@M90> Any ideas out there? The ExecuteNonQuery complains that the connection is closed. If I break at that point (the catch) and do a lcnn.open it says the connection is open. Further it tells me the name of the server, the table name etc. Doesn't sound closed. 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 jwcolby Sent: Friday, December 07, 2007 3:28 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ssharkins at gmail.com Sat Dec 8 08:23:46 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Sat, 8 Dec 2007 09:23:46 -0500 Subject: [dba-VB] Connection closed References: <012701c8390f$978270e0$977aa8c0@M90> <014a01c8395b$a91ebbf0$977aa8c0@M90> Message-ID: <003201c839a6$359f0ef0$4b3a8343@SusanOne> John, this is just a wilda*s guess because I've seen this happen to me, but it may be the syntax you're using and you're just getting one of the less the helpful error messages. The interesting word is "available" -- my guess is that one of your parameters isn't the right type of something obscure like that, but I really am only guessing. Susan H. > Any ideas out there? The ExecuteNonQuery complains that the connection is > closed. If I break at that point (the catch) and do a lcnn.open it says > the > connection is open. Further it tells me the name of the server, the table > name etc. Doesn't sound closed. From jwcolby at colbyconsulting.com Sat Dec 8 09:45:57 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 8 Dec 2007 10:45:57 -0500 Subject: [dba-VB] Connection closed In-Reply-To: <003201c839a6$359f0ef0$4b3a8343@SusanOne> References: <012701c8390f$978270e0$977aa8c0@M90><014a01c8395b$a91ebbf0$977aa8c0@M90> <003201c839a6$359f0ef0$4b3a8343@SusanOne> Message-ID: <016401c839b1$6d4f7e60$977aa8c0@M90> Susan, Thanks for the reply. I don't have a clue and no time to screw around with it more. I was trying to use a stored procedure to migrate data from a "horizontal" to a "vertical" schema. In the end I just resorted to VB.Net. I have a class with a bunch of prewritten functions that allows me to just instantiate and call my class to do things including executing action queries directly out on SQL Server. It took me about 1/2 hour to just redo the whole process, replace the stored procedure with a new function in a form in VB.Net and voila, I am crunching away doing the conversion. At first it was whizzing through the fields of the horizontal table, throwing their data and field ID into the vertical table. It has slowed down now as the number of records in the vertical table has grown. I was reading just the other night about all the work SQL Server has to do to maintain a balanced tree and I think that is what I am seeing now. I have processed 18 fields from the horizontal table and pulled 142 million pieces of actual data out of those 18 fields. There are 584 fields to process in the horizontal table so this could take till next week to process. And then once the process is finished I have to build an index on the table. All in order to discover whether it will be faster to execute a given query using this vertical schema. It should be interesting. 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 Susan Harkins Sent: Saturday, December 08, 2007 9:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, this is just a wilda*s guess because I've seen this happen to me, but it may be the syntax you're using and you're just getting one of the less the helpful error messages. The interesting word is "available" -- my guess is that one of your parameters isn't the right type of something obscure like that, but I really am only guessing. Susan H. > Any ideas out there? The ExecuteNonQuery complains that the connection > is closed. If I break at that point (the catch) and do a lcnn.open it > says the connection is open. Further it tells me the name of the > server, the table name etc. Doesn't sound closed. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From joeget at vgernet.net Sun Dec 9 21:08:14 2007 From: joeget at vgernet.net (John Eget) Date: Sun, 9 Dec 2007 21:08:14 -0600 Subject: [dba-VB] Access 2003 to 2007 issue Message-ID: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> Anyone I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? From cfoust at infostatsystems.com Mon Dec 10 10:03:33 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:03:33 -0800 Subject: [dba-VB] Connection closed In-Reply-To: <012701c8390f$978270e0$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 10 10:06:02 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:06:02 -0800 Subject: [dba-VB] Access 2003 to 2007 issue In-Reply-To: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> References: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> Message-ID: Did you cross-post this? It really belongs in the AccessD list. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John Eget Sent: Sunday, December 09, 2007 7:08 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Access 2003 to 2007 issue Anyone I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 10:23:39 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 11:23:39 -0500 Subject: [dba-VB] Connection closed In-Reply-To: References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: <01f401c83b49$064c3c50$977aa8c0@M90> When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From cfoust at infostatsystems.com Mon Dec 10 10:28:01 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:28:01 -0800 Subject: [dba-VB] Connection closed In-Reply-To: <01f401c83b49$064c3c50$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> <01f401c83b49$064c3c50$977aa8c0@M90> Message-ID: I thought you were USING vb.net, John. I wondered why you were coding it that way. 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 8:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 10 11:11:09 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 12:11:09 -0500 Subject: [dba-VB] Connection closed In-Reply-To: References: <012701c8390f$978270e0$977aa8c0@M90><01f401c83b49$064c3c50$977aa8c0@M90> Message-ID: <01f501c83b4f$a93299e0$977aa8c0@M90> Well I keep getting advice to use stored procedures in SQL Server. That is what I was trying to do. I created a stored procedure that would take table / field names and dynamically construct and execute an append query. I got that working, but I could not iterate a table from TSQL so I was trying to run the SP from VB.Net. THAT is where I was getting the failure. In the end I had to get it finished so I just replaced the SP with the equivalent directly out in VB.Net and then executed an action query (in VB.Net). That action query was the equivalent of the stored procedure, but because it was constructed and executed in VB.Net code I could then call it from another VB.Net function. It all worked and I performed an entire deconstruction of a "wide" table into a set of "tall" tables. I was implementing a schema that Arthur recommended. 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 11:28 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed I thought you were USING vb.net, John. I wondered why you were coding it that way. 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 8:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 12:21:42 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 13:21:42 -0500 Subject: [dba-VB] Does anyone have Message-ID: <01f701c83b59$84432460$977aa8c0@M90> A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 10 13:19:40 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 14:19:40 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: <01f701c83b59$84432460$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: <01fb01c83b61$9d43ec80$977aa8c0@M90> And then of course I immediately stumbled on this: http://www.developer.com/net/vb/article.php/3558771 by Paul Kimmel. Everything I needed to at least get started. The Oh No second strikes again. 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 jwcolby Sent: Monday, December 10, 2007 1:22 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Does anyone have A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 10 13:32:12 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 11:32:12 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <01f701c83b59$84432460$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: 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 -----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 10:22 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Does anyone have A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 13:54:26 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 14:54:26 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: <01fd01c83b66$787f49d0$977aa8c0@M90> 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 From cfoust at infostatsystems.com Mon Dec 10 14:55:26 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 12:55:26 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <01fd01c83b66$787f49d0$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> <01fd01c83b66$787f49d0$977aa8c0@M90> Message-ID: 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 From R.Griffiths at bury.gov.uk Tue Dec 11 03:30:12 2007 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Dec 2007 09:30:12 -0000 Subject: [dba-VB] Does anyone have In-Reply-To: References: <01f701c83b59$84432460$977aa8c0@M90><01fd01c83b66$787f49d0$977aa8c0@M90> Message-ID: <200712110913.lBB9DlM01061@smarthost.yourcomms.net> 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 . ************************************************************* From Gustav at cactus.dk Tue Dec 11 03:43:43 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 10:43:43 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John (crossposted to AccessD because this brief chapter is excellent reading if you know nearly nothing about Visual Studio and wish a first-hand impression on how it "compares" to Access regarding creating forms). Did you read the sample chapter 4 from the link provided by Arthur for "Visual Basic 2005 Jumpstart (see below): www.oreilly.com/catalog/vbjumpstart/chapter/ch04.pdf The chapter covers exactly this. --- Hi Arthur All samples? It lists 470 on Visual Studio alone! Found the JumpStart code download and the book: http://examples.oreilly.com/vbjumpstart/ http://www.oreilly.com/catalog/vbjumpstart/ Thanks! /gustav --- >>> fuller.artful at gmail.com 27-04-2007 16:28 >>> Go to GotDotNet and download all the samples. Do it relatively quickly since MS has decided to phase out this site. Also go to Visual Studio Magazine and CodePlex. There is a very good intro book called VB.NET JumpStart (google vbJumpStart and you should get to the downloadable code). I found this book so good that I am currently thinking that .NET is even easier than Access. Arthur -- >>> jwcolby at colbyconsulting.com 10-12-2007 20:54 >>> 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 From max.wanadoo at gmail.com Tue Dec 11 04:09:02 2007 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 11 Dec 2007 10:09:02 -0000 Subject: [dba-VB] Remote closing of Front Ends In-Reply-To: Message-ID: <00bf01c83bdd$dba05c30$8119fea9@LTVM> Hi Guys, Can anybody point me to code where I can close down Front Ends remotely. I have seen this sort of code posted in the past but cannot find it. Situation: Running an overnight compact and repair on the BE, but falls over because it "thinks" that somebody still has the FE open and linked to it (in fact they don't, so I think there must still be a flag sitting somewhere). Thanks in advance. Max From joeget at vgernet.net Tue Dec 11 06:21:15 2007 From: joeget at vgernet.net (John Eget) Date: Tue, 11 Dec 2007 06:21:15 -0600 Subject: [dba-VB] Autolinking front end to back end application Message-ID: <004b01c83bf0$594011a0$4ec2f63f@gateway8529fab> Does anyone have a link to or code to autolink the front end to the backend when a splash screen is opened? I cannot figure out the issue below I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? From jwcolby at colbyconsulting.com Tue Dec 11 08:28:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 09:28:23 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: <200712110913.lBB9DlM01061@smarthost.yourcomms.net> References: <01f701c83b59$84432460$977aa8c0@M90><01fd01c83b66$787f49d0$977aa8c0@M90> <200712110913.lBB9DlM01061@smarthost.yourcomms.net> Message-ID: <023601c83c02$16769350$977aa8c0@M90> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From Gustav at cactus.dk Tue Dec 11 08:52:46 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 15:52:46 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From jwcolby at colbyconsulting.com Tue Dec 11 09:02:09 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 10:02:09 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <023a01c83c06$cdc15910$977aa8c0@M90> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From robert at webedb.com Tue Dec 11 09:06:23 2007 From: robert at webedb.com (Robert L. Stewart) Date: Tue, 11 Dec 2007 09:06:23 -0600 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <200712111508.lBBF83se028103@databaseadvisors.com> For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 From Gustav at cactus.dk Tue Dec 11 09:17:20 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 16:17:20 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From wdhindman at dejpolsystems.com Tue Dec 11 09:38:43 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 11 Dec 2007 10:38:43 -0500 Subject: [dba-VB] Does anyone have References: Message-ID: <001001c83c0b$e9e8bcf0$0c10a8c0@jisshowsbs.local> gustav ...sssshhhh ...whatever you do, don't mention jc and "obtuse" in the same line ...upsets him it does :) William ----- Original Message ----- From: "Gustav Brock" To: Sent: Tuesday, December 11, 2007 9:52 AM Subject: Re: [dba-VB] Does anyone have > Hi John > > I visited the site and got the same impression. > > This is, sadly, the case for most open-source sites - lots of info on > marginal latest revisions and nerded comments, but only an obtuse - or > completely lacking - overview for the first-time visitor. Often not even > system/software requirements are listed. > These people could really gain by learning some marketing: What is this, > what is the purpose, who is it aimed for, what skill is required, what > software is required, etc. It's a mess and a waste. > > /gustav > >>>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> > Richard, > > Thanks for the link. I have to say it is annoying when an author does > things in reverse order. I go to the site. Plastered all over is CSLA. > So > what is CSLA? There is a link, plainly labeled "what is CSLA". So I go > to > that link. There is an entire page starting with CSLA is a .... At the > VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. > > Sigh. > > But in the end I ordered the book, as well as an older book by the same > author apparently no longer in print. Let's hope he can help me! > > ;-) > > 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 Griffiths, > Richard > Sent: Tuesday, December 11, 2007 4:30 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Does anyone have > > 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 > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From Gustav at cactus.dk Tue Dec 11 09:45:40 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 16:45:40 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi William I know - it was his documentation, right - so I didn't! /gustav >>> wdhindman at dejpolsystems.com 11-12-2007 16:38 >>> gustav ...sssshhhh ...whatever you do, don't mention jc and "obtuse" in the same line ...upsets him it does :) William ----- Original Message ----- From: "Gustav Brock" To: Sent: Tuesday, December 11, 2007 9:52 AM Subject: Re: [dba-VB] Does anyone have > Hi John > > I visited the site and got the same impression. > > This is, sadly, the case for most open-source sites - lots of info on > marginal latest revisions and nerded comments, but only an obtuse - or > completely lacking - overview for the first-time visitor. Often not even > system/software requirements are listed. > These people could really gain by learning some marketing: What is this, > what is the purpose, who is it aimed for, what skill is required, what > software is required, etc. It's a mess and a waste. > > /gustav > >>>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> > Richard, > > Thanks for the link. I have to say it is annoying when an author does > things in reverse order. I go to the site. Plastered all over is CSLA. So > what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to > that link. There is an entire page starting with CSLA is a .... At the > VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. > > Sigh. > > But in the end I ordered the book, as well as an older book by the same > author apparently no longer in print. Let's hope he can help me! > > ;-) > > 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 Griffiths, > Richard > Sent: Tuesday, December 11, 2007 4:30 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Does anyone have > > 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 From R.Griffiths at bury.gov.uk Tue Dec 11 09:51:04 2007 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Dec 2007 15:51:04 -0000 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <200712111534.lBBFYZM20719@smarthost.yourcomms.net> Hi I'm not exactly sure what the target audience is, but everything is OO based and whilst under the hood of the framework is some advanced coding, app usage is I would say intermediate to advanced. Rocky is a programmer at heart and I guess sticks programming and not any peripherals. I'm sure he would answer you if you posted a question or looked around - there's plenty of info. I adopted this framework as what I started do myself in designing my own sort of framework seemed covered (plus much more) and to a hugely better standard by Rocky. Such things a validation - where to put business rules, authorisation, data access, n-level undo (never used this though), smartdates etc - he has put a lot of thought into this and come up with a v.good framework. The framework is supported by Codesmith, Code Complete and CSLAGen (codemsmith incorporated/customised specifically for CSLA.net) for code generation of the business classes. .Nettiers whilst v.good I believe is more data access and does not cover the issues cited above. Same as the MS Enterprise libraries - these compliment CSLA (and vice-versa) rather than compete. Rocky has excellent credentials, speaking at VS Live 2008 conferences along with Ken Getz etc and is also running a post conference workshop on his framework. My advice would be not to plough too deeply into the book(s) as this can get heavy going sometimes but along with the book(s) try out yourself - but as I say a learning curve is to be taken. One thing to consider is that if you decide not to utilise this framework you still have to resolve those issues such as validation, authorisation and so on yourself. HTH Richard -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 11 December 2007 14:53 To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ 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 . ************************************************************* From jwcolby at colbyconsulting.com Tue Dec 11 10:05:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:05:23 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <024401c83c0f$a3800030$977aa8c0@M90> Charlotte's is home built it seems. I have not really read anything from Shamil re a .net framework but it would not surprise me if he were using such a thing. I watched a 15 minute overview video of codesmith and ntiers and all I can say is WOW. OTOH it seems that it would be WOW if you were an experienced .NET developer. My first impression is that it would simply be overwhelming to me. Sadly there are no books you can buy to help you get started with Codesmith. 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 Gustav Brock Sent: Tuesday, December 11, 2007 10:17 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 10:17:33 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:17:33 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <200712111508.lBBF83se028103@databaseadvisors.com> References: <200712111508.lBBF83se028103@databaseadvisors.com> Message-ID: Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 From jwcolby at colbyconsulting.com Tue Dec 11 10:26:32 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:26:32 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: <200712111508.lBBF83se028103@databaseadvisors.com> Message-ID: <024a01c83c12$97df97b0$977aa8c0@M90> And that is precisely my main complaint. I watched the demo and codesmith generated SIX PROJECTS with tens of thousands of lines of code in HUNDREDS of modules. Now what do I do when something doesn't work? I didn't write the modules, nor the code. 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: Tuesday, December 11, 2007 11:18 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 10:28:36 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:28:36 -0800 Subject: [dba-VB] Frameworks Message-ID: Yes, we build what can be called a framework. We created a solution and added project for Configuration, Controls, Exceptions, Charts, Data, Data.OleDbProvider, Reports, ResourceData (xml data tables), UI and Security. Some of those were added as we developed the concept, but Configuration, Exceptions, Data, Reports, UI and Security we there from the start. Controls was added when we started customising third party controls or building our own. Using those allows us to maintain a consistent look throughout the applications and save the developer having to set countless properties over and over. Charlotte From cfoust at infostatsystems.com Tue Dec 11 10:37:06 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:37:06 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <024a01c83c12$97df97b0$977aa8c0@M90> References: <200712111508.lBBF83se028103@databaseadvisors.com> <024a01c83c12$97df97b0$977aa8c0@M90> Message-ID: It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:27 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have And that is precisely my main complaint. I watched the demo and codesmith generated SIX PROJECTS with tens of thousands of lines of code in HUNDREDS of modules. Now what do I do when something doesn't work? I didn't write the modules, nor the code. 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: Tuesday, December 11, 2007 11:18 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert From jwcolby at colbyconsulting.com Tue Dec 11 10:51:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:51:23 -0500 Subject: [dba-VB] Open a filtered form Message-ID: <024b01c83c16$10ae61f0$977aa8c0@M90> Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Tue Dec 11 11:07:52 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 12:07:52 -0500 Subject: [dba-VB] Codesmith trials and tribulations In-Reply-To: References: <200712111508.lBBF83se028103@databaseadvisors.com><024a01c83c12$97df97b0$977aa8c0@M90> Message-ID: <024c01c83c18$5e1d7690$977aa8c0@M90> Yea, yea, yea. And I actually do believe that. However think of this from my perspective. It is just me, sitting here in my office. I work to make money, if I don't do billable hours I do not get paid. No "salary", no employer who will pay me to come up to speed on how to do this. So I look at this and say WOW, if I could learn this I could make SO much more money because I could be so much more productive. And then I say WOW, there is no book, it will take me weeks to learn it, I don't have anyone else using it that I can pop into their cube and ask questions, and I have work to do so that Robbie and Allie can eat in January. BTW I spent 45 (non paid) minutes this morning JUST trying to download the thing. I had to get a user name in order to download it. I did that. Then it said it would take 15 minutes to set up the account (ever heard of computers guys?). Then I am poking around and tried a download. It wanted my email so I gave it. It said the email was in use. Uhhh... hmmm... MIGHT BE ME? Then I clicked "lost my password" because 15 minutes later no password had appeared in me email box. Then I get TWO emails, with TWO DIFFERENT (industrial strength, will resist the CIA) passwords, NEITHER OF WHICH work. In one place on the site it asks for my email and a password (neither of which works) and in another it asks for my USER NAME and password (neither of which works). And all of this to get a code generator to allow me to standardize my coding practices. HMMMMmmmmmmmm. Perhaps they need to use Codesmith? Or maybe the problem is that they DID use Codesmith? Scary to contemplate! So I replied to the email for the last password asking them to figure out what is wrong. 45 minutes wasted, and I haven't even managed to get in to see the documentation or download the trial software. 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: Tuesday, December 11, 2007 11:37 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte From cfoust at infostatsystems.com Tue Dec 11 12:16:57 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 10:16:57 -0800 Subject: [dba-VB] Open a filtered form In-Reply-To: <024b01c83c16$10ae61f0$977aa8c0@M90> References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 12:19:20 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 10:19:20 -0800 Subject: [dba-VB] Codesmith trials and tribulations In-Reply-To: <024c01c83c18$5e1d7690$977aa8c0@M90> References: <200712111508.lBBF83se028103@databaseadvisors.com><024a01c83c12$97df97b0$977aa8c0@M90> <024c01c83c18$5e1d7690$977aa8c0@M90> Message-ID: I have to admit that the developers don't use it, only our boss, who acts primarily as a project manager. The rest of us come along behind and fix the problems with it! LOL Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 9:08 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Codesmith trials and tribulations Yea, yea, yea. And I actually do believe that. However think of this from my perspective. It is just me, sitting here in my office. I work to make money, if I don't do billable hours I do not get paid. No "salary", no employer who will pay me to come up to speed on how to do this. So I look at this and say WOW, if I could learn this I could make SO much more money because I could be so much more productive. And then I say WOW, there is no book, it will take me weeks to learn it, I don't have anyone else using it that I can pop into their cube and ask questions, and I have work to do so that Robbie and Allie can eat in January. BTW I spent 45 (non paid) minutes this morning JUST trying to download the thing. I had to get a user name in order to download it. I did that. Then it said it would take 15 minutes to set up the account (ever heard of computers guys?). Then I am poking around and tried a download. It wanted my email so I gave it. It said the email was in use. Uhhh... hmmm... MIGHT BE ME? Then I clicked "lost my password" because 15 minutes later no password had appeared in me email box. Then I get TWO emails, with TWO DIFFERENT (industrial strength, will resist the CIA) passwords, NEITHER OF WHICH work. In one place on the site it asks for my email and a password (neither of which works) and in another it asks for my USER NAME and password (neither of which works). And all of this to get a code generator to allow me to standardize my coding practices. HMMMMmmmmmmmm. Perhaps they need to use Codesmith? Or maybe the problem is that they DID use Codesmith? Scary to contemplate! So I replied to the email for the last password asking them to figure out what is wrong. 45 minutes wasted, and I haven't even managed to get in to see the documentation or download the trial software. 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: Tuesday, December 11, 2007 11:37 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 11 12:25:15 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 11 Dec 2007 21:25:15 +0300 Subject: [dba-VB] Does anyone have In-Reply-To: Message-ID: <000001c83c23$2cf1b8a0$6401a8c0@nant> Hello Gustav, Yes, I do have my own home-made very light "framework", which I use to develop ASP.Net apps as well as other kinds of .NET Framework based apps... Most of the "plumbing" code and CRUD/lookup UDFs/SPs is generated from SPARX systems EA's meta data synchronized with MS SQL db and some simple manually prepared meta-data... Generator is "home made" also... It's all multi-tiered/layered, quite effective way of application development with hundreds (thousands?) of custom classes and zero ADO.NET datasets... I didn't want to get bounded to any frameworks as CodeSmith or NHibernate or similar tools provide - hence in parallel with custom coding I have written my own light framework which I will be throwing away by pieces with MS technologies progressing making my home-made "framework exercises" obsolete... I did get the main ideas of this light framework from Marco Bellinaso book on ASP.NET, and then I expanded these ideas in the direction I needed to solve custom tasks... I also used quite some of my past experience to organize and keep simple custom meta-data... I do plan to add some parts to this "framework" from MS Enterpise Library, which is freely available on MS site... Etc... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 11, 2007 6:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. John W. Colby Colby Consulting www.ColbyConsulting.com From robert at webedb.com Tue Dec 11 13:41:25 2007 From: robert at webedb.com (Robert L. Stewart) Date: Tue, 11 Dec 2007 13:41:25 -0600 Subject: [dba-VB] Codesmith Woes In-Reply-To: References: Message-ID: <200712111943.lBBJgvbs021321@databaseadvisors.com> Where can I send VS 2005 project so we can get John's head placed properly on his anatomy? I have a simple one for both Win forms and Web forms. That uses Codesmith with netTiers. Sorry, but you have to use both, my opinion, for Codesmith to be usable for data layer stuff. If you place code at the base level in the generated code, you will always have the problem of it replace it. There is a level above that you have to put code into. It is never, at least they say never, replaced. John, everything has a learning curve. You just need to study between midnight and 4 AM like I do to keep up with the changing technology. :-) At 12:00 PM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 08:37:06 -0800 >From: "Charlotte Foust" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >It's wonderful for quickly regenerating a data tier after schema >changes, but we had to tweak the template to make sure it didn't throw >away the business rules we had added to our data entity classes. It's >very handy for generating the typeddatasets and basic NUnit tests >though. > >Charlotte > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby >Sent: Tuesday, December 11, 2007 8:27 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >And that is precisely my main complaint. I watched the demo and >codesmith generated SIX PROJECTS with tens of thousands of lines of code >in HUNDREDS of modules. Now what do I do when something doesn't work? >I didn't write the modules, nor the code. > > >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: Tuesday, December 11, 2007 11:18 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >Maybe, but while we use CodeSmith, we hand program around it. If we >didn't understand the concepts and how to implement them without the >tools, that wouldn't be possible. > >Charlotte Foust > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. >Stewart >Sent: Tuesday, December 11, 2007 7:06 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >For a less steep learning curve, use CodeSmith Tools and .netTiers. Give >you a great data layer. Think of it as Access on steroids as far as the >DAO layer in it is concerned. > >Robert From jwcolby at colbyconsulting.com Tue Dec 11 13:56:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 14:56:23 -0500 Subject: [dba-VB] Codesmith Woes In-Reply-To: <200712111943.lBBJgvbs021321@databaseadvisors.com> References: <200712111943.lBBJgvbs021321@databaseadvisors.com> Message-ID: <025101c83c2f$e87880c0$977aa8c0@M90> You may send it directly to me, attached to an email. If it is large I can create an FTP user / password for you to upload it to my web site. I went back to Codesmith's web site and asked for a THIRD password and that one works. So I am now able to log in and download the docs and stuff. As for getting my head properly placed on my anatomy, better folks than you have tried and failed. ;-) And finally as for midnight to 4... at my age I am finding it difficult to do that any more. Besides which I am back up at 7 to get the kids ready for school, and by the time I am done with that I have clients calling... Oh well. 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 Robert L. Stewart Sent: Tuesday, December 11, 2007 2:41 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Codesmith Woes Where can I send VS 2005 project so we can get John's head placed properly on his anatomy? I have a simple one for both Win forms and Web forms. That uses Codesmith with netTiers. Sorry, but you have to use both, my opinion, for Codesmith to be usable for data layer stuff. If you place code at the base level in the generated code, you will always have the problem of it replace it. There is a level above that you have to put code into. It is never, at least they say never, replaced. John, everything has a learning curve. You just need to study between midnight and 4 AM like I do to keep up with the changing technology. :-) At 12:00 PM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 08:37:06 -0800 >From: "Charlotte Foust" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >It's wonderful for quickly regenerating a data tier after schema >changes, but we had to tweak the template to make sure it didn't throw >away the business rules we had added to our data entity classes. It's >very handy for generating the typeddatasets and basic NUnit tests >though. > >Charlotte > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby >Sent: Tuesday, December 11, 2007 8:27 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >And that is precisely my main complaint. I watched the demo and >codesmith generated SIX PROJECTS with tens of thousands of lines of >code in HUNDREDS of modules. Now what do I do when something doesn't work? >I didn't write the modules, nor the code. > > >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: Tuesday, December 11, 2007 11:18 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >Maybe, but while we use CodeSmith, we hand program around it. If we >didn't understand the concepts and how to implement them without the >tools, that wouldn't be possible. > >Charlotte Foust > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. >Stewart >Sent: Tuesday, December 11, 2007 7:06 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >For a less steep learning curve, use CodeSmith Tools and .netTiers. >Give you a great data layer. Think of it as Access on steroids as far >as the DAO layer in it is concerned. > >Robert _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 14:07:02 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 15:07:02 -0500 Subject: [dba-VB] Open a filtered form In-Reply-To: References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: <025201c83c31$6550fe50$977aa8c0@M90> OK, but do you understand ADO enough to do it without all of that stuff? Let me say that I am not an ADO kinda guy yet, and then let me show you what I am up against. Here is some actual "example code" for doing this stuff: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Creating connection and command sting Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb" Dim sqlStr As String = "SELECT * FROM Employees" ' Create connection object Dim conn As OleDbConnection = New OleDbConnection(conStr) ' Create data adapter object Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) ' Create a dataset object and fill with data using data adapter's Fill method Dim ds As DataSet = New DataSet da.Fill(ds, "Employees") ' Attach dataset's DefaultView to the datagrid control DataGrid1.DataSource = ds.DefaultViewManager End Sub Now let me ask some questions so that you can perhaps understand how I am confused... >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) Does this actually LOAD the data? Why pass in strSQL if not? >da.Fill(ds, "Employees") This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Intellisense says that I am providing "srcTable" which would indicate that I am asking the data adapter to go look for "Employees" in SQL Server and fill DS with that. If that is the case then why did we do a "SELECT * FROM EMPLOYEES" in the SqlStr? This example is just a mess, and I haven't really found examples where they discuss what is actually happening in any depth. 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: Tuesday, December 11, 2007 1:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From cfoust at infostatsystems.com Tue Dec 11 14:17:11 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 12:17:11 -0800 Subject: [dba-VB] Open a filtered form In-Reply-To: <025201c83c31$6550fe50$977aa8c0@M90> References: <024b01c83c16$10ae61f0$977aa8c0@M90> <025201c83c31$6550fe50$977aa8c0@M90> Message-ID: 1. > >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) >>Does this actually LOAD the data? Why pass in strSQL if not? No it creates a new instance of an OleDbDataAdapter and sets the SQL it will use and the connection, that's all. The dataadapter is the conduit for loading the data into a dataset. 2. >>>da.Fill(ds, "Employees") >>This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Right, this is where the dataSET is filled USING the dataadapter's fill method. Employees is the name of the table in the dataadapter, which usually translates to the name of a table in the database, but not necessarily. A dataadapter can contain multiple tables, so you need to indicate which one to use. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 12:07 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form OK, but do you understand ADO enough to do it without all of that stuff? Let me say that I am not an ADO kinda guy yet, and then let me show you what I am up against. Here is some actual "example code" for doing this stuff: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Creating connection and command sting Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb" Dim sqlStr As String = "SELECT * FROM Employees" ' Create connection object Dim conn As OleDbConnection = New OleDbConnection(conStr) ' Create data adapter object Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) ' Create a dataset object and fill with data using data adapter's Fill method Dim ds As DataSet = New DataSet da.Fill(ds, "Employees") ' Attach dataset's DefaultView to the datagrid control DataGrid1.DataSource = ds.DefaultViewManager End Sub Now let me ask some questions so that you can perhaps understand how I am confused... >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) Does this actually LOAD the data? Why pass in strSQL if not? >da.Fill(ds, "Employees") This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Intellisense says that I am providing "srcTable" which would indicate that I am asking the data adapter to go look for "Employees" in SQL Server and fill DS with that. If that is the case then why did we do a "SELECT * FROM EMPLOYEES" in the SqlStr? This example is just a mess, and I haven't really found examples where they discuss what is actually happening in any depth. 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: Tuesday, December 11, 2007 1:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 15:52:18 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 16:52:18 -0500 Subject: [dba-VB] So much for codesmith Message-ID: <000001c83c40$1ac7bbd0$977aa8c0@M90> I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com From dwaters at usinternet.com Tue Dec 11 16:02:23 2007 From: dwaters at usinternet.com (Dan Waters) Date: Tue, 11 Dec 2007 16:02:23 -0600 Subject: [dba-VB] So much for codesmith In-Reply-To: <000001c83c40$1ac7bbd0$977aa8c0@M90> References: <000001c83c40$1ac7bbd0$977aa8c0@M90> Message-ID: <002101c83c41$822c20d0$0300a8c0@danwaters> Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 11 16:07:59 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 12 Dec 2007 01:07:59 +0300 Subject: [dba-VB] So much for codesmith In-Reply-To: <000001c83c40$1ac7bbd0$977aa8c0@M90> Message-ID: <000301c83c42$4a8be790$6401a8c0@nant> Hello John, The following tools look promising but I must say I didn't try them: http://www.llblgen.com/defaultgeneric.aspx http://www.codeauthor.org/ http://www.latticesoft.com/DesktopDefault.aspx?showLogin=N Have a look also at this post telling why CodeSmith (which you've just removed from your system) could be the best choice if you're not going to write your own tool like that yet wanted to have as flexible as possible (custom(-isable)) templates based code generator: http://forums.asp.net/t/757009.aspx HTH... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 12, 2007 12:52 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 16:17:22 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 17:17:22 -0500 Subject: [dba-VB] So much for codesmith In-Reply-To: <002101c83c41$822c20d0$0300a8c0@danwaters> References: <000001c83c40$1ac7bbd0$977aa8c0@M90> <002101c83c41$822c20d0$0300a8c0@danwaters> Message-ID: <000001c83c43$9b6322e0$977aa8c0@M90> LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From michael at ddisolutions.com.au Tue Dec 11 16:48:48 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 12 Dec 2007 09:48:48 +1100 Subject: [dba-VB] So much for codesmith References: <000001c83c40$1ac7bbd0$977aa8c0@M90><002101c83c41$822c20d0$0300a8c0@danwaters> <000001c83c43$9b6322e0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> Hi John, Wow! What a PITA... I gotta say though that when I eval'd it about a year ago I didn't have any problems. The nag screen came up when the tool loaded, asked you to either register or continue trial, that was it! Your not running Vista are you? It's a shame because you would have liked the netTiers stuff. My annoyance threshhold is about the same as yours these days so I would have binned it as well ;-) cheers Michael M To: dwaters at usinternet.com; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 18:24:58 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 19:24:58 -0500 Subject: [dba-VB] So much for codesmith In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> References: <000001c83c40$1ac7bbd0$977aa8c0@M90><002101c83c41$822c20d0$0300a8c0@danwaters><000001c83c43$9b6322e0$977aa8c0@M90> <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> Message-ID: <000601c83c55$6e267540$977aa8c0@M90> You know there is a shareware version (older), there is a basic version ($99) and there is an advanced version. The basic might not do what I was seeing because it does not integrate into VS 2005 at all, it is just standalone. Perhaps the nag only happens like that from inside of VS 2005? I never tried it standalone. 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 Michael Maddison Sent: Tuesday, December 11, 2007 5:49 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Hi John, Wow! What a PITA... I gotta say though that when I eval'd it about a year ago I didn't have any problems. The nag screen came up when the tool loaded, asked you to either register or continue trial, that was it! Your not running Vista are you? It's a shame because you would have liked the netTiers stuff. My annoyance threshhold is about the same as yours these days so I would have binned it as well ;-) cheers Michael M To: dwaters at usinternet.com; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ 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 From michael at ddisolutions.com.au Tue Dec 11 19:51:23 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 12 Dec 2007 12:51:23 +1100 Subject: [dba-VB] Open a filtered form References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> Hi John, Is this what you are looking for? I've done the sample as a parent child and used the absolute minimum of code. (4 lines C#) 1. Create blank project 2. Use menu to add Dataset, call it Orders. Project --> Add Class select Dataset from available items. 3. In Server Explorer add a OLEDB connection to Northwind. 4. Drag the Customers, Orders and the Order Details tables onto Orders.xsd (Dataset). If you want read only data then you can right click on the OrdersTableAdapter, Configure, Advanced, untick Generate Insert...etc 5. Save. 6. Go to form1, add DataSet from Toolbox, select Typed dataset from dialog, you should see the Dataset you just created. OK 7. Add 3 text boxes and a combo box to the form1. 8. Add a BindingSource to the form, select Orders1 as the datasource, Orders as the DataMember. 9. Add a BindingNavigator, set the BindingSource to BindingSource1. 10 Bind each of the textboxes. Select the textbox, in the properties window open the DataBindings Node. Click advanced, Binding: select bindingSource1 - OrderID Do the same for the other textboxes, notice the formatting options. 11. Add another BindingSource to form1, DataSource = orders1, DataMember = Customers 12. Binding the Combo. *Different to textbox... >From Combo properties select DataSource - bindingSource2 Go to the code view, in the Form1_Load event add... comboBox1.DataSource = this.bindingSource2; comboBox1.DisplayMember = "CompanyName"; comboBox1.ValueMember = "CustomerID"; comboBox1.DataBindings.Add( "SelectedValue", this.bindingSource1, "CustomerID" ); This completes the parent part of the form. Run the app. Child records will be shown in the DataGridView. 1. Add DataGridView to form. 2. Properties, DataSource, Drill into bindingSource1 and select order details (ordersOrderDetailsBindingSource). Done! Run the app. cheers Michael M Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 21:56:51 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 22:56:51 -0500 Subject: [dba-VB] Open a filtered form In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> References: <024b01c83c16$10ae61f0$977aa8c0@M90> <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> Message-ID: <000b01c83c73$07581da0$977aa8c0@M90> Well it certainly sounds like it. 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 Michael Maddison Sent: Tuesday, December 11, 2007 8:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form Hi John, Is this what you are looking for? I've done the sample as a parent child and used the absolute minimum of code. (4 lines C#) 1. Create blank project 2. Use menu to add Dataset, call it Orders. Project --> Add Class select Dataset from available items. 3. In Server Explorer add a OLEDB connection to Northwind. 4. Drag the Customers, Orders and the Order Details tables onto Orders.xsd (Dataset). If you want read only data then you can right click on the OrdersTableAdapter, Configure, Advanced, untick Generate Insert...etc 5. Save. 6. Go to form1, add DataSet from Toolbox, select Typed dataset from dialog, you should see the Dataset you just created. OK 7. Add 3 text boxes and a combo box to the form1. 8. Add a BindingSource to the form, select Orders1 as the datasource, Orders as the DataMember. 9. Add a BindingNavigator, set the BindingSource to BindingSource1. 10 Bind each of the textboxes. Select the textbox, in the properties window open the DataBindings Node. Click advanced, Binding: select bindingSource1 - OrderID Do the same for the other textboxes, notice the formatting options. 11. Add another BindingSource to form1, DataSource = orders1, DataMember = Customers 12. Binding the Combo. *Different to textbox... >From Combo properties select DataSource - bindingSource2 Go to the code view, in the Form1_Load event add... comboBox1.DataSource = this.bindingSource2; comboBox1.DisplayMember = "CompanyName"; comboBox1.ValueMember = "CustomerID"; comboBox1.DataBindings.Add( "SelectedValue", this.bindingSource1, "CustomerID" ); This completes the parent part of the form. Run the app. Child records will be shown in the DataGridView. 1. Add DataGridView to form. 2. Properties, DataSource, Drill into bindingSource1 and select order details (ordersOrderDetailsBindingSource). Done! Run the app. cheers Michael M Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From michael at ddisolutions.com.au Thu Dec 13 00:33:17 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 13 Dec 2007 17:33:17 +1100 Subject: [dba-VB] C# ArcObjects? References: <024b01c83c16$10ae61f0$977aa8c0@M90><59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> <000b01c83c73$07581da0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1F5@ddi-01.DDI.local> Anyone worked with this stuff willing to give a point in the right direction? I need to join a external standalone datatable (Access qry) to a featureclass and export the result to a shape file. O yeah, must use the runtime engine only :-/ cheers Michael M From robert at webedb.com Thu Dec 13 12:30:33 2007 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 13 Dec 2007 12:30:33 -0600 Subject: [dba-VB] C# ArcObjects? In-Reply-To: References: Message-ID: <200712131833.lBDIX4jn018207@databaseadvisors.com> I tried using them at one point and gave up. I use thinkgeo.com's Windows forms objects instead. There is more to creating the shape file than just exporting a query to one. At 12:00 PM 12/13/2007, you wrote: >Date: Thu, 13 Dec 2007 17:33:17 +1100 >From: "Michael Maddison" >Subject: [dba-VB] C# ArcObjects? >To: >Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1F5 at ddi-01.DDI.local> >Content-Type: text/plain; charset="us-ascii" > >Anyone worked with this stuff willing to give a point in the right >direction? >I need to join a external standalone datatable (Access qry) to a >featureclass and export the result to a shape file. >O yeah, must use the runtime engine only :-/ > >cheers > >Michael M > > > >------------------------------ > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb > > >End of dba-VB Digest, Vol 50, Issue 16 >************************************** From jwcolby at colbyconsulting.com Thu Dec 13 22:48:35 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 13 Dec 2007 23:48:35 -0500 Subject: [dba-VB] Expert VB 2005 Business Objects; Lhotka - was RE: [AccessD] Access or SQL Server Express to web In-Reply-To: <001201c83e0a$80401ea0$ef706c4c@jisshowsbs.local> References: <000301c83dcc$d8155ac0$6401a8c0@nant> <001201c83e0a$80401ea0$ef706c4c@jisshowsbs.local> Message-ID: <001401c83e0c$965c4c20$977aa8c0@M90> I have to say I like this book. This is the book that explains the CSLA framework. It is READABLE, it goes into just enough depth to explain the topic at hand, it explains the pros and cons of different strategies and why he chooses the strategies he chooses. Really quite a nice read for someone at my level to be able to start getting a handle on N tier, business objects, DALs and all that. Fascinating stuff on top of all that. He discusses business objects being passed between machines, and being able to modify the implementation using config files so that you can move the layers onto dedicated machines if necessary! Pretty cool stuff. I had always heard about this stuff but had no idea how they did that. Still don't, but at least I am grasping the concepts now. Recommended. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Thursday, December 13, 2007 11:34 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access or SQL Server Express to web ...I know this will get your goat but we've had over 150 users in mdb sourced pages simultaneously without a hick-up so far ...I'm in the process of moving to SQL Server because the load will get much larger in the next few months but so far, Drew has been right, Access mdbs can take a lot of abuse on the web ...of course I'll freely admit that its read only and I cache the hell out of it ...but still :) ...the web based apps all are hosted on shared win2K3 boxes w plenty of ram and dedicated app spaces. ...the largest intranet based app never has more than ten users in it and the average is probably less than five ...the servers are all Dell PE's w/ 2GB ram and large Raid5 HDs running SBS2003 Premium R2 ...pretty vanilla but I like vanilla in servers :) ...like I said, I cater to small business owners and tend to keep it simple ...something an ignorant lout like me can stay on top of :) ...btw, the MS ajax built into 3.5 works really well compared to that added on to 2.0 ...its a very noticeable difference imnsho, especially in the gridview ...the MS sponsored open-source 3.5 ajax controls toolkit version on the other hand, still has some performance problems with some of the controls ...two steps forward, one step back. William From jwcolby at colbyconsulting.com Sat Dec 15 08:55:54 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 15 Dec 2007 09:55:54 -0500 Subject: [dba-VB] Projects and solutions Message-ID: <004d01c83f2a$983b2b50$977aa8c0@M90> I am writing this set of applications that allow me to import and export data form SQL Server. My needs are somewhat complex in that I tend to need to import directories full of files, which could be CSV or flat files. All of the files need to import into the same table, or a single table needs to be exported into many files, going out to a single directory. Again, flat file or CSV. I also need to do this repetitively, i.e. I get disks every week that need to be imported into the same table, or I need to export the same table every couple of weeks. Thus I am have built a set of four fairly simple projects. Each has a similar structure, tables that define the import or export with information such as the source or target table, the source or target directory, the max file size if an export, the chunk size to import (for timing issues) on import, log files and tables to log the progress etc. So I built these four applications, and I now need to tie them together so that I can have a single control panel to start the applications, or to edit the tables that define an import or export job. My question is, should I pull all four of these into a single project or should I leave them out in their respective projects and just run them in place? If I should leave them as separate projects, what are the mechanics behind tying them into a solution? John W. Colby Colby Consulting www.ColbyConsulting.com From shamil at users.mns.ru Sat Dec 15 14:30:16 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Sat, 15 Dec 2007 23:30:16 +0300 Subject: [dba-VB] Projects and solutions In-Reply-To: <004d01c83f2a$983b2b50$977aa8c0@M90> Message-ID: <000001c83f59$4d835130$6401a8c0@nant> John, I'd put your four projects into four classlib projects and create another (FE dispatch) project and keep all of them within one solution... You can also have dedicated thread for every of the four projects/classlibs when you call them from FE project - that could make overall elapsed time to run all four of them (considerably) less if that is needed/possible at all to run all four of them in parallel... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 15, 2007 5:56 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Projects and solutions I am writing this set of applications that allow me to import and export data form SQL Server. My needs are somewhat complex in that I tend to need to import directories full of files, which could be CSV or flat files. All of the files need to import into the same table, or a single table needs to be exported into many files, going out to a single directory. Again, flat file or CSV. I also need to do this repetitively, i.e. I get disks every week that need to be imported into the same table, or I need to export the same table every couple of weeks. Thus I am have built a set of four fairly simple projects. Each has a similar structure, tables that define the import or export with information such as the source or target table, the source or target directory, the max file size if an export, the chunk size to import (for timing issues) on import, log files and tables to log the progress etc. So I built these four applications, and I now need to tie them together so that I can have a single control panel to start the applications, or to edit the tables that define an import or export job. My question is, should I pull all four of these into a single project or should I leave them out in their respective projects and just run them in place? If I should leave them as separate projects, what are the mechanics behind tying them into a solution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Mon Dec 17 15:41:00 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 00:41:00 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: <001401c840f5$843fd480$6401a8c0@nant> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn?t allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From wdhindman at dejpolsystems.com Tue Dec 18 02:13:10 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 18 Dec 2007 03:13:10 -0500 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <002801c8414d$d4c8dd40$ef706c4c@jisshowsbs.local> ...if you control the server then you can install the MS limitlogin script to manage this. ...if you have to do it from asp.net I'd think setting the session username to null and then calling session abandon on logout would kill the current session data so a second login with the same username would be moot ...or not :) ...haven't had a need to do anything like this so I'm not sure what you're looking for here. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Tue Dec 18 02:23:39 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 18 Dec 2007 03:23:39 -0500 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 03:02:57 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 10:02:57 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From shamil at users.mns.ru Tue Dec 18 03:03:18 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 12:03:18 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when thisloginis in use in active session? In-Reply-To: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> Message-ID: <000001c84154$d5601000$6401a8c0@nant> Yes, William, the article you refer is the closest to what I'm hunting for... (BTW, what Google(?) search criteria did you use to find it - I missed it when looking for such information in Google) Yes, this is the closest to what I'm looking for but still it isn't what I need I think (but it looks like there is no other more close solution)... In fact I planned to implement something like proposed by this article but still at least one(?) problem exists with this solution: - if a user will close the browser and then immediately will try to login using the same FormsAuthentication credentials then he will be "kicked-out" every time until Cache object simulating Session_End expires... That's not a big issue(?) - a user will have to wait between 15 and 30 minutes to login again - usual session time-out... But I anticipate "angry users" calls if that solution implemented... I can try to use an IP of a user trying to login and compare it with IP stored with the info on cached login, which isn't yet expired - and if it's not then I can use SetAuthCookie (using session cookie stored in my session object to "catch" live session) but then here is another "use case": user has a couple of PCs on his desktop, he closes browser on one of them and thus leave his session active on server side until time out happens, and then this user tries to login using the same credentials from another PC but he will be "kicked out" because there is no expired session information simulated in custom Cache object, which will be there until this Cache object expires... Sorry for such a "hectic" e-mail but it looks like (and the article you referred approves(?) that) - it looks like this simple(?) issue doesn't have a satisfactory solution covering all of/most of the possible use cases... Going circles here... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Tuesday, December 18, 2007 11:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when thisloginis in use in active session? http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 04:30:25 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 13:30:25 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how topreven using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <000301c84161$0078f7a0$6401a8c0@nant> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 05:10:09 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 12:10:09 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil > Am I missing simple solution of the subject issue? Or maybe I am ...? The difference is that I have only made some careful thoughts about this for an upcoming application, while you are actively dealing with real code and test. In the scenario you describe, which is very likely to happen, at the second login the user would need to make a choice. If he choses to keep the new session, your app kills the first. At the third login, if he choses to keep that, the second session (and the first if still alive) would be killed by the app. On the other hand, if he cancels new a login, the previous session will not be affected while the new session will be killed (message: Login cancelled, session closed). Of course, the browser windows will not close, but if he tries to operate the first or second session, a page will be displayed telling that the session has been closed. If this is not possible, please tell. /gustav >>> shamil at users.mns.ru 18-12-2007 11:30 >>> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From Gustav at cactus.dk Tue Dec 18 05:48:04 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 12:48:04 +0100 Subject: [dba-VB] How to download full (admin) .Net 3.0 SP1 Message-ID: Hi all Had a struggle to find this out: http://go.microsoft.com/fwlink/?LinkId=98105 That was shown here: http://blogs.msdn.com/aaronru/archive/2007/12/13/creating-net-framework-3-0-sp1-redist.aspx The official page only carries the small download bootstrapper. The full package is 25.6 MB. /gustav From accessd at shaw.ca Tue Dec 18 08:29:34 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:29:34 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <001401c840f5$843fd480$6401a8c0@nant> References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <9D3F9F3ECCFD42ABAB2DD7A8D1A94195@creativesystemdesigns.com> Hi Shamil: The login limitations are set at the server end. Everything from who can login, when they can login, how long they can login for, what can be accessed when login is obtained, the level of password complexity and even if they can login in more than once. This is all set at the Server login using roles, groups and policies. The user can be confronted at the splash or landing page to login and from the login the user ability is controlled from the server. That is the server's role and not the responsibility of the presentation section of the application whether desktop of browser. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Monday, December 17, 2007 1:41 PM To: 'Access-D - VB' Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 08:39:15 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:39:15 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when this loginis in use in active session? In-Reply-To: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> References: <001401c840f5$843fd480$6401a8c0@nant> <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> Message-ID: <97764B4BA3C04701A0BA325C688FB2A0@creativesystemdesigns.com> The link is a great piece and example of code, William. The one comment I make about the code sample is that a large professional site should never use 'sa' login style; they should use user groups or windows authentication instead. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Tuesday, December 18, 2007 12:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when this loginis in use in active session? http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From accessd at shaw.ca Tue Dec 18 08:57:47 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:57:47 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: References: Message-ID: The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 08:58:45 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 15:58:45 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Jim So how would you approach this? /gustav >>> accessd at shaw.ca 18-12-2007 15:57 >>> The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From shamil at users.mns.ru Tue Dec 18 09:52:05 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 18:52:05 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: Message-ID: <004201c8418d$f1d15080$6401a8c0@nant> Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 09:52:05 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 18:52:05 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <004101c8418d$f17dd950$6401a8c0@nant> Hello Gustav, The subject issue sounds simple but it looks like it doesn't have a "perfect" solution: there are so many issues involved here starting from usability, scalability, stateless/stateful apps, current context,....., and ending in application access roles, membership and security - there are so many that issues that we can discuss them here endlessly - my Internet search from yesterday evening and this day gave me many sometimes contradictory "hints" that I must say I should abandon all of them and just use "common sense" here: agree with customer what way to solve the subject issue suites my customer best of all and just implement it: - we currently agreed it's not a problem for a user to wait for 15-30 minutes for an abandoned session to expire, and for testing purposes I will have "killing" functionality implemented - later on when all the other custom functionality will be ready I will try to find out is it possible to release this "killing sessions" functionality for user mode system access - if that will not look hazardous to the system consistency then I will adjust and release this "session killing" functionality... (the apps under development does have a part talking to the external Credit Card processing provider/server - and this is two/three steps process which should be better not interrupted at least when external server talks back to our app which should process this answer in one go: yes, I can program it that way but better later than now because as usual time frame to finish development and release the first public version is very strict... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 2:10 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil > Am I missing simple solution of the subject issue? Or maybe I am ...? The difference is that I have only made some careful thoughts about this for an upcoming application, while you are actively dealing with real code and test. In the scenario you describe, which is very likely to happen, at the second login the user would need to make a choice. If he choses to keep the new session, your app kills the first. At the third login, if he choses to keep that, the second session (and the first if still alive) would be killed by the app. On the other hand, if he cancels new a login, the previous session will not be affected while the new session will be killed (message: Login cancelled, session closed). Of course, the browser windows will not close, but if he tries to operate the first or second session, a page will be displayed telling that the session has been closed. If this is not possible, please tell. /gustav >>> shamil at users.mns.ru 18-12-2007 11:30 >>> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 10:20:54 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 17:20:54 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time fr Message-ID: Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... From shamil at users.mns.ru Tue Dec 18 11:02:13 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 20:02:13 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr In-Reply-To: Message-ID: <004601c84197$bcb932a0$6401a8c0@nant> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 11:27:12 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 18:27:12 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil Oh, that is a nightmare. I just opened three tabs (it's me at 213.150.48.58) and the only parameter changing is Page View Count. And that counts up also if the user requests a refresh of the browser window! And it counts down as the sessions time out. Not very useful. So now what? Could a client side GUID be generated that was recorded at server side? Sadly, I have little time to work intensively with this right now - a web session on the new MySQL Falcon engine is approaching - but count me in if you need further testing - it would be really nice to find out how to deal with this issue which will pop up again and again. /gustav >>> shamil at users.mns.ru 18-12-2007 18:02 >>> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... From accessd at shaw.ca Tue Dec 18 13:31:16 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 11:31:16 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: References: Message-ID: <1A5EB2DC14054A6CBC3C398270F7597B@creativesystemdesigns.com> Hi Gustav: I think someone should either be stopped at the login or allowed to on. By setting the policies on a group of users, through the Group Policy Management Console (GPMC), added/attaching the group to the SQL Server > Security > Logins section. Within GPMC the login ability of a group can set to only one active session at a time. In effect the MS SQL server is managing rights of the user. (I have not checked to see whether this ability is extended to SQL Server Express but I am almost positive it is...) Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 6:59 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Jim So how would you approach this? /gustav >>> accessd at shaw.ca 18-12-2007 15:57 >>> The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 13:51:18 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 11:51:18 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <004201c8418d$f1d15080$6401a8c0@nant> References: <004201c8418d$f1d15080$6401a8c0@nant> Message-ID: <15EBF9201DFA4F2E823608B7104BF6B4@creativesystemdesigns.com> Hi Shamil: Looks like a good plan. If the web server is either IIS there is a default web site inactivity session timeout of between 120 and 200 seconds. That can be set to any value, like 10 minutes or 600 seconds when the "Ebable HTTP Keep-Alives" turned off (un-checked). So if there is no activity for an extended period of time the connection and session is closed. There are a number of other settings that can be set on the IIS to control duration; See: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3 1a2f39c-4d59-4cba-905c-60e7af657e49.mspx?mfr=true for details. If you tune up IIS for your application/web site that should handle most events. Do you have access to the BE server? Is this what you are looking for? Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 7:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 14:06:10 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 12:06:10 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr In-Reply-To: <004601c84197$bcb932a0$6401a8c0@nant> References: <004601c84197$bcb932a0$6401a8c0@nant> Message-ID: <0B14524FF51E40968C9C3895FB534E2B@creativesystemdesigns.com> That is a good article... Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 9:02 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <000401c841d8$ea5f88d0$6401a8c0@nant> Hi Gustav, It looks like I have found a rather generic solution - here it's: Requirements: ------------- Allow ===== - to have multiple tabs opened for a browser instance for a logged-in user: all tabs will share the same login and Session id (this login/sessionId sharing is a feature by design of browsers, ASP.NET, forms authentication, custom functionality) - a session of an abandoned browser to expire in 15-30 minutes and then another session can be started with the same login or - "optionally kill" active login's session - first informing the user trying to use login, which is currently used in an active session that his attempt will "kill" active session, which he probably abandoned (by mistake) without explicit logout ... Prevent ======= - to use the same login with another instance of a browser running on the same PC; - to use the same login on another PC, while this login is active (logged-in) somewhere else; - running (loading, rendering web page) by copying & pasting URL from one tab's window to another tab within one browser instance or to another browser instance... To implement above requirements I plan to: ------------------------------------------ Before navigating to a URL with my Web App: =========================================== - prepare context parameters to put them in the URL's QueryString to keep initial rendering state/context for a Web Page to be navigated/transferred; - generate a unique hash for the QueryString using the following values: 1) Login name; 2) login timestamp - created on login and stored in Cache using login name as a key; 3) The session navigation step Id (navid) - unique sequential number incremented for every Redirect/Transfer and kept on the Session level; 4) SessionId (the fact is that Sessionid can be the same for logins/logouts for the same/other logins when these logins are happening in one browser instance...) This hash will be added to the QueryString together with navId; - make an URL with parameters and navigate/transfer to it; On page loading/building on server side I will: =============================================== - use generated hash to create Session[...] item key on page's first load within given context (!Page.IsPostback); - if the same query string will be used (copy & paste) on another *tab of the same browser instance* then I can check that this hash was already used (by reading Session[...] item) when rendering the first page and I will cancel rendering of the second's tab page.... - if the same query string will be used (copy & paste) on another *instance* of a browser then by recreating hash I will see that it will not fit the SessionId and I will cancel rendering page on the second browser instance... - IOW this hash will be a good measure to prevent compromising the QueryString values... - the Session[....] hash value has to be cleared out/saved in db when navigating to another URL, that will not always be possible, but that should be rare occasions and therefore I expect there will be not be that much "hanging abandoned hashes"... Additionally ============ - to prevent copied & pasted URL with QueryString parameters to be used within the same browser instance when first page is navigated out I can keep hash saved in the db table and this table's data used for the check described above. This table's data will be cleared when session ends/expires or this data can be used as a navigation audit trail... Summary ====== It looks like I covered all the possible variations - still the above solution is rather simple to implement and it's scalable... Currently I will just use QueryString to keep navigation context: QueryString is known as being an insecure for compromising attempts but because of the fact that I plan to add a hash to this QueryString in (the near) future I will keep it secure: and the hash calculation/check will be done in the generic part of my code as well as mentioned above navId caluclation, as well as keeping session login timeStamp in Cache[...], as well as keeping page rendering hash in Session[...], as well as clearing Session[...] hash/saving it in DB when navigating out or when session gets expired... Final note: =========== Originally I planned to stop using QueryString because it's commonly accepted as insecure but the solution above allows me (?) to continue using it (QueryString) without that much additional efforts and having it good enough secured (I have a Web app under development, which has different user contexts depending on roles and these contexts' can be dynamically changed without logging-out/-in, and users are rather inexperienced, and this application have to communicate with external credit card processing server, and this application should have easy navigation, and this application should place consistent orders, which are generated from shopping cart(s)' items, which in turn are collected in different contexts in which e.g. a user can be an admin making an order for a customer who in turn purchases a service for another customer who should be able to see this to be purchased service as owned by his account when purchase completes but the first customer should have this service paid from his accountetc... Because of this relative complexity of the app I looked for a solution, which is presented above, which isn't contradictory (?) and which is not that a big issue to implement generic way.... Being here now I will probably even weaken the requirement stating to not let an URL with QueryString parameters to be copied & pasted and activated (corresponding page loaded/rendered) within tabs of one browser instance: I will let to do that except just one case when application redirects to an external credit cards processing service - this service should be redirected only once within check-out process and until it calls back transaction is not finished... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 8:27 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil Oh, that is a nightmare. I just opened three tabs (it's me at 213.150.48.58) and the only parameter changing is Page View Count. And that counts up also if the user requests a refresh of the browser window! And it counts down as the sessions time out. Not very useful. So now what? Could a client side GUID be generated that was recorded at server side? Sadly, I have little time to work intensively with this right now - a web session on the new MySQL Falcon engine is approaching - but count me in if you need further testing - it would be really nice to find out how to deal with this issue which will pop up again and again. /gustav >>> shamil at users.mns.ru 18-12-2007 18:02 >>> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr In-Reply-To: <0B14524FF51E40968C9C3895FB534E2B@creativesystemdesigns.com> Message-ID: <000b01c841d8$eb90b5d0$6401a8c0@nant> Yes, I agree, the author - Faisal Khan - wrote really good article and made a very useful and well running sample for it. Here I found another interesting article by the same author: http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 11:06 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr That is a good article... Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 9:02 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <15EBF9201DFA4F2E823608B7104BF6B4@creativesystemdesigns.com> Message-ID: <001201c841d8$ec163980$6401a8c0@nant> Hi Jim, I need to find a solution independent on the fact do I have available dedicated Windows/IIS/ASP.NET server or my/my customers' web app run on a hosted windows/asp.net server, which could not have available for me options to fine tune IIS attributes/properties... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 10:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil: Looks like a good plan. If the web server is either IIS there is a default web site inactivity session timeout of between 120 and 200 seconds. That can be set to any value, like 10 minutes or 600 seconds when the "Ebable HTTP Keep-Alives" turned off (un-checked). So if there is no activity for an extended period of time the connection and session is closed. There are a number of other settings that can be set on the IIS to control duration; See: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3 1a2f39c-4d59-4cba-905c-60e7af657e49.mspx?mfr=true for details. If you tune up IIS for your application/web site that should handle most events. Do you have access to the BE server? Is this what you are looking for? Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 7:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 _______________________________________________ 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 From Gustav at cactus.dk Wed Dec 19 05:21:01 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 19 Dec 2007 12:21:01 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Message-ID: Hi Shamil Thanks for that link - looks extremely On Topic, and for your comprehensive thoughts in the other mail. I'll have to study them carefully at some later after-office hours ... /gustav >>> shamil at users.mns.ru 19-12-2007 01:48 >>> Yes, I agree, the author - Faisal Khan - wrote really good article and made a very useful and well running sample for it. Here I found another interesting article by the same author: http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 -- Shamil From wdhindman at dejpolsystems.com Wed Dec 19 11:07:45 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 19 Dec 2007 12:07:45 -0500 Subject: [dba-VB] ASP.NEt 2.0: FormsAuthentication:how to prevent usingthe same login *second* time fr References: <000b01c841d8$eb90b5d0$6401a8c0@nant> Message-ID: <001601c84261$ad4b3ff0$ef706c4c@jisshowsbs.local> ...that's a very useful resource site ...tks William ----- Original Message ----- From: "Shamil Salakhetdinov" To: Sent: Tuesday, December 18, 2007 7:48 PM Subject: Re: [dba-VB] ASP.NEt 2.0: FormsAuthentication:how to prevent usingthe same login *second* time fr > Yes, I agree, the author - Faisal Khan - wrote really good article and > made > a very useful and well running sample for it. > > Here I found another interesting article by the same author: > http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 > > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Tuesday, December 18, 2007 11:06 PM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > usingthe same login *second* time fr > > That is a good article... Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil > Salakhetdinov > Sent: Tuesday, December 18, 2007 9:02 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > usingthe same login *second* time fr > > Hi Gustav, > > OK, killing session when simultaneous FormsAutentication login with the > same > credentials happens or wait 20 minutes this is one "programmers' > nightmare" > issue, and here is another one: > > - in IE7 (or FireFox 2.x +) you can open several tabs in one browser > instance and then all these tabs' windows will share the same session... > > How about that "nightmare"? > > I have got deployed here > > http://shamils-4.hosting.parking.ru/Sessions > > a sample from this article > > http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 > > > by setting session time-out for three minutes > > mode="InProc" > cookieless="AutoDetect" > timeout="3" /> > > just for testing purposes to see how sessions expire and how one browser's > instance tabs share the same session ID... > > Now imagine a Web app having context (i.e. some internal state) and a user > opening several tabs in one browser instance and copying and pasting URL > "to > see what happens" or to maybe do several tasks with the same Web app > having > issues the *same* session Ids for one login, which could be working on one > task when this user switches and prepares another. When > FormsAuthentication > added then user *will not* need to login again if he copy and paste URLs > in > windows of the different tabs of the same browser instance... > > Server side app will not be aware how many windows are opened on client > side > without special measures... > > What those measures should be to differentiate calls coming from different > windows having the same URL, same session Id, same Forms Authentication > cookie? > > I currently see the only "simple" solution to have hidden HTML field(s) > with > some IDs for every page returned from server to browser, and when browser > posts back such page then this ID expires and is changed to another, and > server side app has to keep track of these custom IDs, and when they are > sent via callback remove them etc. > > ... > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, December 18, 2007 7:21 PM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > using > the same login *second* time fr > > Hi Shamil > > That was my thoughts and conclusion. > And it does have that complication. However, at _any_ time the user can > "pull the plug" - in many ways with or without intention. I think that's > the > programmer's nightmare all the time to consider "what happens at this > point > if the user session is killed?". The user may loose data typed in, but the > app should not crash and stored data should not get corrupted. > > Further, you cannot educate users to always logout clicking a button. As > the > good guy I am I always try to do so, but in Hotmail you are redirected to > msn.com which I hate, thus I always close a Hotmail session by clicking > the > close button of the window, and most users will do as well as they forget > or > don't understand why not to do so. > > Also, your client must be really nice and patient! Keeping a user logged > out > for about 20 minutes if something happens will not raise popularity among > users. Again, users are impatient and will not understand why they can not > just log in again. > > /gustav > >>>> shamil at users.mns.ru 18-12-2007 16:52 >>> > > > > ...the most user-friendly looks like to "kill" existing session when a > login > with the same FormsAuthentication credentials happens - this should be a > rare occasion after all and this will not force users to wait until > session > time-out expires... > > ...the only complication for the latter approach is that Web application > keeping some state information should be ready to be "killed" any time - I > mean when they get "killed" they shouldn't leave the system and back-end > database in inconsistent state - the "killer: should be able to "catch-on" > on the session it "kills"... > > ...yes, I know web applications should be better programmed completely > stateless - trying to achieve that here but not yet there - have to > convince > customer to change the ways they usually work with desktop apps - I mean > to > not expect the same "stateful" behavior from Web apps because "it's all > two > blades sword" - you gain in one feature/functionality/usability issue - > you > loose in another... > > > > > _______________________________________________ > 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 > > _______________________________________________ > 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 > From newsgrps at dalyn.co.nz Thu Dec 20 20:27:15 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 15:27:15 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <200712071829.lB7ISxDd021422@databaseadvisors.com> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> Message-ID: <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Group, I couldn't work out how this could be done so I am trying the group again. I am using VB.net in Visual Studio 2005. This is a web application. I have code that gets the path and name of a pdf file located on a server. What I want to do within the code is have a file download box open which gives the user an option of opening or saving the PDF file. The Process class doesn't deem to help because it tries to open the file on the web server (and not the user's). My.Computer.Network.DownloadFile Method seems to require a destination path and filename, but I don't want it to automatically be saved. Regards David Emerson Dalyn Software Ltd Wellington, New Zealand From michael at ddisolutions.com.au Thu Dec 20 20:42:31 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 21 Dec 2007 13:42:31 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> Hi David, I guess the links I sent you didn't do the job then... How about 2 links on the page, 1 to the pdf that will open it in the browser. The other to a zip of the pdf that can be downloaded. Too simple? ;-) cheers Michael M -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Friday, 21 December 2007 1:27 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Group, I couldn't work out how this could be done so I am trying the group again. I am using VB.net in Visual Studio 2005. This is a web application. I have code that gets the path and name of a pdf file located on a server. What I want to do within the code is have a file download box open which gives the user an option of opening or saving the PDF file. The Process class doesn't deem to help because it tries to open the file on the web server (and not the user's). My.Computer.Network.DownloadFile Method seems to require a destination path and filename, but I don't want it to automatically be saved. Regards David Emerson Dalyn Software Ltd Wellington, New Zealand _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 20 20:56:52 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 15:56:52 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> Message-ID: <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Michael, I looked at the two links. The first got me in the right direction but didn't provide a direct solution. The second one was an addon for Firefox which most of the users don't have. However, I have found a couple of links that might solve the problem: http://www.west-wind.com/WebLog/posts/76293.aspx http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_Dialog David At 21/12/2007, you wrote: >Hi David, > >I guess the links I sent you didn't do the job then... > >How about 2 links on the page, 1 to the pdf that will open it in the >browser. >The other to a zip of the pdf that can be downloaded. > >Too simple? ;-) > >cheers > >Michael M > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:27 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Group, > >I couldn't work out how this could be done so I am trying the group >again. > >I am using VB.net in Visual Studio 2005. This is a web application. I >have code that gets the path and name of a pdf file located on a server. >What I want to do within the code is have a file download box open which >gives the user an option of opening or saving the PDF file. > >The Process class doesn't deem to help because it tries to open the file >on the web server (and not the user's). > >My.Computer.Network.DownloadFile Method seems to require a destination >path and filename, but I don't want it to automatically be saved. > > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > >_______________________________________________ >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 From michael at ddisolutions.com.au Thu Dec 20 22:23:12 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 21 Dec 2007 15:23:12 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET References: <200712071829.lB7ISxDd021422@databaseadvisors.com><20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> Looking through the comments from http://www.west-wind.com/WebLog/posts/76293.aspx it appears that Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") ); will fail in some circumstances... one of the many reasons I prefer working with desktop apps. good luck! Michael M From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Friday, 21 December 2007 1:57 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Michael, I looked at the two links. The first got me in the right direction but didn't provide a direct solution. The second one was an addon for Firefox which most of the users don't have. However, I have found a couple of links that might solve the problem: http://www.west-wind.com/WebLog/posts/76293.aspx http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_ Dialog David At 21/12/2007, you wrote: >Hi David, > >I guess the links I sent you didn't do the job then... > >How about 2 links on the page, 1 to the pdf that will open it in the >browser. >The other to a zip of the pdf that can be downloaded. > >Too simple? ;-) > >cheers > >Michael M > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:27 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Group, > >I couldn't work out how this could be done so I am trying the group >again. > >I am using VB.net in Visual Studio 2005. This is a web application. I >have code that gets the path and name of a pdf file located on a server. >What I want to do within the code is have a file download box open >which gives the user an option of opening or saving the PDF file. > >The Process class doesn't deem to help because it tries to open the >file on the web server (and not the user's). > >My.Computer.Network.DownloadFile Method seems to require a destination >path and filename, but I don't want it to automatically be saved. > > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > >_______________________________________________ >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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 20 23:03:34 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 18:03:34 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> Message-ID: <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> I looked and couldn't see the problems you were referring to. My app seems to work ok (fingers crossed). The only problem I have now is that if I want two different PDF's downloaded they can't be done. The reason seems to be that Respond.End() ends the scripting of the page. Here is my code (simplified): boolRPXReport = False Dim split As String() = strReportNoList.Split(New [Char]() {"|"c}) Dim strReportNo As String For Each strReportNo In split 'Code here gets values for strReportType intReport = CInt(strReportNo) If strReportType <> "pdf" Then 'Code here gets ActiveReport and adds it to rptCombined.Document boolRPXReport = True Else 'If the report is already a PDF then it should be downloaded separately Response.ContentType = "Application/pdf" Response.AppendHeader("Content-Disposition", "attachment; filename=" + strReportFile + ".pdf") Response.TransmitFile("D:\PDFFiles\" + strReportFile + ".pdf") Response.End() End If Next strReportNo If boolRPXReport = True Then 'Download the combined report PDF If Me.PdfExport1 Is Nothing Then Me.PdfExport1 = New DataDynamics.ActiveReports.Export.Pdf.PdfExport End If Me.PdfExport1.Export(rptCombined.Document, m_stream) m_stream.Position = 0 Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment; filename=PVPBlankReports.pdf") Response.BinaryWrite(m_stream.ToArray()) Response.End() End If Is there any way for the code to continue processing each strReportNo even after one PDF has been downloaded? David At 21/12/2007, you wrote: >Looking through the comments from >http://www.west-wind.com/WebLog/posts/76293.aspx it appears that >Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") ); >will fail in some circumstances... one of the many reasons I prefer >working with desktop apps. > >good luck! > >Michael M > >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:57 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Michael, > >I looked at the two links. The first got me in the right direction but >didn't provide a direct solution. The second one was an addon for >Firefox which most of the users don't have. > >However, I have found a couple of links that might solve the problem: > >http://www.west-wind.com/WebLog/posts/76293.aspx > >http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_ >Dialog > >David > > > >At 21/12/2007, you wrote: > >Hi David, > > > >I guess the links I sent you didn't do the job then... > > > >How about 2 links on the page, 1 to the pdf that will open it in the > >browser. > >The other to a zip of the pdf that can be downloaded. > > > >Too simple? ;-) > > > >cheers > > > >Michael M > > > >-----Original Message----- > >From: dba-vb-bounces at databaseadvisors.com > >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson > >Sent: Friday, 21 December 2007 1:27 PM > >To: dba-vb at databaseadvisors.com > >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > > > >Group, > > > >I couldn't work out how this could be done so I am trying the group > >again. > > > >I am using VB.net in Visual Studio 2005. This is a web application. I > > >have code that gets the path and name of a pdf file located on a >server. > >What I want to do within the code is have a file download box open > >which gives the user an option of opening or saving the PDF file. > > > >The Process class doesn't deem to help because it tries to open the > >file on the web server (and not the user's). > > > >My.Computer.Network.DownloadFile Method seems to require a destination > >path and filename, but I don't want it to automatically be saved. > > > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand From accessd at shaw.ca Mon Dec 24 11:21:38 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Mon, 24 Dec 2007 09:21:38 -0800 Subject: [dba-VB] Ot Christmas In-Reply-To: <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: Hi All: At the risk of being politically incorrect: Merry Christmas and a Happy New Year to the best list on the Internet... :-) Best Regards Jim From wdhindman at dejpolsystems.com Mon Dec 24 11:43:25 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 24 Dec 2007 12:43:25 -0500 Subject: [dba-VB] Ot Christmas References: <200712071829.lB7ISxDd021422@databaseadvisors.com><20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local><20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local><20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <001901c84654$7ccbfe40$ef706c4c@jisshowsbs.local> ...and a very pc holiday season to you and yours :) William ----- Original Message ----- From: "Jim Lawrence" To: Sent: Monday, December 24, 2007 12:21 PM Subject: [dba-VB] Ot Christmas > Hi All: > > At the risk of being politically incorrect: > > Merry Christmas and a Happy New Year to the best list on the Internet... > :-) > > Best Regards > Jim > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From ridermark at gmail.com Mon Dec 24 14:55:07 2007 From: ridermark at gmail.com (Mark Rider) Date: Mon, 24 Dec 2007 14:55:07 -0600 Subject: [dba-VB] Ot Christmas In-Reply-To: References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: I thought the only PC part of this list was the machines we use to program! Merry Christmas! -- Mark Rider http://commonsensesecurity.info Try to learn something about everything and everything about something. - Thomas H. Huxley From jwcolby at colbyconsulting.com Wed Dec 26 10:04:48 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 26 Dec 2007 11:04:48 -0500 Subject: [dba-VB] VB.Net "proxy" progress indicator Message-ID: <000901c847d9$0b076b10$977aa8c0@M90> I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com From max.wanadoo at gmail.com Wed Dec 26 10:27:44 2007 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 26 Dec 2007 16:27:44 -0000 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <002901c847dc$3ec7ae30$8119fea9@LTVM> John, My EATBloat shows progess of import/export of Access object (Forms, Queries, etc) (A3k). I am sure that you could adapt that to your files. You can get to it from here if it is of any use: www.peoplelinks.co.uk/msaccess Max -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 4:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Wed Dec 26 11:08:17 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 26 Dec 2007 20:08:17 +0300 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <000901c847e1$e8c8da30$6501a8c0@nant> Hello John, If you're sure your main code export/import will never be used in multi-threading scenarios then you can just use so called Delegates... But I'd propose you to try to implement multi-threading and use BackGroundWorker class - they both could help you to solve your task effectively and have your tasks completed quicker because of multi-threading - have a look at this article/book excerpt: http://www.albahari.com/threading/part3.html#_BackgroundWorker -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Wed Dec 26 11:08:48 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 26 Dec 2007 09:08:48 -0800 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> References: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: John, I'm not sure I followed all of that, but you might be able to simplify your life with a "ProxyHelper" class and separate classes for import and export. We tend to use objects like that to handle repetitive code for performing similar actions. We simply pass the appropriate objects into the helper class, which handles all the UI stuff like progress meters, message boxes, etc. For example, we have a TransferHelper class which calls into TranferImport, TransferExport, TransferByEmail, etc. We declare an instance of that class in the helper and use a structure to retrieve the results from the specific class, and we use those results to log the event, notify the user, etc. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 8:05 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Wed Dec 26 11:17:40 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 26 Dec 2007 20:17:40 +0300 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <000001c847e3$3843e0e0$6501a8c0@nant> Hi John, I addition to my previous posting here is delegates sample: using System; public delegate void LogHandler(string s); public class Process { public void Run(LogHandler lh) { lh("Start process"); //... lh("Stop process"); } } public class Tracer { public void Trace(string s) { System.Console.WriteLine("Tracer: {0}", s); } } public class Test { public static void Log(string s) { System.Console.WriteLine("static Log: {0}", s); } public static int Main(string[] args) { Process p = new Process(); Tracer t = new Tracer(); LogHandler lh = null; lh += new LogHandler(Log); lh += new LogHandler(t.Trace); p.Run(lh); return 0; } } And here is events sample (events is a subset of delegates in .NET Framework) using System; public delegate void LogHandler(string s); public class Process { public event LogHandler LogEvent = null; public void Run() { if (LogEvent != null) LogEvent("Start process"); //... if (LogEvent != null) LogEvent("Stop process"); } } public class Tracer { public void Trace(string s) { System.Console.WriteLine("Tracer: {0}", s); } } public class Test { public static void Log(string s) { System.Console.WriteLine("static Log: {0}", s); } public static int Main(string[] args) { Process p = new Process(); Tracer t = new Tracer(); p.LogEvent += new LogHandler(Log); p.LogEvent += new LogHandler(t.Trace); p.Run(); return 0; } } The samples above are from this page: http://www.math.msu.su/~vvb/2course/Borisenko/AddEdu/CSharp/CSharp.html but its "meat" text is in Russia therefore I copied and pasted code samples here... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Wed Dec 26 11:45:38 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 26 Dec 2007 12:45:38 -0500 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847e1$e8c8da30$6501a8c0@nant> References: <000901c847d9$0b076b10$977aa8c0@M90> <000901c847e1$e8c8da30$6501a8c0@nant> Message-ID: <001d01c847e7$20cb21e0$977aa8c0@M90> Yes, I want to use backgroundworker. The in some cases the process will really be: 1) The CSVExport process will export a table of tens of millions of records to a directory on an Address Validation Server (AVS), the AVS Input directory. 2) The Address Validation Server has a set of directories that it watches. As files appear in the watched directories the AVS starts to perform the address validation process on those files. 3) The AVS places address validation processed files into a set of matching output directories (one input / output pair), the AVS Output directory. 4) The CSVImport process will watch the AVS Output directory for that CSV process. As files appear in that directory it will import those files back in to SQL Server. So the entire process is an Out / AVS / In cycle. This cycle can be performed on many different tables. Each table needing AVS processing has a Spec record for the CSV OUT and a spec record for the CSV IN. I currently have five different tables of addresses needing validation, and the validation can occur on a timetable, perhaps once every three weeks etc, but the point is that it will eventually be totally automatic. A supervisor spawns a table AVS process that starts exporting data to the AVS, the AVS processes the data, and the results are imported back in again. Thus I really need (or should use) worked threads to handle the CSV export and import processes, for potentially N tables at a time, potentially "simultaneously". 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 Shamil Salakhetdinov Sent: Wednesday, December 26, 2007 12:08 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] VB.Net "proxy" progress indicator Hello John, If you're sure your main code export/import will never be used in multi-threading scenarios then you can just use so called Delegates... But I'd propose you to try to implement multi-threading and use BackGroundWorker class - they both could help you to solve your task effectively and have your tasks completed quicker because of multi-threading - have a look at this article/book excerpt: http://www.albahari.com/threading/part3.html#_BackgroundWorker -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From jwcolby at colbyconsulting.com Mon Dec 31 16:00:19 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 31 Dec 2007 17:00:19 -0500 Subject: [dba-VB] inheriting events Message-ID: <001c01c84bf8$89521650$657aa8c0@M90> I designed a base class which has events: Public Class clsProxyProgress Public Event evProcessName(ByVal strProcessName As String) Public Event evDirectory(ByVal strDirectory As String) Public Event evCurrentFile(ByVal strCurrentFile As String) Public Event evFilesCompleted(ByVal intFilesCompleted As Integer) Public Event evFileCnt(ByVal intFileCnt As Integer) Public Event evRowsCopied(ByVal intRowsCopied As Long) Public Event evStatus(ByVal strStatus As String) I then inherit that class in a child class. Public Class clsCSVDataExportSpec Inherits clsProxyProgress The child class clsCSVDataExportSpec cannot "see" the events in the parent, i.e. it cannot do: RaiseEvent evStatus(mstrStatus) even though its parent class has that event. If I try to do this in the child class I get a compile error. In order to get around this I created functions in the parent class clsProxyProgress Public Sub mStatus(ByVal strStatus As String, ByVal blnStatusReset As Boolean, ByVal blnStatusTimeStamp As Boolean) If blnStatusReset Then mstrStatus = "" If blnStatusTimeStamp Then mstrStatus = mstrStatus & vbCrLf & Now() End If If Len(mstrStatus) > 0 Then mstrStatus = mstrStatus & vbCrLf & strStatus Else mstrStatus = strStatus End If RaiseEvent evStatus(mstrStatus) End Sub NOTICE that in the last line of the sub I raise the evStatus. I then call this sub from the child clsCSVDataExportSpec so that the parent class clsProxyProgress raises the event for the child class. I do this simply because if I try to raise the event up in the parent class directly I get a compile error. The whole point of this stuff is to allow a form to sink events and display data in text boxes on the form. In a form class I dimension a variable for this child class: Private WithEvents fclsCSVDataExport As clsCSVDataExportSpec further down I "sink" the events for this class: Private Sub fclsCSVDataExport_evStatus(ByVal strStatus As String) Handles fclsCSVDataExport.evStatus txtStatus.Text = strStatus Application.DoEvents() End Sub In the "Handles ..." the evStatus is a choice in the intellisense dropdown, IOW this form's module "sees" the event that the child class fclsCSVDataExport inherits from its parent class clsProxyProgress. However the sub fclsCSVDataExport_evStatus() never receives control when the Raisevent is executed. I SUSPECT that the issue is that the "Handles ..." needs to be "Handles fclsProxyProgress", i.e. it needs to "handle" the parent of fclsCSVDataExport, not fclsCSVDataExport itself. fclsCSVDataExport is the actual class that performs the data export for me. clsProxyProgress only exists to allow several different such import / export classes inherit common events and code, and I do that so that I can (eventually) have a generic form that dimensions a clsProxyProgress rather than having a specific import or export class such as clsCSVDataExport or clsCSVDataImport. If anyone is following what I am doing and can point me to how to make this work it would be appreciated. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Dec 1 11:04:04 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 1 Dec 2007 12:04:04 -0500 Subject: [dba-VB] Converting the value in a field Message-ID: <005501c8343c$2deeb580$647aa8c0@M90> I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Dec 1 11:30:31 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 1 Dec 2007 12:30:31 -0500 Subject: [dba-VB] Ionforge Message-ID: <005601c8343f$e5533a40$647aa8c0@M90> Is anyone using Ionforge VCS? Like it? Easy to use, hard to use? Gotchas for .Net? Misc comments? John W. Colby Colby Consulting www.ColbyConsulting.com From bheid at sc.rr.com Sat Dec 1 15:37:10 2007 From: bheid at sc.rr.com (Bobby Heid) Date: Sat, 1 Dec 2007 16:37:10 -0500 Subject: [dba-VB] Converting the value in a field In-Reply-To: <005501c8343c$2deeb580$647aa8c0@M90> References: <005501c8343c$2deeb580$647aa8c0@M90> Message-ID: <001101c83462$5432e4c0$fc98ae40$@rr.com> Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Dec 2 01:18:04 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 2 Dec 2007 02:18:04 -0500 Subject: [dba-VB] Converting the value in a field In-Reply-To: <001101c83462$5432e4c0$fc98ae40$@rr.com> References: <005501c8343c$2deeb580$647aa8c0@M90> <001101c83462$5432e4c0$fc98ae40$@rr.com> Message-ID: <005e01c834b3$7b3c5140$647aa8c0@M90> And which type is faster? CInt smells of VB6 compatibility code. 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 Bobby Heid Sent: Saturday, December 01, 2007 4:37 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Mon Dec 3 02:02:56 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 03 Dec 2007 09:02:56 +0100 Subject: [dba-VB] Weird table name restriction Message-ID: Hi John Does this from Sybase work: select valid_name("Object_name") http://manuals.sybase.com/onlinebooks/group-asarc/srg1100e/sqlref/@Generic__BookTextView/64305;pt=60135/* /gustav >>> jwcolby at colbyconsulting.com 30-11-2007 20:04:15 >>> I just discovered that SQL Server (or VB.Net) does not like dashes in table names. If I use a table name "ZIP4-AA_X", the BulkCopy.WriteToServer throws an error "can't access destination table" but if I remove the dash "ZIP4AA_X" it works just fine. The problem is that I take the name of the datafile, strip off the extension and use that as my table name. Thus I now have to start doing edits of the file name before I can use it as a field name. The hoops we have to jump through... John W. Colby Colby Consulting www.ColbyConsulting.com From DWUTKA at Marlow.com Mon Dec 3 09:22:59 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 09:22:59 -0600 Subject: [dba-VB] Reserved words In-Reply-To: <002f01c83389$497a0a10$647aa8c0@M90> Message-ID: Why not prepend all your tables with tbl? That would guarantee that you don't hit a reserved word. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, November 30, 2007 1:44 PM To: dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Reserved words Does anyone know if the reserved words in SQL Server (can't be used in table names etc) are in a table anywhere (in sql server)? I have code that builds tables and it really needs to check the proposed table name to make sure that the name isn't a reserved word, and that it does not have special characters. I have had TWO times now where I was hunting down errors caused by issues with what is valid in a table name. I could build a table of reserved words but if any new ones are added my list would be short. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From DWUTKA at Marlow.com Mon Dec 3 09:24:50 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 09:24:50 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From jwcolby at colbyconsulting.com Mon Dec 3 10:19:48 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 11:19:48 -0500 Subject: [dba-VB] Reserved words In-Reply-To: References: <002f01c83389$497a0a10$647aa8c0@M90> Message-ID: <00c901c835c8$53b82ed0$647aa8c0@M90> And that is what I am doing now. Thanks for the suggestion. 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 Drew Wutka Sent: Monday, December 03, 2007 10:23 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Reserved words Why not prepend all your tables with tbl? That would guarantee that you don't hit a reserved word. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, November 30, 2007 1:44 PM To: dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Reserved words Does anyone know if the reserved words in SQL Server (can't be used in table names etc) are in a table anywhere (in sql server)? I have code that builds tables and it really needs to check the proposed table name to make sure that the name isn't a reserved word, and that it does not have special characters. I have had TWO times now where I was hunting down errors caused by issues with what is valid in a table name. I could build a table of reserved words but if any new ones are added my list would be short. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 3 10:20:41 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 11:20:41 -0500 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: <00ca01c835c8$73699610$647aa8c0@M90> Kind of scary a computer that thinks like Susan. Even scarier people who would want to use a computer that thinks like Susan. ;-) 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 Drew Wutka Sent: Monday, December 03, 2007 10:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 3 10:29:05 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:29:05 -0800 Subject: [dba-VB] Ionforge In-Reply-To: <005601c8343f$e5533a40$647aa8c0@M90> References: <005601c8343f$e5533a40$647aa8c0@M90> Message-ID: I have used it in the past and liked it, but I haven't tried it with .Net. It's pretty easy to use. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 9:31 AM To: 'Access Developers discussion and problem solving'; dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Ionforge Is anyone using Ionforge VCS? Like it? Easy to use, hard to use? Gotchas for .Net? Misc comments? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 3 10:32:45 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:32:45 -0800 Subject: [dba-VB] Converting the value in a field In-Reply-To: <005e01c834b3$7b3c5140$647aa8c0@M90> References: <005501c8343c$2deeb580$647aa8c0@M90><001101c83462$5432e4c0$fc98ae40$@rr.com> <005e01c834b3$7b3c5140$647aa8c0@M90> Message-ID: I understand that all the Ctype functions boil down to the same thing under the hood and run about the same speed. The benefit of CType is that you can cast the object as just about anything, including custom objects. Don't recall being able to do that in VBA. ;} You can also use DirectCast if you are absolutely sure the object contains data and is the right type. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 11:18 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field And which type is faster? CInt smells of VB6 compatibility code. 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 Bobby Heid Sent: Saturday, December 01, 2007 4:37 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 10:33:49 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:33:49 -0800 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL From jwcolby at colbyconsulting.com Mon Dec 3 12:22:01 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 13:22:01 -0500 Subject: [dba-VB] Listing distinct values in field Message-ID: <00db01c835d9$66d83580$647aa8c0@M90> In my client's business he needs a "data dictionary" kind of thing which essentially tells him the valid values in any given field (for WHERE clause purposes). I receive CSV and fixed width files which I import into SQL Server. I need to give him a list of the fields and the valid values in each field (actual different data items). I will be writing such a widget if I can't find one already out there. Does anyone have such a widget or know where to find one? John W. Colby Colby Consulting www.ColbyConsulting.com From DWUTKA at Marlow.com Mon Dec 3 11:49:43 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 11:49:43 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: Message-ID: I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From cfoust at infostatsystems.com Mon Dec 3 13:00:30 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 11:00:30 -0800 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: Message-ID: ROTFL Sort of like Susan? Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 9:50 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. From ssharkins at gmail.com Mon Dec 3 13:11:53 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 3 Dec 2007 14:11:53 -0500 Subject: [dba-VB] Listing distinct values in field References: <00db01c835d9$66d83580$647aa8c0@M90> Message-ID: <00ad01c835e0$60baf230$4b3a8343@SusanOne> Well, for the meta data, I'll check out schema recordsets. I know that T-SQL can produce a unique sort, but off the top of my head, I don't remember the keyword. Susan H. > In my client's business he needs a "data dictionary" kind of thing which > essentially tells him the valid values in any given field (for WHERE > clause > purposes). I receive CSV and fixed width files which I import into SQL > Server. I need to give him a list of the fields and the valid values in > each field (actual different data items). I will be writing such a widget > if I can't find one already out there. > > Does anyone have such a widget or know where to find one? > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Mon Dec 3 15:57:22 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 16:57:22 -0500 Subject: [dba-VB] VS2005 Data Form Wizard Message-ID: <00e801c835f7$7c20d5a0$647aa8c0@M90> Does the Data Form Wizard no longer exist in VS 2005? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 3 16:19:26 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 17:19:26 -0500 Subject: [dba-VB] Toolbox data objects Message-ID: <00ea01c835fa$91061450$647aa8c0@M90> My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX objects. I could swear I had used them sometime in the past. Any idea what is going on? Was this a previous version of VS? Need to include some object? help... John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 18:58:57 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 16:58:57 -0800 Subject: [dba-VB] VS2005 Data Form Wizard In-Reply-To: <00e801c835f7$7c20d5a0$647aa8c0@M90> References: <00e801c835f7$7c20d5a0$647aa8c0@M90> Message-ID: What data form wizard are you talking about, John? I must have missed that. 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 03, 2007 1:57 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VS2005 Data Form Wizard Does the Data Form Wizard no longer exist in VS 2005? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 19:05:47 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 17:05:47 -0800 Subject: [dba-VB] Toolbox data objects In-Reply-To: <00ea01c835fa$91061450$647aa8c0@M90> References: <00ea01c835fa$91061450$647aa8c0@M90> Message-ID: I don't have those objects in my toolbox, John. What are you trying to do? 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 03, 2007 2:19 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Toolbox data objects My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX objects. I could swear I had used them sometime in the past. Any idea what is going on? Was this a previous version of VS? Need to include some object? help... John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Mon Dec 3 21:51:20 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 3 Dec 2007 22:51:20 -0500 Subject: [dba-VB] Toolbox data objects References: <00ea01c835fa$91061450$647aa8c0@M90> Message-ID: <000501c83628$ef025b80$ef706c4c@jisshowsbs.local> ...I've removed vs'3 and vs'5 from my systems but those objects are not in the vs'8 toolset either. William ----- Original Message ----- From: "Charlotte Foust" To: Sent: Monday, December 03, 2007 8:05 PM Subject: Re: [dba-VB] Toolbox data objects >I don't have those objects in my toolbox, John. What are you trying to > do? > > 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 03, 2007 2:19 PM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Toolbox data objects > > My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX > objects. I could swear I had used them sometime in the past. > > Any idea what is going on? Was this a previous version of VS? Need to > include some object? help... > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > 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 > From wdhindman at dejpolsystems.com Mon Dec 3 22:42:55 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 3 Dec 2007 23:42:55 -0500 Subject: [dba-VB] Toolbox data objects References: <00ea01c835fa$91061450$647aa8c0@M90> <000501c83628$ef025b80$ef706c4c@jisshowsbs.local> Message-ID: <000301c83630$23d682d0$ef706c4c@jisshowsbs.local> JC ...methinks you may be confusing datasource selection with the tool box. William ----- Original Message ----- From: "William Hindman" To: Sent: Monday, December 03, 2007 10:51 PM Subject: Re: [dba-VB] Toolbox data objects > ...I've removed vs'3 and vs'5 from my systems but those objects are not in > the vs'8 toolset either. > William > > ----- Original Message ----- > From: "Charlotte Foust" > To: > Sent: Monday, December 03, 2007 8:05 PM > Subject: Re: [dba-VB] Toolbox data objects > > >>I don't have those objects in my toolbox, John. What are you trying to >> do? >> >> 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 03, 2007 2:19 PM >> To: dba-vb at databaseadvisors.com >> Subject: [dba-VB] Toolbox data objects >> >> My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX >> objects. I could swear I had used them sometime in the past. >> >> Any idea what is going on? Was this a previous version of VS? Need to >> include some object? help... >> >> John W. Colby >> Colby Consulting >> www.ColbyConsulting.com >> >> _______________________________________________ >> 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 >> > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From DWUTKA at Marlow.com Tue Dec 4 10:43:30 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 4 Dec 2007 10:43:30 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: Message-ID: I didn't say that.... Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 1:01 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction ROTFL Sort of like Susan? Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 9:50 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ssharkins at gmail.com Tue Dec 4 10:56:42 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 4 Dec 2007 11:56:42 -0500 Subject: [dba-VB] Weird table name restriction References: Message-ID: <00a101c83696$ac42ea80$4b3a8343@SusanOne> Macs are for sissies. ;) Susan H. >I didn't say that.... > > Drew > > ROTFL Sort of like Susan? > > Charlotte > > I wasn't trying to be insulting. A Mac does what you expect it to do, > almost regardless of what you actually tell it to do. > > Drew From DWUTKA at Marlow.com Tue Dec 4 11:05:40 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 4 Dec 2007 11:05:40 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: <00a101c83696$ac42ea80$4b3a8343@SusanOne> Message-ID: I wouldn't say that, if you need graphic arts capabilities, Macs win hands down. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Tuesday, December 04, 2007 10:57 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Macs are for sissies. ;) Susan H. >I didn't say that.... > > Drew > > ROTFL Sort of like Susan? > > Charlotte > > I wasn't trying to be insulting. A Mac does what you expect it to do, > almost regardless of what you actually tell it to do. > > Drew _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ssharkins at gmail.com Tue Dec 4 11:30:02 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 4 Dec 2007 12:30:02 -0500 Subject: [dba-VB] Weird table name restriction References: Message-ID: <00d901c8369c$18f02ad0$4b3a8343@SusanOne> I was kidding. :) Susan H. >I wouldn't say that, if you need graphic arts capabilities, Macs win > hands down. > > Drew From newsgrps at dalyn.co.nz Wed Dec 5 18:48:36 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 13:48:36 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: References: Message-ID: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open >the files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From michael at ddisolutions.com.au Wed Dec 5 21:38:01 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 6 Dec 2007 14:38:01 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) References: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> Is this what you are looking for? http://www.useit.com/alertbox/open_new_windows.html or perhaps https://addons.mozilla.org/en-US/firefox/addon/636 I'm not 100% sure but I think the code you have can only be used on the server. cheers Michael M Subject: Re: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open the >files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > > > >_______________________________________________ >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 From Gustav at cactus.dk Thu Dec 6 01:18:50 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 06 Dec 2007 08:18:50 +0100 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) Message-ID: Hi David I have not tried your code ... so just a stupid question: Is Adobe Reader (or another pdf-application) installed on the user's machine? /gustav >>> newsgrps at dalyn.co.nz 06-12-2007 01:48:36 >>> I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open >the files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand From newsgrps at dalyn.co.nz Thu Dec 6 03:24:10 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 22:24:10 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: References: Message-ID: <20071206092107.TJMB17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> There are no stupid questions - just stupid answers :-) Yes the user (who was me) does have adobe reader installed. Part of my program uses the following code to show pdf's that are created from DataDynamic's Active Reports (this was code provided by DataDynamics): Dim m_stream As New System.IO.MemoryStream() Dim rptCombined As New DataDynamics.ActiveReports.ActiveReport3 ' Other code which creates the rptCombined report If Me.PdfExport1 Is Nothing Then Me.PdfExport1 = New DataDynamics.ActiveReports.Export.Pdf.PdfExport End If Me.PdfExport1.Export(rptCombined.Document, m_stream) m_stream.Position = 0 Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment; filename=PVPReports.pdf") Response.BinaryWrite(m_stream.ToArray()) Response.End() It looks like some of this might be able to be used to show the pdf files. What happens is that the user has the option to save or open the file. This is what I want for the pdf's as well. David At 6/12/2007, you wrote: >Hi David > >I have not tried your code ... so just a stupid question: Is Adobe >Reader (or another pdf-application) installed on the user's machine? > >/gustav > > >>> newsgrps at dalyn.co.nz 06-12-2007 01:48:36 >>> >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process >runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >"\PDFFiles\" + strReportFile + ".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this >operation. It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have >thought that it would use the local machines copy. > >David > >At 27/11/2007, you wrote: > >Hi David et al > > > >A lot of useful things can be done with the Process class. > >Some examples here: > > > > http://www.thescarms.com/dotnet/Process.aspx > > > >/gustav > > > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> > >I am using VS 2005 and VB.Net for a web site. > > > >I have a number of PDF files that are stored in a static folder on > the server. > > > >Users select from a list on files on a web page and I want to open > >the files in Adobe. Adobe reader is installed on the server. > > > >Can anyone give me a pointer to how I can take a string with path and > >file name, and open it? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 6 03:28:00 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 22:28:00 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> References: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> Message-ID: <20071206092456.OVAG9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Michael, The first link looks promising - see my reply to Gustav. David At 6/12/2007, you wrote: >Is this what you are looking for? > >http://www.useit.com/alertbox/open_new_windows.html >or perhaps >https://addons.mozilla.org/en-US/firefox/addon/636 > >I'm not 100% sure but I think the code you have can only be used on the >server. > >cheers > > >Michael M > >Subject: Re: [dba-VB] Launch and monitor external programs from .NET >(was: Open PDF file) > >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = >HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + >".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this operation. >It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have thought >that it would use the local machines copy. > >David > >At 27/11/2007, you wrote: > >Hi David et al > > > >A lot of useful things can be done with the Process class. > >Some examples here: > > > > http://www.thescarms.com/dotnet/Process.aspx > > > >/gustav > > > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> > >I am using VS 2005 and VB.Net for a web site. > > > >I have a number of PDF files that are stored in a static folder on the >server. > > > >Users select from a list on files on a web page and I want to open the > >files in Adobe. Adobe reader is installed on the server. > > > >Can anyone give me a pointer to how I can take a string with path and > >file name, and open it? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand > > > > > > > >_______________________________________________ > >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 > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From robert at webedb.com Thu Dec 6 12:28:08 2007 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 06 Dec 2007 12:28:08 -0600 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: Message-ID: <200712061832.lB6IWrgr023718@databaseadvisors.com> David, Here is what I use: Interest and skills assesment survey. As far as I know, Adobe Reader is not installed on the server. Robert At 12:00 PM 12/6/2007, you wrote: >Date: Thu, 06 Dec 2007 13:48:36 +1300 >From: David Emerson >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > (was: Open PDF file) >To: dba-vb at databaseadvisors.com >Message-ID: > <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >Content-Type: text/plain; charset="us-ascii"; format=flowed > >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process >runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >"\PDFFiles\" + strReportFile + ".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this >operation. It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have >thought that it would use the local machines copy. > >David From newsgrps at dalyn.co.nz Thu Dec 6 12:55:57 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 07 Dec 2007 07:55:57 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET References: Message-ID: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Thanks Robert. This looks like it open the pdf in a browser window. Am I correct? I am wanting the box to appear giving the user the option of opening it or saving the file. David At 7/12/2007, you wrote: >David, > >Here is what I use: > > runat="server" > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > Text="Interest and skills assesment survey." > Target="_blank"> > Interest and skills assesment survey. > > >As far as I know, Adobe Reader is not installed on the server. > >Robert > >At 12:00 PM 12/6/2007, you wrote: >>Date: Thu, 06 Dec 2007 13:48:36 +1300 >>From: David Emerson >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET >> (was: Open PDF file) >>To: dba-vb at databaseadvisors.com >>Message-ID: >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >>Content-Type: text/plain; charset="us-ascii"; format=flowed >> >>I included Gustav's code in my web application as below: >> >>Dim runPdf As New System.Diagnostics.Process >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >>"\PDFFiles\" + strReportFile + ".pdf" >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >>runPdf.Start() >> >>However, when it is run by a user I get the following error: No >>application is associated with the specified file for this >>operation. It seems to be wanting to open the file on the server. >> >>Do I need to install Adobe Acrobat on the server? I would have >>thought that it would use the local machines copy. >> >>David From joeo at appoli.com Thu Dec 6 13:19:08 2007 From: joeo at appoli.com (Joe O'Connell) Date: Thu, 6 Dec 2007 14:19:08 -0500 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> References: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: David, I have not followed this thread, so your question may have already been answered. If you want to open a pdf in the user's browser, couldn't the pdf just be the href? Open PDF If the user left clicks, the pdf should open in a new browser window. If the user right clicks, a box will open allowing the user to save the pdf on their local disk drive. Joe O'Connell -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Thursday, December 06, 2007 1:56 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Thanks Robert. This looks like it open the pdf in a browser window. Am I correct? I am wanting the box to appear giving the user the option of opening it or saving the file. David At 7/12/2007, you wrote: >David, > >Here is what I use: > > runat="server" > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > Text="Interest and skills assesment survey." > Target="_blank"> > Interest and skills assesment survey. > > >As far as I know, Adobe Reader is not installed on the server. > >Robert > >At 12:00 PM 12/6/2007, you wrote: >>Date: Thu, 06 Dec 2007 13:48:36 +1300 >>From: David Emerson >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET >> (was: Open PDF file) >>To: dba-vb at databaseadvisors.com >>Message-ID: >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >>Content-Type: text/plain; charset="us-ascii"; format=flowed >> >>I included Gustav's code in my web application as below: >> >>Dim runPdf As New System.Diagnostics.Process >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >>"\PDFFiles\" + strReportFile + ".pdf" >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >>runPdf.Start() >> >>However, when it is run by a user I get the following error: No >>application is associated with the specified file for this >>operation. It seems to be wanting to open the file on the server. >> >>Do I need to install Adobe Acrobat on the server? I would have >>thought that it would use the local machines copy. >> >>David _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 6 14:29:28 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 07 Dec 2007 09:29:28 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <20071206202629.DROX9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Joe, The PDF is one of a number of reports that are shown dynamically on the screen based on table records. The user clicks on check boxes to select the reports they want to run, then the code processes the check boxes and opens the appropriate reports/files etc. Therefore hardcoding the href isn't an option in this case. Thanks for your reply though. David At 7/12/2007, you wrote: >David, > >I have not followed this thread, so your question may have already been >answered. > >If you want to open a pdf in the user's browser, couldn't the pdf just >be the href? Open PDF > >If the user left clicks, the pdf should open in a new browser window. >If the user right clicks, a box will open allowing the user to save the >pdf on their local disk drive. > >Joe O'Connell > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Thursday, December 06, 2007 1:56 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Thanks Robert. This looks like it open the pdf in a browser >window. Am I correct? I am wanting the box to appear giving the >user the option of opening it or saving the file. > >David > >At 7/12/2007, you wrote: > >David, > > > >Here is what I use: > > > > > runat="server" > > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > > Text="Interest and skills assesment survey." > > Target="_blank"> > > Interest and skills assesment survey. > > > > > >As far as I know, Adobe Reader is not installed on the server. > > > >Robert > > > >At 12:00 PM 12/6/2007, you wrote: > >>Date: Thu, 06 Dec 2007 13:48:36 +1300 > >>From: David Emerson > >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >> (was: Open PDF file) > >>To: dba-vb at databaseadvisors.com > >>Message-ID: > >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> > >>Content-Type: text/plain; charset="us-ascii"; format=flowed > >> > >>I included Gustav's code in my web application as below: > >> > >>Dim runPdf As New System.Diagnostics.Process > >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + > >>"\PDFFiles\" + strReportFile + ".pdf" > >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal > >>runPdf.Start() > >> > >>However, when it is run by a user I get the following error: No > >>application is associated with the specified file for this > >>operation. It seems to be wanting to open the file on the server. > >> > >>Do I need to install Adobe Acrobat on the server? I would have > >>thought that it would use the local machines copy. > >> > >>David > >_______________________________________________ >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 From jwcolby at colbyconsulting.com Fri Dec 7 08:38:34 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 09:38:34 -0500 Subject: [dba-VB] Lib object references lib obj Message-ID: <00ea01c838de$d91bebc0$977aa8c0@M90> I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Dec 7 09:51:53 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 7 Dec 2007 07:51:53 -0800 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <00ea01c838de$d91bebc0$977aa8c0@M90> References: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Dec 7 10:44:11 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 11:44:11 -0500 Subject: [dba-VB] Lib object references lib obj In-Reply-To: References: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: <010901c838f0$651a0650$977aa8c0@M90> Charlotte, Thanks for the response. The last time I asked this kind of thing you showed me how to link specific modules from another project, which is the method I am currently using. How do I link the entire project? This is essentially a "framework" I am starting, so it would certainly be appropriate to link that framework to the new project if I knew how. 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: Friday, December 07, 2007 10:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From shamil at users.mns.ru Fri Dec 7 11:13:59 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Fri, 7 Dec 2007 20:13:59 +0300 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: <000301c838f4$8ea91340$6401a8c0@nant> Hello John, Why not use dedicated ClassLibs for different sets of functionality: - in one of the current ASP.NET/C# solutions I'm working here I have 7 classlibs and the main ASP.Net app... VS works very well with that kind of "advanced" stuff... Just set the reference to projects - and you're done - you can debug/trace "navigating" between projects' source code if needed... Note: Cross-referencing projects is not allowed... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 5:39 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Fri Dec 7 11:38:31 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 7 Dec 2007 09:38:31 -0800 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <010901c838f0$651a0650$977aa8c0@M90> References: <00ea01c838de$d91bebc0$977aa8c0@M90> <010901c838f0$651a0650$977aa8c0@M90> Message-ID: Bring up the properties of the project, select references, and add the dll in the selected project's bin folder. That should give you access to the functionality in that project. I'm winging it here, because we do it in a totally different way due in part to the team development environment. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 8:44 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Charlotte, Thanks for the response. The last time I asked this kind of thing you showed me how to link specific modules from another project, which is the method I am currently using. How do I link the entire project? This is essentially a "framework" I am starting, so it would certainly be appropriate to link that framework to the new project if I knew how. 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: Friday, December 07, 2007 10:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From robert at webedb.com Fri Dec 7 12:25:54 2007 From: robert at webedb.com (Robert L. Stewart) Date: Fri, 07 Dec 2007 12:25:54 -0600 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: Message-ID: <200712071829.lB7ISxDd021422@databaseadvisors.com> Yes, David, it opens it in the browser and from there, the user is viewing it and can save it from there. At 11:39 AM 12/7/2007, you wrote: >Date: Fri, 07 Dec 2007 07:55:57 +1300 >From: David Emerson >Subject: Re: [dba-VB] Launch and monitor external programs from .NET >To: dba-vb at databaseadvisors.com >Message-ID: > <20071206185408.YCUE9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >Content-Type: text/plain; charset="us-ascii"; format=flowed > >Thanks Robert. This looks like it open the pdf in a browser >window. Am I correct? I am wanting the box to appear giving the >user the option of opening it or saving the file. > >David From jwcolby at colbyconsulting.com Fri Dec 7 14:27:30 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 15:27:30 -0500 Subject: [dba-VB] Connection closed Message-ID: <012701c8390f$978270e0$977aa8c0@M90> I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Dec 7 23:32:01 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 8 Dec 2007 00:32:01 -0500 Subject: [dba-VB] Connection closed In-Reply-To: <012701c8390f$978270e0$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: <014a01c8395b$a91ebbf0$977aa8c0@M90> Any ideas out there? The ExecuteNonQuery complains that the connection is closed. If I break at that point (the catch) and do a lcnn.open it says the connection is open. Further it tells me the name of the server, the table name etc. Doesn't sound closed. 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 jwcolby Sent: Friday, December 07, 2007 3:28 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ssharkins at gmail.com Sat Dec 8 08:23:46 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Sat, 8 Dec 2007 09:23:46 -0500 Subject: [dba-VB] Connection closed References: <012701c8390f$978270e0$977aa8c0@M90> <014a01c8395b$a91ebbf0$977aa8c0@M90> Message-ID: <003201c839a6$359f0ef0$4b3a8343@SusanOne> John, this is just a wilda*s guess because I've seen this happen to me, but it may be the syntax you're using and you're just getting one of the less the helpful error messages. The interesting word is "available" -- my guess is that one of your parameters isn't the right type of something obscure like that, but I really am only guessing. Susan H. > Any ideas out there? The ExecuteNonQuery complains that the connection is > closed. If I break at that point (the catch) and do a lcnn.open it says > the > connection is open. Further it tells me the name of the server, the table > name etc. Doesn't sound closed. From jwcolby at colbyconsulting.com Sat Dec 8 09:45:57 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 8 Dec 2007 10:45:57 -0500 Subject: [dba-VB] Connection closed In-Reply-To: <003201c839a6$359f0ef0$4b3a8343@SusanOne> References: <012701c8390f$978270e0$977aa8c0@M90><014a01c8395b$a91ebbf0$977aa8c0@M90> <003201c839a6$359f0ef0$4b3a8343@SusanOne> Message-ID: <016401c839b1$6d4f7e60$977aa8c0@M90> Susan, Thanks for the reply. I don't have a clue and no time to screw around with it more. I was trying to use a stored procedure to migrate data from a "horizontal" to a "vertical" schema. In the end I just resorted to VB.Net. I have a class with a bunch of prewritten functions that allows me to just instantiate and call my class to do things including executing action queries directly out on SQL Server. It took me about 1/2 hour to just redo the whole process, replace the stored procedure with a new function in a form in VB.Net and voila, I am crunching away doing the conversion. At first it was whizzing through the fields of the horizontal table, throwing their data and field ID into the vertical table. It has slowed down now as the number of records in the vertical table has grown. I was reading just the other night about all the work SQL Server has to do to maintain a balanced tree and I think that is what I am seeing now. I have processed 18 fields from the horizontal table and pulled 142 million pieces of actual data out of those 18 fields. There are 584 fields to process in the horizontal table so this could take till next week to process. And then once the process is finished I have to build an index on the table. All in order to discover whether it will be faster to execute a given query using this vertical schema. It should be interesting. 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 Susan Harkins Sent: Saturday, December 08, 2007 9:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, this is just a wilda*s guess because I've seen this happen to me, but it may be the syntax you're using and you're just getting one of the less the helpful error messages. The interesting word is "available" -- my guess is that one of your parameters isn't the right type of something obscure like that, but I really am only guessing. Susan H. > Any ideas out there? The ExecuteNonQuery complains that the connection > is closed. If I break at that point (the catch) and do a lcnn.open it > says the connection is open. Further it tells me the name of the > server, the table name etc. Doesn't sound closed. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From joeget at vgernet.net Sun Dec 9 21:08:14 2007 From: joeget at vgernet.net (John Eget) Date: Sun, 9 Dec 2007 21:08:14 -0600 Subject: [dba-VB] Access 2003 to 2007 issue Message-ID: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> Anyone I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? From cfoust at infostatsystems.com Mon Dec 10 10:03:33 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:03:33 -0800 Subject: [dba-VB] Connection closed In-Reply-To: <012701c8390f$978270e0$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 10 10:06:02 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:06:02 -0800 Subject: [dba-VB] Access 2003 to 2007 issue In-Reply-To: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> References: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> Message-ID: Did you cross-post this? It really belongs in the AccessD list. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John Eget Sent: Sunday, December 09, 2007 7:08 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Access 2003 to 2007 issue Anyone I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 10:23:39 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 11:23:39 -0500 Subject: [dba-VB] Connection closed In-Reply-To: References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: <01f401c83b49$064c3c50$977aa8c0@M90> When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From cfoust at infostatsystems.com Mon Dec 10 10:28:01 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:28:01 -0800 Subject: [dba-VB] Connection closed In-Reply-To: <01f401c83b49$064c3c50$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> <01f401c83b49$064c3c50$977aa8c0@M90> Message-ID: I thought you were USING vb.net, John. I wondered why you were coding it that way. 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 8:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 10 11:11:09 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 12:11:09 -0500 Subject: [dba-VB] Connection closed In-Reply-To: References: <012701c8390f$978270e0$977aa8c0@M90><01f401c83b49$064c3c50$977aa8c0@M90> Message-ID: <01f501c83b4f$a93299e0$977aa8c0@M90> Well I keep getting advice to use stored procedures in SQL Server. That is what I was trying to do. I created a stored procedure that would take table / field names and dynamically construct and execute an append query. I got that working, but I could not iterate a table from TSQL so I was trying to run the SP from VB.Net. THAT is where I was getting the failure. In the end I had to get it finished so I just replaced the SP with the equivalent directly out in VB.Net and then executed an action query (in VB.Net). That action query was the equivalent of the stored procedure, but because it was constructed and executed in VB.Net code I could then call it from another VB.Net function. It all worked and I performed an entire deconstruction of a "wide" table into a set of "tall" tables. I was implementing a schema that Arthur recommended. 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 11:28 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed I thought you were USING vb.net, John. I wondered why you were coding it that way. 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 8:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 12:21:42 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 13:21:42 -0500 Subject: [dba-VB] Does anyone have Message-ID: <01f701c83b59$84432460$977aa8c0@M90> A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 10 13:19:40 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 14:19:40 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: <01f701c83b59$84432460$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: <01fb01c83b61$9d43ec80$977aa8c0@M90> And then of course I immediately stumbled on this: http://www.developer.com/net/vb/article.php/3558771 by Paul Kimmel. Everything I needed to at least get started. The Oh No second strikes again. 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 jwcolby Sent: Monday, December 10, 2007 1:22 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Does anyone have A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 10 13:32:12 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 11:32:12 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <01f701c83b59$84432460$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: 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 -----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 10:22 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Does anyone have A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 13:54:26 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 14:54:26 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: <01fd01c83b66$787f49d0$977aa8c0@M90> 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 From cfoust at infostatsystems.com Mon Dec 10 14:55:26 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 12:55:26 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <01fd01c83b66$787f49d0$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> <01fd01c83b66$787f49d0$977aa8c0@M90> Message-ID: 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 From R.Griffiths at bury.gov.uk Tue Dec 11 03:30:12 2007 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Dec 2007 09:30:12 -0000 Subject: [dba-VB] Does anyone have In-Reply-To: References: <01f701c83b59$84432460$977aa8c0@M90><01fd01c83b66$787f49d0$977aa8c0@M90> Message-ID: <200712110913.lBB9DlM01061@smarthost.yourcomms.net> 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 . ************************************************************* From Gustav at cactus.dk Tue Dec 11 03:43:43 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 10:43:43 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John (crossposted to AccessD because this brief chapter is excellent reading if you know nearly nothing about Visual Studio and wish a first-hand impression on how it "compares" to Access regarding creating forms). Did you read the sample chapter 4 from the link provided by Arthur for "Visual Basic 2005 Jumpstart (see below): www.oreilly.com/catalog/vbjumpstart/chapter/ch04.pdf The chapter covers exactly this. --- Hi Arthur All samples? It lists 470 on Visual Studio alone! Found the JumpStart code download and the book: http://examples.oreilly.com/vbjumpstart/ http://www.oreilly.com/catalog/vbjumpstart/ Thanks! /gustav --- >>> fuller.artful at gmail.com 27-04-2007 16:28 >>> Go to GotDotNet and download all the samples. Do it relatively quickly since MS has decided to phase out this site. Also go to Visual Studio Magazine and CodePlex. There is a very good intro book called VB.NET JumpStart (google vbJumpStart and you should get to the downloadable code). I found this book so good that I am currently thinking that .NET is even easier than Access. Arthur -- >>> jwcolby at colbyconsulting.com 10-12-2007 20:54 >>> 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 From max.wanadoo at gmail.com Tue Dec 11 04:09:02 2007 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 11 Dec 2007 10:09:02 -0000 Subject: [dba-VB] Remote closing of Front Ends In-Reply-To: Message-ID: <00bf01c83bdd$dba05c30$8119fea9@LTVM> Hi Guys, Can anybody point me to code where I can close down Front Ends remotely. I have seen this sort of code posted in the past but cannot find it. Situation: Running an overnight compact and repair on the BE, but falls over because it "thinks" that somebody still has the FE open and linked to it (in fact they don't, so I think there must still be a flag sitting somewhere). Thanks in advance. Max From joeget at vgernet.net Tue Dec 11 06:21:15 2007 From: joeget at vgernet.net (John Eget) Date: Tue, 11 Dec 2007 06:21:15 -0600 Subject: [dba-VB] Autolinking front end to back end application Message-ID: <004b01c83bf0$594011a0$4ec2f63f@gateway8529fab> Does anyone have a link to or code to autolink the front end to the backend when a splash screen is opened? I cannot figure out the issue below I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? From jwcolby at colbyconsulting.com Tue Dec 11 08:28:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 09:28:23 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: <200712110913.lBB9DlM01061@smarthost.yourcomms.net> References: <01f701c83b59$84432460$977aa8c0@M90><01fd01c83b66$787f49d0$977aa8c0@M90> <200712110913.lBB9DlM01061@smarthost.yourcomms.net> Message-ID: <023601c83c02$16769350$977aa8c0@M90> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From Gustav at cactus.dk Tue Dec 11 08:52:46 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 15:52:46 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From jwcolby at colbyconsulting.com Tue Dec 11 09:02:09 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 10:02:09 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <023a01c83c06$cdc15910$977aa8c0@M90> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From robert at webedb.com Tue Dec 11 09:06:23 2007 From: robert at webedb.com (Robert L. Stewart) Date: Tue, 11 Dec 2007 09:06:23 -0600 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <200712111508.lBBF83se028103@databaseadvisors.com> For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 From Gustav at cactus.dk Tue Dec 11 09:17:20 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 16:17:20 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From wdhindman at dejpolsystems.com Tue Dec 11 09:38:43 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 11 Dec 2007 10:38:43 -0500 Subject: [dba-VB] Does anyone have References: Message-ID: <001001c83c0b$e9e8bcf0$0c10a8c0@jisshowsbs.local> gustav ...sssshhhh ...whatever you do, don't mention jc and "obtuse" in the same line ...upsets him it does :) William ----- Original Message ----- From: "Gustav Brock" To: Sent: Tuesday, December 11, 2007 9:52 AM Subject: Re: [dba-VB] Does anyone have > Hi John > > I visited the site and got the same impression. > > This is, sadly, the case for most open-source sites - lots of info on > marginal latest revisions and nerded comments, but only an obtuse - or > completely lacking - overview for the first-time visitor. Often not even > system/software requirements are listed. > These people could really gain by learning some marketing: What is this, > what is the purpose, who is it aimed for, what skill is required, what > software is required, etc. It's a mess and a waste. > > /gustav > >>>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> > Richard, > > Thanks for the link. I have to say it is annoying when an author does > things in reverse order. I go to the site. Plastered all over is CSLA. > So > what is CSLA? There is a link, plainly labeled "what is CSLA". So I go > to > that link. There is an entire page starting with CSLA is a .... At the > VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. > > Sigh. > > But in the end I ordered the book, as well as an older book by the same > author apparently no longer in print. Let's hope he can help me! > > ;-) > > 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 Griffiths, > Richard > Sent: Tuesday, December 11, 2007 4:30 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Does anyone have > > 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 > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From Gustav at cactus.dk Tue Dec 11 09:45:40 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 16:45:40 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi William I know - it was his documentation, right - so I didn't! /gustav >>> wdhindman at dejpolsystems.com 11-12-2007 16:38 >>> gustav ...sssshhhh ...whatever you do, don't mention jc and "obtuse" in the same line ...upsets him it does :) William ----- Original Message ----- From: "Gustav Brock" To: Sent: Tuesday, December 11, 2007 9:52 AM Subject: Re: [dba-VB] Does anyone have > Hi John > > I visited the site and got the same impression. > > This is, sadly, the case for most open-source sites - lots of info on > marginal latest revisions and nerded comments, but only an obtuse - or > completely lacking - overview for the first-time visitor. Often not even > system/software requirements are listed. > These people could really gain by learning some marketing: What is this, > what is the purpose, who is it aimed for, what skill is required, what > software is required, etc. It's a mess and a waste. > > /gustav > >>>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> > Richard, > > Thanks for the link. I have to say it is annoying when an author does > things in reverse order. I go to the site. Plastered all over is CSLA. So > what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to > that link. There is an entire page starting with CSLA is a .... At the > VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. > > Sigh. > > But in the end I ordered the book, as well as an older book by the same > author apparently no longer in print. Let's hope he can help me! > > ;-) > > 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 Griffiths, > Richard > Sent: Tuesday, December 11, 2007 4:30 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Does anyone have > > 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 From R.Griffiths at bury.gov.uk Tue Dec 11 09:51:04 2007 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Dec 2007 15:51:04 -0000 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <200712111534.lBBFYZM20719@smarthost.yourcomms.net> Hi I'm not exactly sure what the target audience is, but everything is OO based and whilst under the hood of the framework is some advanced coding, app usage is I would say intermediate to advanced. Rocky is a programmer at heart and I guess sticks programming and not any peripherals. I'm sure he would answer you if you posted a question or looked around - there's plenty of info. I adopted this framework as what I started do myself in designing my own sort of framework seemed covered (plus much more) and to a hugely better standard by Rocky. Such things a validation - where to put business rules, authorisation, data access, n-level undo (never used this though), smartdates etc - he has put a lot of thought into this and come up with a v.good framework. The framework is supported by Codesmith, Code Complete and CSLAGen (codemsmith incorporated/customised specifically for CSLA.net) for code generation of the business classes. .Nettiers whilst v.good I believe is more data access and does not cover the issues cited above. Same as the MS Enterprise libraries - these compliment CSLA (and vice-versa) rather than compete. Rocky has excellent credentials, speaking at VS Live 2008 conferences along with Ken Getz etc and is also running a post conference workshop on his framework. My advice would be not to plough too deeply into the book(s) as this can get heavy going sometimes but along with the book(s) try out yourself - but as I say a learning curve is to be taken. One thing to consider is that if you decide not to utilise this framework you still have to resolve those issues such as validation, authorisation and so on yourself. HTH Richard -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 11 December 2007 14:53 To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ 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 . ************************************************************* From jwcolby at colbyconsulting.com Tue Dec 11 10:05:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:05:23 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <024401c83c0f$a3800030$977aa8c0@M90> Charlotte's is home built it seems. I have not really read anything from Shamil re a .net framework but it would not surprise me if he were using such a thing. I watched a 15 minute overview video of codesmith and ntiers and all I can say is WOW. OTOH it seems that it would be WOW if you were an experienced .NET developer. My first impression is that it would simply be overwhelming to me. Sadly there are no books you can buy to help you get started with Codesmith. 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 Gustav Brock Sent: Tuesday, December 11, 2007 10:17 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 10:17:33 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:17:33 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <200712111508.lBBF83se028103@databaseadvisors.com> References: <200712111508.lBBF83se028103@databaseadvisors.com> Message-ID: Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 From jwcolby at colbyconsulting.com Tue Dec 11 10:26:32 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:26:32 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: <200712111508.lBBF83se028103@databaseadvisors.com> Message-ID: <024a01c83c12$97df97b0$977aa8c0@M90> And that is precisely my main complaint. I watched the demo and codesmith generated SIX PROJECTS with tens of thousands of lines of code in HUNDREDS of modules. Now what do I do when something doesn't work? I didn't write the modules, nor the code. 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: Tuesday, December 11, 2007 11:18 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 10:28:36 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:28:36 -0800 Subject: [dba-VB] Frameworks Message-ID: Yes, we build what can be called a framework. We created a solution and added project for Configuration, Controls, Exceptions, Charts, Data, Data.OleDbProvider, Reports, ResourceData (xml data tables), UI and Security. Some of those were added as we developed the concept, but Configuration, Exceptions, Data, Reports, UI and Security we there from the start. Controls was added when we started customising third party controls or building our own. Using those allows us to maintain a consistent look throughout the applications and save the developer having to set countless properties over and over. Charlotte From cfoust at infostatsystems.com Tue Dec 11 10:37:06 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:37:06 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <024a01c83c12$97df97b0$977aa8c0@M90> References: <200712111508.lBBF83se028103@databaseadvisors.com> <024a01c83c12$97df97b0$977aa8c0@M90> Message-ID: It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:27 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have And that is precisely my main complaint. I watched the demo and codesmith generated SIX PROJECTS with tens of thousands of lines of code in HUNDREDS of modules. Now what do I do when something doesn't work? I didn't write the modules, nor the code. 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: Tuesday, December 11, 2007 11:18 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert From jwcolby at colbyconsulting.com Tue Dec 11 10:51:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:51:23 -0500 Subject: [dba-VB] Open a filtered form Message-ID: <024b01c83c16$10ae61f0$977aa8c0@M90> Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Tue Dec 11 11:07:52 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 12:07:52 -0500 Subject: [dba-VB] Codesmith trials and tribulations In-Reply-To: References: <200712111508.lBBF83se028103@databaseadvisors.com><024a01c83c12$97df97b0$977aa8c0@M90> Message-ID: <024c01c83c18$5e1d7690$977aa8c0@M90> Yea, yea, yea. And I actually do believe that. However think of this from my perspective. It is just me, sitting here in my office. I work to make money, if I don't do billable hours I do not get paid. No "salary", no employer who will pay me to come up to speed on how to do this. So I look at this and say WOW, if I could learn this I could make SO much more money because I could be so much more productive. And then I say WOW, there is no book, it will take me weeks to learn it, I don't have anyone else using it that I can pop into their cube and ask questions, and I have work to do so that Robbie and Allie can eat in January. BTW I spent 45 (non paid) minutes this morning JUST trying to download the thing. I had to get a user name in order to download it. I did that. Then it said it would take 15 minutes to set up the account (ever heard of computers guys?). Then I am poking around and tried a download. It wanted my email so I gave it. It said the email was in use. Uhhh... hmmm... MIGHT BE ME? Then I clicked "lost my password" because 15 minutes later no password had appeared in me email box. Then I get TWO emails, with TWO DIFFERENT (industrial strength, will resist the CIA) passwords, NEITHER OF WHICH work. In one place on the site it asks for my email and a password (neither of which works) and in another it asks for my USER NAME and password (neither of which works). And all of this to get a code generator to allow me to standardize my coding practices. HMMMMmmmmmmmm. Perhaps they need to use Codesmith? Or maybe the problem is that they DID use Codesmith? Scary to contemplate! So I replied to the email for the last password asking them to figure out what is wrong. 45 minutes wasted, and I haven't even managed to get in to see the documentation or download the trial software. 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: Tuesday, December 11, 2007 11:37 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte From cfoust at infostatsystems.com Tue Dec 11 12:16:57 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 10:16:57 -0800 Subject: [dba-VB] Open a filtered form In-Reply-To: <024b01c83c16$10ae61f0$977aa8c0@M90> References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 12:19:20 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 10:19:20 -0800 Subject: [dba-VB] Codesmith trials and tribulations In-Reply-To: <024c01c83c18$5e1d7690$977aa8c0@M90> References: <200712111508.lBBF83se028103@databaseadvisors.com><024a01c83c12$97df97b0$977aa8c0@M90> <024c01c83c18$5e1d7690$977aa8c0@M90> Message-ID: I have to admit that the developers don't use it, only our boss, who acts primarily as a project manager. The rest of us come along behind and fix the problems with it! LOL Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 9:08 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Codesmith trials and tribulations Yea, yea, yea. And I actually do believe that. However think of this from my perspective. It is just me, sitting here in my office. I work to make money, if I don't do billable hours I do not get paid. No "salary", no employer who will pay me to come up to speed on how to do this. So I look at this and say WOW, if I could learn this I could make SO much more money because I could be so much more productive. And then I say WOW, there is no book, it will take me weeks to learn it, I don't have anyone else using it that I can pop into their cube and ask questions, and I have work to do so that Robbie and Allie can eat in January. BTW I spent 45 (non paid) minutes this morning JUST trying to download the thing. I had to get a user name in order to download it. I did that. Then it said it would take 15 minutes to set up the account (ever heard of computers guys?). Then I am poking around and tried a download. It wanted my email so I gave it. It said the email was in use. Uhhh... hmmm... MIGHT BE ME? Then I clicked "lost my password" because 15 minutes later no password had appeared in me email box. Then I get TWO emails, with TWO DIFFERENT (industrial strength, will resist the CIA) passwords, NEITHER OF WHICH work. In one place on the site it asks for my email and a password (neither of which works) and in another it asks for my USER NAME and password (neither of which works). And all of this to get a code generator to allow me to standardize my coding practices. HMMMMmmmmmmmm. Perhaps they need to use Codesmith? Or maybe the problem is that they DID use Codesmith? Scary to contemplate! So I replied to the email for the last password asking them to figure out what is wrong. 45 minutes wasted, and I haven't even managed to get in to see the documentation or download the trial software. 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: Tuesday, December 11, 2007 11:37 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 11 12:25:15 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 11 Dec 2007 21:25:15 +0300 Subject: [dba-VB] Does anyone have In-Reply-To: Message-ID: <000001c83c23$2cf1b8a0$6401a8c0@nant> Hello Gustav, Yes, I do have my own home-made very light "framework", which I use to develop ASP.Net apps as well as other kinds of .NET Framework based apps... Most of the "plumbing" code and CRUD/lookup UDFs/SPs is generated from SPARX systems EA's meta data synchronized with MS SQL db and some simple manually prepared meta-data... Generator is "home made" also... It's all multi-tiered/layered, quite effective way of application development with hundreds (thousands?) of custom classes and zero ADO.NET datasets... I didn't want to get bounded to any frameworks as CodeSmith or NHibernate or similar tools provide - hence in parallel with custom coding I have written my own light framework which I will be throwing away by pieces with MS technologies progressing making my home-made "framework exercises" obsolete... I did get the main ideas of this light framework from Marco Bellinaso book on ASP.NET, and then I expanded these ideas in the direction I needed to solve custom tasks... I also used quite some of my past experience to organize and keep simple custom meta-data... I do plan to add some parts to this "framework" from MS Enterpise Library, which is freely available on MS site... Etc... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 11, 2007 6:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. John W. Colby Colby Consulting www.ColbyConsulting.com From robert at webedb.com Tue Dec 11 13:41:25 2007 From: robert at webedb.com (Robert L. Stewart) Date: Tue, 11 Dec 2007 13:41:25 -0600 Subject: [dba-VB] Codesmith Woes In-Reply-To: References: Message-ID: <200712111943.lBBJgvbs021321@databaseadvisors.com> Where can I send VS 2005 project so we can get John's head placed properly on his anatomy? I have a simple one for both Win forms and Web forms. That uses Codesmith with netTiers. Sorry, but you have to use both, my opinion, for Codesmith to be usable for data layer stuff. If you place code at the base level in the generated code, you will always have the problem of it replace it. There is a level above that you have to put code into. It is never, at least they say never, replaced. John, everything has a learning curve. You just need to study between midnight and 4 AM like I do to keep up with the changing technology. :-) At 12:00 PM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 08:37:06 -0800 >From: "Charlotte Foust" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >It's wonderful for quickly regenerating a data tier after schema >changes, but we had to tweak the template to make sure it didn't throw >away the business rules we had added to our data entity classes. It's >very handy for generating the typeddatasets and basic NUnit tests >though. > >Charlotte > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby >Sent: Tuesday, December 11, 2007 8:27 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >And that is precisely my main complaint. I watched the demo and >codesmith generated SIX PROJECTS with tens of thousands of lines of code >in HUNDREDS of modules. Now what do I do when something doesn't work? >I didn't write the modules, nor the code. > > >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: Tuesday, December 11, 2007 11:18 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >Maybe, but while we use CodeSmith, we hand program around it. If we >didn't understand the concepts and how to implement them without the >tools, that wouldn't be possible. > >Charlotte Foust > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. >Stewart >Sent: Tuesday, December 11, 2007 7:06 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >For a less steep learning curve, use CodeSmith Tools and .netTiers. Give >you a great data layer. Think of it as Access on steroids as far as the >DAO layer in it is concerned. > >Robert From jwcolby at colbyconsulting.com Tue Dec 11 13:56:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 14:56:23 -0500 Subject: [dba-VB] Codesmith Woes In-Reply-To: <200712111943.lBBJgvbs021321@databaseadvisors.com> References: <200712111943.lBBJgvbs021321@databaseadvisors.com> Message-ID: <025101c83c2f$e87880c0$977aa8c0@M90> You may send it directly to me, attached to an email. If it is large I can create an FTP user / password for you to upload it to my web site. I went back to Codesmith's web site and asked for a THIRD password and that one works. So I am now able to log in and download the docs and stuff. As for getting my head properly placed on my anatomy, better folks than you have tried and failed. ;-) And finally as for midnight to 4... at my age I am finding it difficult to do that any more. Besides which I am back up at 7 to get the kids ready for school, and by the time I am done with that I have clients calling... Oh well. 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 Robert L. Stewart Sent: Tuesday, December 11, 2007 2:41 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Codesmith Woes Where can I send VS 2005 project so we can get John's head placed properly on his anatomy? I have a simple one for both Win forms and Web forms. That uses Codesmith with netTiers. Sorry, but you have to use both, my opinion, for Codesmith to be usable for data layer stuff. If you place code at the base level in the generated code, you will always have the problem of it replace it. There is a level above that you have to put code into. It is never, at least they say never, replaced. John, everything has a learning curve. You just need to study between midnight and 4 AM like I do to keep up with the changing technology. :-) At 12:00 PM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 08:37:06 -0800 >From: "Charlotte Foust" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >It's wonderful for quickly regenerating a data tier after schema >changes, but we had to tweak the template to make sure it didn't throw >away the business rules we had added to our data entity classes. It's >very handy for generating the typeddatasets and basic NUnit tests >though. > >Charlotte > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby >Sent: Tuesday, December 11, 2007 8:27 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >And that is precisely my main complaint. I watched the demo and >codesmith generated SIX PROJECTS with tens of thousands of lines of >code in HUNDREDS of modules. Now what do I do when something doesn't work? >I didn't write the modules, nor the code. > > >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: Tuesday, December 11, 2007 11:18 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >Maybe, but while we use CodeSmith, we hand program around it. If we >didn't understand the concepts and how to implement them without the >tools, that wouldn't be possible. > >Charlotte Foust > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. >Stewart >Sent: Tuesday, December 11, 2007 7:06 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >For a less steep learning curve, use CodeSmith Tools and .netTiers. >Give you a great data layer. Think of it as Access on steroids as far >as the DAO layer in it is concerned. > >Robert _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 14:07:02 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 15:07:02 -0500 Subject: [dba-VB] Open a filtered form In-Reply-To: References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: <025201c83c31$6550fe50$977aa8c0@M90> OK, but do you understand ADO enough to do it without all of that stuff? Let me say that I am not an ADO kinda guy yet, and then let me show you what I am up against. Here is some actual "example code" for doing this stuff: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Creating connection and command sting Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb" Dim sqlStr As String = "SELECT * FROM Employees" ' Create connection object Dim conn As OleDbConnection = New OleDbConnection(conStr) ' Create data adapter object Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) ' Create a dataset object and fill with data using data adapter's Fill method Dim ds As DataSet = New DataSet da.Fill(ds, "Employees") ' Attach dataset's DefaultView to the datagrid control DataGrid1.DataSource = ds.DefaultViewManager End Sub Now let me ask some questions so that you can perhaps understand how I am confused... >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) Does this actually LOAD the data? Why pass in strSQL if not? >da.Fill(ds, "Employees") This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Intellisense says that I am providing "srcTable" which would indicate that I am asking the data adapter to go look for "Employees" in SQL Server and fill DS with that. If that is the case then why did we do a "SELECT * FROM EMPLOYEES" in the SqlStr? This example is just a mess, and I haven't really found examples where they discuss what is actually happening in any depth. 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: Tuesday, December 11, 2007 1:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From cfoust at infostatsystems.com Tue Dec 11 14:17:11 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 12:17:11 -0800 Subject: [dba-VB] Open a filtered form In-Reply-To: <025201c83c31$6550fe50$977aa8c0@M90> References: <024b01c83c16$10ae61f0$977aa8c0@M90> <025201c83c31$6550fe50$977aa8c0@M90> Message-ID: 1. > >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) >>Does this actually LOAD the data? Why pass in strSQL if not? No it creates a new instance of an OleDbDataAdapter and sets the SQL it will use and the connection, that's all. The dataadapter is the conduit for loading the data into a dataset. 2. >>>da.Fill(ds, "Employees") >>This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Right, this is where the dataSET is filled USING the dataadapter's fill method. Employees is the name of the table in the dataadapter, which usually translates to the name of a table in the database, but not necessarily. A dataadapter can contain multiple tables, so you need to indicate which one to use. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 12:07 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form OK, but do you understand ADO enough to do it without all of that stuff? Let me say that I am not an ADO kinda guy yet, and then let me show you what I am up against. Here is some actual "example code" for doing this stuff: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Creating connection and command sting Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb" Dim sqlStr As String = "SELECT * FROM Employees" ' Create connection object Dim conn As OleDbConnection = New OleDbConnection(conStr) ' Create data adapter object Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) ' Create a dataset object and fill with data using data adapter's Fill method Dim ds As DataSet = New DataSet da.Fill(ds, "Employees") ' Attach dataset's DefaultView to the datagrid control DataGrid1.DataSource = ds.DefaultViewManager End Sub Now let me ask some questions so that you can perhaps understand how I am confused... >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) Does this actually LOAD the data? Why pass in strSQL if not? >da.Fill(ds, "Employees") This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Intellisense says that I am providing "srcTable" which would indicate that I am asking the data adapter to go look for "Employees" in SQL Server and fill DS with that. If that is the case then why did we do a "SELECT * FROM EMPLOYEES" in the SqlStr? This example is just a mess, and I haven't really found examples where they discuss what is actually happening in any depth. 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: Tuesday, December 11, 2007 1:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 15:52:18 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 16:52:18 -0500 Subject: [dba-VB] So much for codesmith Message-ID: <000001c83c40$1ac7bbd0$977aa8c0@M90> I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com From dwaters at usinternet.com Tue Dec 11 16:02:23 2007 From: dwaters at usinternet.com (Dan Waters) Date: Tue, 11 Dec 2007 16:02:23 -0600 Subject: [dba-VB] So much for codesmith In-Reply-To: <000001c83c40$1ac7bbd0$977aa8c0@M90> References: <000001c83c40$1ac7bbd0$977aa8c0@M90> Message-ID: <002101c83c41$822c20d0$0300a8c0@danwaters> Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 11 16:07:59 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 12 Dec 2007 01:07:59 +0300 Subject: [dba-VB] So much for codesmith In-Reply-To: <000001c83c40$1ac7bbd0$977aa8c0@M90> Message-ID: <000301c83c42$4a8be790$6401a8c0@nant> Hello John, The following tools look promising but I must say I didn't try them: http://www.llblgen.com/defaultgeneric.aspx http://www.codeauthor.org/ http://www.latticesoft.com/DesktopDefault.aspx?showLogin=N Have a look also at this post telling why CodeSmith (which you've just removed from your system) could be the best choice if you're not going to write your own tool like that yet wanted to have as flexible as possible (custom(-isable)) templates based code generator: http://forums.asp.net/t/757009.aspx HTH... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 12, 2007 12:52 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 16:17:22 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 17:17:22 -0500 Subject: [dba-VB] So much for codesmith In-Reply-To: <002101c83c41$822c20d0$0300a8c0@danwaters> References: <000001c83c40$1ac7bbd0$977aa8c0@M90> <002101c83c41$822c20d0$0300a8c0@danwaters> Message-ID: <000001c83c43$9b6322e0$977aa8c0@M90> LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From michael at ddisolutions.com.au Tue Dec 11 16:48:48 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 12 Dec 2007 09:48:48 +1100 Subject: [dba-VB] So much for codesmith References: <000001c83c40$1ac7bbd0$977aa8c0@M90><002101c83c41$822c20d0$0300a8c0@danwaters> <000001c83c43$9b6322e0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> Hi John, Wow! What a PITA... I gotta say though that when I eval'd it about a year ago I didn't have any problems. The nag screen came up when the tool loaded, asked you to either register or continue trial, that was it! Your not running Vista are you? It's a shame because you would have liked the netTiers stuff. My annoyance threshhold is about the same as yours these days so I would have binned it as well ;-) cheers Michael M To: dwaters at usinternet.com; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 18:24:58 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 19:24:58 -0500 Subject: [dba-VB] So much for codesmith In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> References: <000001c83c40$1ac7bbd0$977aa8c0@M90><002101c83c41$822c20d0$0300a8c0@danwaters><000001c83c43$9b6322e0$977aa8c0@M90> <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> Message-ID: <000601c83c55$6e267540$977aa8c0@M90> You know there is a shareware version (older), there is a basic version ($99) and there is an advanced version. The basic might not do what I was seeing because it does not integrate into VS 2005 at all, it is just standalone. Perhaps the nag only happens like that from inside of VS 2005? I never tried it standalone. 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 Michael Maddison Sent: Tuesday, December 11, 2007 5:49 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Hi John, Wow! What a PITA... I gotta say though that when I eval'd it about a year ago I didn't have any problems. The nag screen came up when the tool loaded, asked you to either register or continue trial, that was it! Your not running Vista are you? It's a shame because you would have liked the netTiers stuff. My annoyance threshhold is about the same as yours these days so I would have binned it as well ;-) cheers Michael M To: dwaters at usinternet.com; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ 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 From michael at ddisolutions.com.au Tue Dec 11 19:51:23 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 12 Dec 2007 12:51:23 +1100 Subject: [dba-VB] Open a filtered form References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> Hi John, Is this what you are looking for? I've done the sample as a parent child and used the absolute minimum of code. (4 lines C#) 1. Create blank project 2. Use menu to add Dataset, call it Orders. Project --> Add Class select Dataset from available items. 3. In Server Explorer add a OLEDB connection to Northwind. 4. Drag the Customers, Orders and the Order Details tables onto Orders.xsd (Dataset). If you want read only data then you can right click on the OrdersTableAdapter, Configure, Advanced, untick Generate Insert...etc 5. Save. 6. Go to form1, add DataSet from Toolbox, select Typed dataset from dialog, you should see the Dataset you just created. OK 7. Add 3 text boxes and a combo box to the form1. 8. Add a BindingSource to the form, select Orders1 as the datasource, Orders as the DataMember. 9. Add a BindingNavigator, set the BindingSource to BindingSource1. 10 Bind each of the textboxes. Select the textbox, in the properties window open the DataBindings Node. Click advanced, Binding: select bindingSource1 - OrderID Do the same for the other textboxes, notice the formatting options. 11. Add another BindingSource to form1, DataSource = orders1, DataMember = Customers 12. Binding the Combo. *Different to textbox... >From Combo properties select DataSource - bindingSource2 Go to the code view, in the Form1_Load event add... comboBox1.DataSource = this.bindingSource2; comboBox1.DisplayMember = "CompanyName"; comboBox1.ValueMember = "CustomerID"; comboBox1.DataBindings.Add( "SelectedValue", this.bindingSource1, "CustomerID" ); This completes the parent part of the form. Run the app. Child records will be shown in the DataGridView. 1. Add DataGridView to form. 2. Properties, DataSource, Drill into bindingSource1 and select order details (ordersOrderDetailsBindingSource). Done! Run the app. cheers Michael M Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 21:56:51 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 22:56:51 -0500 Subject: [dba-VB] Open a filtered form In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> References: <024b01c83c16$10ae61f0$977aa8c0@M90> <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> Message-ID: <000b01c83c73$07581da0$977aa8c0@M90> Well it certainly sounds like it. 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 Michael Maddison Sent: Tuesday, December 11, 2007 8:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form Hi John, Is this what you are looking for? I've done the sample as a parent child and used the absolute minimum of code. (4 lines C#) 1. Create blank project 2. Use menu to add Dataset, call it Orders. Project --> Add Class select Dataset from available items. 3. In Server Explorer add a OLEDB connection to Northwind. 4. Drag the Customers, Orders and the Order Details tables onto Orders.xsd (Dataset). If you want read only data then you can right click on the OrdersTableAdapter, Configure, Advanced, untick Generate Insert...etc 5. Save. 6. Go to form1, add DataSet from Toolbox, select Typed dataset from dialog, you should see the Dataset you just created. OK 7. Add 3 text boxes and a combo box to the form1. 8. Add a BindingSource to the form, select Orders1 as the datasource, Orders as the DataMember. 9. Add a BindingNavigator, set the BindingSource to BindingSource1. 10 Bind each of the textboxes. Select the textbox, in the properties window open the DataBindings Node. Click advanced, Binding: select bindingSource1 - OrderID Do the same for the other textboxes, notice the formatting options. 11. Add another BindingSource to form1, DataSource = orders1, DataMember = Customers 12. Binding the Combo. *Different to textbox... >From Combo properties select DataSource - bindingSource2 Go to the code view, in the Form1_Load event add... comboBox1.DataSource = this.bindingSource2; comboBox1.DisplayMember = "CompanyName"; comboBox1.ValueMember = "CustomerID"; comboBox1.DataBindings.Add( "SelectedValue", this.bindingSource1, "CustomerID" ); This completes the parent part of the form. Run the app. Child records will be shown in the DataGridView. 1. Add DataGridView to form. 2. Properties, DataSource, Drill into bindingSource1 and select order details (ordersOrderDetailsBindingSource). Done! Run the app. cheers Michael M Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From michael at ddisolutions.com.au Thu Dec 13 00:33:17 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 13 Dec 2007 17:33:17 +1100 Subject: [dba-VB] C# ArcObjects? References: <024b01c83c16$10ae61f0$977aa8c0@M90><59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> <000b01c83c73$07581da0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1F5@ddi-01.DDI.local> Anyone worked with this stuff willing to give a point in the right direction? I need to join a external standalone datatable (Access qry) to a featureclass and export the result to a shape file. O yeah, must use the runtime engine only :-/ cheers Michael M From robert at webedb.com Thu Dec 13 12:30:33 2007 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 13 Dec 2007 12:30:33 -0600 Subject: [dba-VB] C# ArcObjects? In-Reply-To: References: Message-ID: <200712131833.lBDIX4jn018207@databaseadvisors.com> I tried using them at one point and gave up. I use thinkgeo.com's Windows forms objects instead. There is more to creating the shape file than just exporting a query to one. At 12:00 PM 12/13/2007, you wrote: >Date: Thu, 13 Dec 2007 17:33:17 +1100 >From: "Michael Maddison" >Subject: [dba-VB] C# ArcObjects? >To: >Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1F5 at ddi-01.DDI.local> >Content-Type: text/plain; charset="us-ascii" > >Anyone worked with this stuff willing to give a point in the right >direction? >I need to join a external standalone datatable (Access qry) to a >featureclass and export the result to a shape file. >O yeah, must use the runtime engine only :-/ > >cheers > >Michael M > > > >------------------------------ > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb > > >End of dba-VB Digest, Vol 50, Issue 16 >************************************** From jwcolby at colbyconsulting.com Thu Dec 13 22:48:35 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 13 Dec 2007 23:48:35 -0500 Subject: [dba-VB] Expert VB 2005 Business Objects; Lhotka - was RE: [AccessD] Access or SQL Server Express to web In-Reply-To: <001201c83e0a$80401ea0$ef706c4c@jisshowsbs.local> References: <000301c83dcc$d8155ac0$6401a8c0@nant> <001201c83e0a$80401ea0$ef706c4c@jisshowsbs.local> Message-ID: <001401c83e0c$965c4c20$977aa8c0@M90> I have to say I like this book. This is the book that explains the CSLA framework. It is READABLE, it goes into just enough depth to explain the topic at hand, it explains the pros and cons of different strategies and why he chooses the strategies he chooses. Really quite a nice read for someone at my level to be able to start getting a handle on N tier, business objects, DALs and all that. Fascinating stuff on top of all that. He discusses business objects being passed between machines, and being able to modify the implementation using config files so that you can move the layers onto dedicated machines if necessary! Pretty cool stuff. I had always heard about this stuff but had no idea how they did that. Still don't, but at least I am grasping the concepts now. Recommended. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Thursday, December 13, 2007 11:34 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access or SQL Server Express to web ...I know this will get your goat but we've had over 150 users in mdb sourced pages simultaneously without a hick-up so far ...I'm in the process of moving to SQL Server because the load will get much larger in the next few months but so far, Drew has been right, Access mdbs can take a lot of abuse on the web ...of course I'll freely admit that its read only and I cache the hell out of it ...but still :) ...the web based apps all are hosted on shared win2K3 boxes w plenty of ram and dedicated app spaces. ...the largest intranet based app never has more than ten users in it and the average is probably less than five ...the servers are all Dell PE's w/ 2GB ram and large Raid5 HDs running SBS2003 Premium R2 ...pretty vanilla but I like vanilla in servers :) ...like I said, I cater to small business owners and tend to keep it simple ...something an ignorant lout like me can stay on top of :) ...btw, the MS ajax built into 3.5 works really well compared to that added on to 2.0 ...its a very noticeable difference imnsho, especially in the gridview ...the MS sponsored open-source 3.5 ajax controls toolkit version on the other hand, still has some performance problems with some of the controls ...two steps forward, one step back. William From jwcolby at colbyconsulting.com Sat Dec 15 08:55:54 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 15 Dec 2007 09:55:54 -0500 Subject: [dba-VB] Projects and solutions Message-ID: <004d01c83f2a$983b2b50$977aa8c0@M90> I am writing this set of applications that allow me to import and export data form SQL Server. My needs are somewhat complex in that I tend to need to import directories full of files, which could be CSV or flat files. All of the files need to import into the same table, or a single table needs to be exported into many files, going out to a single directory. Again, flat file or CSV. I also need to do this repetitively, i.e. I get disks every week that need to be imported into the same table, or I need to export the same table every couple of weeks. Thus I am have built a set of four fairly simple projects. Each has a similar structure, tables that define the import or export with information such as the source or target table, the source or target directory, the max file size if an export, the chunk size to import (for timing issues) on import, log files and tables to log the progress etc. So I built these four applications, and I now need to tie them together so that I can have a single control panel to start the applications, or to edit the tables that define an import or export job. My question is, should I pull all four of these into a single project or should I leave them out in their respective projects and just run them in place? If I should leave them as separate projects, what are the mechanics behind tying them into a solution? John W. Colby Colby Consulting www.ColbyConsulting.com From shamil at users.mns.ru Sat Dec 15 14:30:16 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Sat, 15 Dec 2007 23:30:16 +0300 Subject: [dba-VB] Projects and solutions In-Reply-To: <004d01c83f2a$983b2b50$977aa8c0@M90> Message-ID: <000001c83f59$4d835130$6401a8c0@nant> John, I'd put your four projects into four classlib projects and create another (FE dispatch) project and keep all of them within one solution... You can also have dedicated thread for every of the four projects/classlibs when you call them from FE project - that could make overall elapsed time to run all four of them (considerably) less if that is needed/possible at all to run all four of them in parallel... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 15, 2007 5:56 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Projects and solutions I am writing this set of applications that allow me to import and export data form SQL Server. My needs are somewhat complex in that I tend to need to import directories full of files, which could be CSV or flat files. All of the files need to import into the same table, or a single table needs to be exported into many files, going out to a single directory. Again, flat file or CSV. I also need to do this repetitively, i.e. I get disks every week that need to be imported into the same table, or I need to export the same table every couple of weeks. Thus I am have built a set of four fairly simple projects. Each has a similar structure, tables that define the import or export with information such as the source or target table, the source or target directory, the max file size if an export, the chunk size to import (for timing issues) on import, log files and tables to log the progress etc. So I built these four applications, and I now need to tie them together so that I can have a single control panel to start the applications, or to edit the tables that define an import or export job. My question is, should I pull all four of these into a single project or should I leave them out in their respective projects and just run them in place? If I should leave them as separate projects, what are the mechanics behind tying them into a solution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Mon Dec 17 15:41:00 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 00:41:00 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: <001401c840f5$843fd480$6401a8c0@nant> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn?t allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From wdhindman at dejpolsystems.com Tue Dec 18 02:13:10 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 18 Dec 2007 03:13:10 -0500 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <002801c8414d$d4c8dd40$ef706c4c@jisshowsbs.local> ...if you control the server then you can install the MS limitlogin script to manage this. ...if you have to do it from asp.net I'd think setting the session username to null and then calling session abandon on logout would kill the current session data so a second login with the same username would be moot ...or not :) ...haven't had a need to do anything like this so I'm not sure what you're looking for here. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Tue Dec 18 02:23:39 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 18 Dec 2007 03:23:39 -0500 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 03:02:57 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 10:02:57 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From shamil at users.mns.ru Tue Dec 18 03:03:18 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 12:03:18 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when thisloginis in use in active session? In-Reply-To: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> Message-ID: <000001c84154$d5601000$6401a8c0@nant> Yes, William, the article you refer is the closest to what I'm hunting for... (BTW, what Google(?) search criteria did you use to find it - I missed it when looking for such information in Google) Yes, this is the closest to what I'm looking for but still it isn't what I need I think (but it looks like there is no other more close solution)... In fact I planned to implement something like proposed by this article but still at least one(?) problem exists with this solution: - if a user will close the browser and then immediately will try to login using the same FormsAuthentication credentials then he will be "kicked-out" every time until Cache object simulating Session_End expires... That's not a big issue(?) - a user will have to wait between 15 and 30 minutes to login again - usual session time-out... But I anticipate "angry users" calls if that solution implemented... I can try to use an IP of a user trying to login and compare it with IP stored with the info on cached login, which isn't yet expired - and if it's not then I can use SetAuthCookie (using session cookie stored in my session object to "catch" live session) but then here is another "use case": user has a couple of PCs on his desktop, he closes browser on one of them and thus leave his session active on server side until time out happens, and then this user tries to login using the same credentials from another PC but he will be "kicked out" because there is no expired session information simulated in custom Cache object, which will be there until this Cache object expires... Sorry for such a "hectic" e-mail but it looks like (and the article you referred approves(?) that) - it looks like this simple(?) issue doesn't have a satisfactory solution covering all of/most of the possible use cases... Going circles here... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Tuesday, December 18, 2007 11:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when thisloginis in use in active session? http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 04:30:25 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 13:30:25 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how topreven using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <000301c84161$0078f7a0$6401a8c0@nant> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 05:10:09 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 12:10:09 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil > Am I missing simple solution of the subject issue? Or maybe I am ...? The difference is that I have only made some careful thoughts about this for an upcoming application, while you are actively dealing with real code and test. In the scenario you describe, which is very likely to happen, at the second login the user would need to make a choice. If he choses to keep the new session, your app kills the first. At the third login, if he choses to keep that, the second session (and the first if still alive) would be killed by the app. On the other hand, if he cancels new a login, the previous session will not be affected while the new session will be killed (message: Login cancelled, session closed). Of course, the browser windows will not close, but if he tries to operate the first or second session, a page will be displayed telling that the session has been closed. If this is not possible, please tell. /gustav >>> shamil at users.mns.ru 18-12-2007 11:30 >>> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From Gustav at cactus.dk Tue Dec 18 05:48:04 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 12:48:04 +0100 Subject: [dba-VB] How to download full (admin) .Net 3.0 SP1 Message-ID: Hi all Had a struggle to find this out: http://go.microsoft.com/fwlink/?LinkId=98105 That was shown here: http://blogs.msdn.com/aaronru/archive/2007/12/13/creating-net-framework-3-0-sp1-redist.aspx The official page only carries the small download bootstrapper. The full package is 25.6 MB. /gustav From accessd at shaw.ca Tue Dec 18 08:29:34 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:29:34 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <001401c840f5$843fd480$6401a8c0@nant> References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <9D3F9F3ECCFD42ABAB2DD7A8D1A94195@creativesystemdesigns.com> Hi Shamil: The login limitations are set at the server end. Everything from who can login, when they can login, how long they can login for, what can be accessed when login is obtained, the level of password complexity and even if they can login in more than once. This is all set at the Server login using roles, groups and policies. The user can be confronted at the splash or landing page to login and from the login the user ability is controlled from the server. That is the server's role and not the responsibility of the presentation section of the application whether desktop of browser. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Monday, December 17, 2007 1:41 PM To: 'Access-D - VB' Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 08:39:15 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:39:15 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when this loginis in use in active session? In-Reply-To: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> References: <001401c840f5$843fd480$6401a8c0@nant> <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> Message-ID: <97764B4BA3C04701A0BA325C688FB2A0@creativesystemdesigns.com> The link is a great piece and example of code, William. The one comment I make about the code sample is that a large professional site should never use 'sa' login style; they should use user groups or windows authentication instead. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Tuesday, December 18, 2007 12:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when this loginis in use in active session? http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From accessd at shaw.ca Tue Dec 18 08:57:47 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:57:47 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: References: Message-ID: The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 08:58:45 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 15:58:45 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Jim So how would you approach this? /gustav >>> accessd at shaw.ca 18-12-2007 15:57 >>> The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From shamil at users.mns.ru Tue Dec 18 09:52:05 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 18:52:05 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: Message-ID: <004201c8418d$f1d15080$6401a8c0@nant> Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 09:52:05 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 18:52:05 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <004101c8418d$f17dd950$6401a8c0@nant> Hello Gustav, The subject issue sounds simple but it looks like it doesn't have a "perfect" solution: there are so many issues involved here starting from usability, scalability, stateless/stateful apps, current context,....., and ending in application access roles, membership and security - there are so many that issues that we can discuss them here endlessly - my Internet search from yesterday evening and this day gave me many sometimes contradictory "hints" that I must say I should abandon all of them and just use "common sense" here: agree with customer what way to solve the subject issue suites my customer best of all and just implement it: - we currently agreed it's not a problem for a user to wait for 15-30 minutes for an abandoned session to expire, and for testing purposes I will have "killing" functionality implemented - later on when all the other custom functionality will be ready I will try to find out is it possible to release this "killing sessions" functionality for user mode system access - if that will not look hazardous to the system consistency then I will adjust and release this "session killing" functionality... (the apps under development does have a part talking to the external Credit Card processing provider/server - and this is two/three steps process which should be better not interrupted at least when external server talks back to our app which should process this answer in one go: yes, I can program it that way but better later than now because as usual time frame to finish development and release the first public version is very strict... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 2:10 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil > Am I missing simple solution of the subject issue? Or maybe I am ...? The difference is that I have only made some careful thoughts about this for an upcoming application, while you are actively dealing with real code and test. In the scenario you describe, which is very likely to happen, at the second login the user would need to make a choice. If he choses to keep the new session, your app kills the first. At the third login, if he choses to keep that, the second session (and the first if still alive) would be killed by the app. On the other hand, if he cancels new a login, the previous session will not be affected while the new session will be killed (message: Login cancelled, session closed). Of course, the browser windows will not close, but if he tries to operate the first or second session, a page will be displayed telling that the session has been closed. If this is not possible, please tell. /gustav >>> shamil at users.mns.ru 18-12-2007 11:30 >>> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 10:20:54 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 17:20:54 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time fr Message-ID: Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... From shamil at users.mns.ru Tue Dec 18 11:02:13 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 20:02:13 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr In-Reply-To: Message-ID: <004601c84197$bcb932a0$6401a8c0@nant> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 11:27:12 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 18:27:12 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil Oh, that is a nightmare. I just opened three tabs (it's me at 213.150.48.58) and the only parameter changing is Page View Count. And that counts up also if the user requests a refresh of the browser window! And it counts down as the sessions time out. Not very useful. So now what? Could a client side GUID be generated that was recorded at server side? Sadly, I have little time to work intensively with this right now - a web session on the new MySQL Falcon engine is approaching - but count me in if you need further testing - it would be really nice to find out how to deal with this issue which will pop up again and again. /gustav >>> shamil at users.mns.ru 18-12-2007 18:02 >>> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... From accessd at shaw.ca Tue Dec 18 13:31:16 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 11:31:16 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: References: Message-ID: <1A5EB2DC14054A6CBC3C398270F7597B@creativesystemdesigns.com> Hi Gustav: I think someone should either be stopped at the login or allowed to on. By setting the policies on a group of users, through the Group Policy Management Console (GPMC), added/attaching the group to the SQL Server > Security > Logins section. Within GPMC the login ability of a group can set to only one active session at a time. In effect the MS SQL server is managing rights of the user. (I have not checked to see whether this ability is extended to SQL Server Express but I am almost positive it is...) Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 6:59 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Jim So how would you approach this? /gustav >>> accessd at shaw.ca 18-12-2007 15:57 >>> The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 13:51:18 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 11:51:18 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <004201c8418d$f1d15080$6401a8c0@nant> References: <004201c8418d$f1d15080$6401a8c0@nant> Message-ID: <15EBF9201DFA4F2E823608B7104BF6B4@creativesystemdesigns.com> Hi Shamil: Looks like a good plan. If the web server is either IIS there is a default web site inactivity session timeout of between 120 and 200 seconds. That can be set to any value, like 10 minutes or 600 seconds when the "Ebable HTTP Keep-Alives" turned off (un-checked). So if there is no activity for an extended period of time the connection and session is closed. There are a number of other settings that can be set on the IIS to control duration; See: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3 1a2f39c-4d59-4cba-905c-60e7af657e49.mspx?mfr=true for details. If you tune up IIS for your application/web site that should handle most events. Do you have access to the BE server? Is this what you are looking for? Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 7:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 14:06:10 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 12:06:10 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr In-Reply-To: <004601c84197$bcb932a0$6401a8c0@nant> References: <004601c84197$bcb932a0$6401a8c0@nant> Message-ID: <0B14524FF51E40968C9C3895FB534E2B@creativesystemdesigns.com> That is a good article... Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 9:02 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <000401c841d8$ea5f88d0$6401a8c0@nant> Hi Gustav, It looks like I have found a rather generic solution - here it's: Requirements: ------------- Allow ===== - to have multiple tabs opened for a browser instance for a logged-in user: all tabs will share the same login and Session id (this login/sessionId sharing is a feature by design of browsers, ASP.NET, forms authentication, custom functionality) - a session of an abandoned browser to expire in 15-30 minutes and then another session can be started with the same login or - "optionally kill" active login's session - first informing the user trying to use login, which is currently used in an active session that his attempt will "kill" active session, which he probably abandoned (by mistake) without explicit logout ... Prevent ======= - to use the same login with another instance of a browser running on the same PC; - to use the same login on another PC, while this login is active (logged-in) somewhere else; - running (loading, rendering web page) by copying & pasting URL from one tab's window to another tab within one browser instance or to another browser instance... To implement above requirements I plan to: ------------------------------------------ Before navigating to a URL with my Web App: =========================================== - prepare context parameters to put them in the URL's QueryString to keep initial rendering state/context for a Web Page to be navigated/transferred; - generate a unique hash for the QueryString using the following values: 1) Login name; 2) login timestamp - created on login and stored in Cache using login name as a key; 3) The session navigation step Id (navid) - unique sequential number incremented for every Redirect/Transfer and kept on the Session level; 4) SessionId (the fact is that Sessionid can be the same for logins/logouts for the same/other logins when these logins are happening in one browser instance...) This hash will be added to the QueryString together with navId; - make an URL with parameters and navigate/transfer to it; On page loading/building on server side I will: =============================================== - use generated hash to create Session[...] item key on page's first load within given context (!Page.IsPostback); - if the same query string will be used (copy & paste) on another *tab of the same browser instance* then I can check that this hash was already used (by reading Session[...] item) when rendering the first page and I will cancel rendering of the second's tab page.... - if the same query string will be used (copy & paste) on another *instance* of a browser then by recreating hash I will see that it will not fit the SessionId and I will cancel rendering page on the second browser instance... - IOW this hash will be a good measure to prevent compromising the QueryString values... - the Session[....] hash value has to be cleared out/saved in db when navigating to another URL, that will not always be possible, but that should be rare occasions and therefore I expect there will be not be that much "hanging abandoned hashes"... Additionally ============ - to prevent copied & pasted URL with QueryString parameters to be used within the same browser instance when first page is navigated out I can keep hash saved in the db table and this table's data used for the check described above. This table's data will be cleared when session ends/expires or this data can be used as a navigation audit trail... Summary ====== It looks like I covered all the possible variations - still the above solution is rather simple to implement and it's scalable... Currently I will just use QueryString to keep navigation context: QueryString is known as being an insecure for compromising attempts but because of the fact that I plan to add a hash to this QueryString in (the near) future I will keep it secure: and the hash calculation/check will be done in the generic part of my code as well as mentioned above navId caluclation, as well as keeping session login timeStamp in Cache[...], as well as keeping page rendering hash in Session[...], as well as clearing Session[...] hash/saving it in DB when navigating out or when session gets expired... Final note: =========== Originally I planned to stop using QueryString because it's commonly accepted as insecure but the solution above allows me (?) to continue using it (QueryString) without that much additional efforts and having it good enough secured (I have a Web app under development, which has different user contexts depending on roles and these contexts' can be dynamically changed without logging-out/-in, and users are rather inexperienced, and this application have to communicate with external credit card processing server, and this application should have easy navigation, and this application should place consistent orders, which are generated from shopping cart(s)' items, which in turn are collected in different contexts in which e.g. a user can be an admin making an order for a customer who in turn purchases a service for another customer who should be able to see this to be purchased service as owned by his account when purchase completes but the first customer should have this service paid from his accountetc... Because of this relative complexity of the app I looked for a solution, which is presented above, which isn't contradictory (?) and which is not that a big issue to implement generic way.... Being here now I will probably even weaken the requirement stating to not let an URL with QueryString parameters to be copied & pasted and activated (corresponding page loaded/rendered) within tabs of one browser instance: I will let to do that except just one case when application redirects to an external credit cards processing service - this service should be redirected only once within check-out process and until it calls back transaction is not finished... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 8:27 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil Oh, that is a nightmare. I just opened three tabs (it's me at 213.150.48.58) and the only parameter changing is Page View Count. And that counts up also if the user requests a refresh of the browser window! And it counts down as the sessions time out. Not very useful. So now what? Could a client side GUID be generated that was recorded at server side? Sadly, I have little time to work intensively with this right now - a web session on the new MySQL Falcon engine is approaching - but count me in if you need further testing - it would be really nice to find out how to deal with this issue which will pop up again and again. /gustav >>> shamil at users.mns.ru 18-12-2007 18:02 >>> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr In-Reply-To: <0B14524FF51E40968C9C3895FB534E2B@creativesystemdesigns.com> Message-ID: <000b01c841d8$eb90b5d0$6401a8c0@nant> Yes, I agree, the author - Faisal Khan - wrote really good article and made a very useful and well running sample for it. Here I found another interesting article by the same author: http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 11:06 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr That is a good article... Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 9:02 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <15EBF9201DFA4F2E823608B7104BF6B4@creativesystemdesigns.com> Message-ID: <001201c841d8$ec163980$6401a8c0@nant> Hi Jim, I need to find a solution independent on the fact do I have available dedicated Windows/IIS/ASP.NET server or my/my customers' web app run on a hosted windows/asp.net server, which could not have available for me options to fine tune IIS attributes/properties... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 10:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil: Looks like a good plan. If the web server is either IIS there is a default web site inactivity session timeout of between 120 and 200 seconds. That can be set to any value, like 10 minutes or 600 seconds when the "Ebable HTTP Keep-Alives" turned off (un-checked). So if there is no activity for an extended period of time the connection and session is closed. There are a number of other settings that can be set on the IIS to control duration; See: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3 1a2f39c-4d59-4cba-905c-60e7af657e49.mspx?mfr=true for details. If you tune up IIS for your application/web site that should handle most events. Do you have access to the BE server? Is this what you are looking for? Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 7:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 _______________________________________________ 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 From Gustav at cactus.dk Wed Dec 19 05:21:01 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 19 Dec 2007 12:21:01 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Message-ID: Hi Shamil Thanks for that link - looks extremely On Topic, and for your comprehensive thoughts in the other mail. I'll have to study them carefully at some later after-office hours ... /gustav >>> shamil at users.mns.ru 19-12-2007 01:48 >>> Yes, I agree, the author - Faisal Khan - wrote really good article and made a very useful and well running sample for it. Here I found another interesting article by the same author: http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 -- Shamil From wdhindman at dejpolsystems.com Wed Dec 19 11:07:45 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 19 Dec 2007 12:07:45 -0500 Subject: [dba-VB] ASP.NEt 2.0: FormsAuthentication:how to prevent usingthe same login *second* time fr References: <000b01c841d8$eb90b5d0$6401a8c0@nant> Message-ID: <001601c84261$ad4b3ff0$ef706c4c@jisshowsbs.local> ...that's a very useful resource site ...tks William ----- Original Message ----- From: "Shamil Salakhetdinov" To: Sent: Tuesday, December 18, 2007 7:48 PM Subject: Re: [dba-VB] ASP.NEt 2.0: FormsAuthentication:how to prevent usingthe same login *second* time fr > Yes, I agree, the author - Faisal Khan - wrote really good article and > made > a very useful and well running sample for it. > > Here I found another interesting article by the same author: > http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 > > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Tuesday, December 18, 2007 11:06 PM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > usingthe same login *second* time fr > > That is a good article... Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil > Salakhetdinov > Sent: Tuesday, December 18, 2007 9:02 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > usingthe same login *second* time fr > > Hi Gustav, > > OK, killing session when simultaneous FormsAutentication login with the > same > credentials happens or wait 20 minutes this is one "programmers' > nightmare" > issue, and here is another one: > > - in IE7 (or FireFox 2.x +) you can open several tabs in one browser > instance and then all these tabs' windows will share the same session... > > How about that "nightmare"? > > I have got deployed here > > http://shamils-4.hosting.parking.ru/Sessions > > a sample from this article > > http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 > > > by setting session time-out for three minutes > > mode="InProc" > cookieless="AutoDetect" > timeout="3" /> > > just for testing purposes to see how sessions expire and how one browser's > instance tabs share the same session ID... > > Now imagine a Web app having context (i.e. some internal state) and a user > opening several tabs in one browser instance and copying and pasting URL > "to > see what happens" or to maybe do several tasks with the same Web app > having > issues the *same* session Ids for one login, which could be working on one > task when this user switches and prepares another. When > FormsAuthentication > added then user *will not* need to login again if he copy and paste URLs > in > windows of the different tabs of the same browser instance... > > Server side app will not be aware how many windows are opened on client > side > without special measures... > > What those measures should be to differentiate calls coming from different > windows having the same URL, same session Id, same Forms Authentication > cookie? > > I currently see the only "simple" solution to have hidden HTML field(s) > with > some IDs for every page returned from server to browser, and when browser > posts back such page then this ID expires and is changed to another, and > server side app has to keep track of these custom IDs, and when they are > sent via callback remove them etc. > > ... > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, December 18, 2007 7:21 PM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > using > the same login *second* time fr > > Hi Shamil > > That was my thoughts and conclusion. > And it does have that complication. However, at _any_ time the user can > "pull the plug" - in many ways with or without intention. I think that's > the > programmer's nightmare all the time to consider "what happens at this > point > if the user session is killed?". The user may loose data typed in, but the > app should not crash and stored data should not get corrupted. > > Further, you cannot educate users to always logout clicking a button. As > the > good guy I am I always try to do so, but in Hotmail you are redirected to > msn.com which I hate, thus I always close a Hotmail session by clicking > the > close button of the window, and most users will do as well as they forget > or > don't understand why not to do so. > > Also, your client must be really nice and patient! Keeping a user logged > out > for about 20 minutes if something happens will not raise popularity among > users. Again, users are impatient and will not understand why they can not > just log in again. > > /gustav > >>>> shamil at users.mns.ru 18-12-2007 16:52 >>> > > > > ...the most user-friendly looks like to "kill" existing session when a > login > with the same FormsAuthentication credentials happens - this should be a > rare occasion after all and this will not force users to wait until > session > time-out expires... > > ...the only complication for the latter approach is that Web application > keeping some state information should be ready to be "killed" any time - I > mean when they get "killed" they shouldn't leave the system and back-end > database in inconsistent state - the "killer: should be able to "catch-on" > on the session it "kills"... > > ...yes, I know web applications should be better programmed completely > stateless - trying to achieve that here but not yet there - have to > convince > customer to change the ways they usually work with desktop apps - I mean > to > not expect the same "stateful" behavior from Web apps because "it's all > two > blades sword" - you gain in one feature/functionality/usability issue - > you > loose in another... > > > > > _______________________________________________ > 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 > > _______________________________________________ > 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 > From newsgrps at dalyn.co.nz Thu Dec 20 20:27:15 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 15:27:15 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <200712071829.lB7ISxDd021422@databaseadvisors.com> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> Message-ID: <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Group, I couldn't work out how this could be done so I am trying the group again. I am using VB.net in Visual Studio 2005. This is a web application. I have code that gets the path and name of a pdf file located on a server. What I want to do within the code is have a file download box open which gives the user an option of opening or saving the PDF file. The Process class doesn't deem to help because it tries to open the file on the web server (and not the user's). My.Computer.Network.DownloadFile Method seems to require a destination path and filename, but I don't want it to automatically be saved. Regards David Emerson Dalyn Software Ltd Wellington, New Zealand From michael at ddisolutions.com.au Thu Dec 20 20:42:31 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 21 Dec 2007 13:42:31 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> Hi David, I guess the links I sent you didn't do the job then... How about 2 links on the page, 1 to the pdf that will open it in the browser. The other to a zip of the pdf that can be downloaded. Too simple? ;-) cheers Michael M -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Friday, 21 December 2007 1:27 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Group, I couldn't work out how this could be done so I am trying the group again. I am using VB.net in Visual Studio 2005. This is a web application. I have code that gets the path and name of a pdf file located on a server. What I want to do within the code is have a file download box open which gives the user an option of opening or saving the PDF file. The Process class doesn't deem to help because it tries to open the file on the web server (and not the user's). My.Computer.Network.DownloadFile Method seems to require a destination path and filename, but I don't want it to automatically be saved. Regards David Emerson Dalyn Software Ltd Wellington, New Zealand _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 20 20:56:52 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 15:56:52 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> Message-ID: <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Michael, I looked at the two links. The first got me in the right direction but didn't provide a direct solution. The second one was an addon for Firefox which most of the users don't have. However, I have found a couple of links that might solve the problem: http://www.west-wind.com/WebLog/posts/76293.aspx http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_Dialog David At 21/12/2007, you wrote: >Hi David, > >I guess the links I sent you didn't do the job then... > >How about 2 links on the page, 1 to the pdf that will open it in the >browser. >The other to a zip of the pdf that can be downloaded. > >Too simple? ;-) > >cheers > >Michael M > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:27 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Group, > >I couldn't work out how this could be done so I am trying the group >again. > >I am using VB.net in Visual Studio 2005. This is a web application. I >have code that gets the path and name of a pdf file located on a server. >What I want to do within the code is have a file download box open which >gives the user an option of opening or saving the PDF file. > >The Process class doesn't deem to help because it tries to open the file >on the web server (and not the user's). > >My.Computer.Network.DownloadFile Method seems to require a destination >path and filename, but I don't want it to automatically be saved. > > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > >_______________________________________________ >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 From michael at ddisolutions.com.au Thu Dec 20 22:23:12 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 21 Dec 2007 15:23:12 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET References: <200712071829.lB7ISxDd021422@databaseadvisors.com><20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> Looking through the comments from http://www.west-wind.com/WebLog/posts/76293.aspx it appears that Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") ); will fail in some circumstances... one of the many reasons I prefer working with desktop apps. good luck! Michael M From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Friday, 21 December 2007 1:57 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Michael, I looked at the two links. The first got me in the right direction but didn't provide a direct solution. The second one was an addon for Firefox which most of the users don't have. However, I have found a couple of links that might solve the problem: http://www.west-wind.com/WebLog/posts/76293.aspx http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_ Dialog David At 21/12/2007, you wrote: >Hi David, > >I guess the links I sent you didn't do the job then... > >How about 2 links on the page, 1 to the pdf that will open it in the >browser. >The other to a zip of the pdf that can be downloaded. > >Too simple? ;-) > >cheers > >Michael M > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:27 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Group, > >I couldn't work out how this could be done so I am trying the group >again. > >I am using VB.net in Visual Studio 2005. This is a web application. I >have code that gets the path and name of a pdf file located on a server. >What I want to do within the code is have a file download box open >which gives the user an option of opening or saving the PDF file. > >The Process class doesn't deem to help because it tries to open the >file on the web server (and not the user's). > >My.Computer.Network.DownloadFile Method seems to require a destination >path and filename, but I don't want it to automatically be saved. > > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > >_______________________________________________ >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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 20 23:03:34 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 18:03:34 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> Message-ID: <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> I looked and couldn't see the problems you were referring to. My app seems to work ok (fingers crossed). The only problem I have now is that if I want two different PDF's downloaded they can't be done. The reason seems to be that Respond.End() ends the scripting of the page. Here is my code (simplified): boolRPXReport = False Dim split As String() = strReportNoList.Split(New [Char]() {"|"c}) Dim strReportNo As String For Each strReportNo In split 'Code here gets values for strReportType intReport = CInt(strReportNo) If strReportType <> "pdf" Then 'Code here gets ActiveReport and adds it to rptCombined.Document boolRPXReport = True Else 'If the report is already a PDF then it should be downloaded separately Response.ContentType = "Application/pdf" Response.AppendHeader("Content-Disposition", "attachment; filename=" + strReportFile + ".pdf") Response.TransmitFile("D:\PDFFiles\" + strReportFile + ".pdf") Response.End() End If Next strReportNo If boolRPXReport = True Then 'Download the combined report PDF If Me.PdfExport1 Is Nothing Then Me.PdfExport1 = New DataDynamics.ActiveReports.Export.Pdf.PdfExport End If Me.PdfExport1.Export(rptCombined.Document, m_stream) m_stream.Position = 0 Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment; filename=PVPBlankReports.pdf") Response.BinaryWrite(m_stream.ToArray()) Response.End() End If Is there any way for the code to continue processing each strReportNo even after one PDF has been downloaded? David At 21/12/2007, you wrote: >Looking through the comments from >http://www.west-wind.com/WebLog/posts/76293.aspx it appears that >Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") ); >will fail in some circumstances... one of the many reasons I prefer >working with desktop apps. > >good luck! > >Michael M > >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:57 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Michael, > >I looked at the two links. The first got me in the right direction but >didn't provide a direct solution. The second one was an addon for >Firefox which most of the users don't have. > >However, I have found a couple of links that might solve the problem: > >http://www.west-wind.com/WebLog/posts/76293.aspx > >http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_ >Dialog > >David > > > >At 21/12/2007, you wrote: > >Hi David, > > > >I guess the links I sent you didn't do the job then... > > > >How about 2 links on the page, 1 to the pdf that will open it in the > >browser. > >The other to a zip of the pdf that can be downloaded. > > > >Too simple? ;-) > > > >cheers > > > >Michael M > > > >-----Original Message----- > >From: dba-vb-bounces at databaseadvisors.com > >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson > >Sent: Friday, 21 December 2007 1:27 PM > >To: dba-vb at databaseadvisors.com > >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > > > >Group, > > > >I couldn't work out how this could be done so I am trying the group > >again. > > > >I am using VB.net in Visual Studio 2005. This is a web application. I > > >have code that gets the path and name of a pdf file located on a >server. > >What I want to do within the code is have a file download box open > >which gives the user an option of opening or saving the PDF file. > > > >The Process class doesn't deem to help because it tries to open the > >file on the web server (and not the user's). > > > >My.Computer.Network.DownloadFile Method seems to require a destination > >path and filename, but I don't want it to automatically be saved. > > > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand From accessd at shaw.ca Mon Dec 24 11:21:38 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Mon, 24 Dec 2007 09:21:38 -0800 Subject: [dba-VB] Ot Christmas In-Reply-To: <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: Hi All: At the risk of being politically incorrect: Merry Christmas and a Happy New Year to the best list on the Internet... :-) Best Regards Jim From wdhindman at dejpolsystems.com Mon Dec 24 11:43:25 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 24 Dec 2007 12:43:25 -0500 Subject: [dba-VB] Ot Christmas References: <200712071829.lB7ISxDd021422@databaseadvisors.com><20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local><20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local><20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <001901c84654$7ccbfe40$ef706c4c@jisshowsbs.local> ...and a very pc holiday season to you and yours :) William ----- Original Message ----- From: "Jim Lawrence" To: Sent: Monday, December 24, 2007 12:21 PM Subject: [dba-VB] Ot Christmas > Hi All: > > At the risk of being politically incorrect: > > Merry Christmas and a Happy New Year to the best list on the Internet... > :-) > > Best Regards > Jim > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From ridermark at gmail.com Mon Dec 24 14:55:07 2007 From: ridermark at gmail.com (Mark Rider) Date: Mon, 24 Dec 2007 14:55:07 -0600 Subject: [dba-VB] Ot Christmas In-Reply-To: References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: I thought the only PC part of this list was the machines we use to program! Merry Christmas! -- Mark Rider http://commonsensesecurity.info Try to learn something about everything and everything about something. - Thomas H. Huxley From jwcolby at colbyconsulting.com Wed Dec 26 10:04:48 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 26 Dec 2007 11:04:48 -0500 Subject: [dba-VB] VB.Net "proxy" progress indicator Message-ID: <000901c847d9$0b076b10$977aa8c0@M90> I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com From max.wanadoo at gmail.com Wed Dec 26 10:27:44 2007 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 26 Dec 2007 16:27:44 -0000 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <002901c847dc$3ec7ae30$8119fea9@LTVM> John, My EATBloat shows progess of import/export of Access object (Forms, Queries, etc) (A3k). I am sure that you could adapt that to your files. You can get to it from here if it is of any use: www.peoplelinks.co.uk/msaccess Max -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 4:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Wed Dec 26 11:08:17 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 26 Dec 2007 20:08:17 +0300 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <000901c847e1$e8c8da30$6501a8c0@nant> Hello John, If you're sure your main code export/import will never be used in multi-threading scenarios then you can just use so called Delegates... But I'd propose you to try to implement multi-threading and use BackGroundWorker class - they both could help you to solve your task effectively and have your tasks completed quicker because of multi-threading - have a look at this article/book excerpt: http://www.albahari.com/threading/part3.html#_BackgroundWorker -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Wed Dec 26 11:08:48 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 26 Dec 2007 09:08:48 -0800 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> References: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: John, I'm not sure I followed all of that, but you might be able to simplify your life with a "ProxyHelper" class and separate classes for import and export. We tend to use objects like that to handle repetitive code for performing similar actions. We simply pass the appropriate objects into the helper class, which handles all the UI stuff like progress meters, message boxes, etc. For example, we have a TransferHelper class which calls into TranferImport, TransferExport, TransferByEmail, etc. We declare an instance of that class in the helper and use a structure to retrieve the results from the specific class, and we use those results to log the event, notify the user, etc. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 8:05 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Wed Dec 26 11:17:40 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 26 Dec 2007 20:17:40 +0300 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <000001c847e3$3843e0e0$6501a8c0@nant> Hi John, I addition to my previous posting here is delegates sample: using System; public delegate void LogHandler(string s); public class Process { public void Run(LogHandler lh) { lh("Start process"); //... lh("Stop process"); } } public class Tracer { public void Trace(string s) { System.Console.WriteLine("Tracer: {0}", s); } } public class Test { public static void Log(string s) { System.Console.WriteLine("static Log: {0}", s); } public static int Main(string[] args) { Process p = new Process(); Tracer t = new Tracer(); LogHandler lh = null; lh += new LogHandler(Log); lh += new LogHandler(t.Trace); p.Run(lh); return 0; } } And here is events sample (events is a subset of delegates in .NET Framework) using System; public delegate void LogHandler(string s); public class Process { public event LogHandler LogEvent = null; public void Run() { if (LogEvent != null) LogEvent("Start process"); //... if (LogEvent != null) LogEvent("Stop process"); } } public class Tracer { public void Trace(string s) { System.Console.WriteLine("Tracer: {0}", s); } } public class Test { public static void Log(string s) { System.Console.WriteLine("static Log: {0}", s); } public static int Main(string[] args) { Process p = new Process(); Tracer t = new Tracer(); p.LogEvent += new LogHandler(Log); p.LogEvent += new LogHandler(t.Trace); p.Run(); return 0; } } The samples above are from this page: http://www.math.msu.su/~vvb/2course/Borisenko/AddEdu/CSharp/CSharp.html but its "meat" text is in Russia therefore I copied and pasted code samples here... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Wed Dec 26 11:45:38 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 26 Dec 2007 12:45:38 -0500 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847e1$e8c8da30$6501a8c0@nant> References: <000901c847d9$0b076b10$977aa8c0@M90> <000901c847e1$e8c8da30$6501a8c0@nant> Message-ID: <001d01c847e7$20cb21e0$977aa8c0@M90> Yes, I want to use backgroundworker. The in some cases the process will really be: 1) The CSVExport process will export a table of tens of millions of records to a directory on an Address Validation Server (AVS), the AVS Input directory. 2) The Address Validation Server has a set of directories that it watches. As files appear in the watched directories the AVS starts to perform the address validation process on those files. 3) The AVS places address validation processed files into a set of matching output directories (one input / output pair), the AVS Output directory. 4) The CSVImport process will watch the AVS Output directory for that CSV process. As files appear in that directory it will import those files back in to SQL Server. So the entire process is an Out / AVS / In cycle. This cycle can be performed on many different tables. Each table needing AVS processing has a Spec record for the CSV OUT and a spec record for the CSV IN. I currently have five different tables of addresses needing validation, and the validation can occur on a timetable, perhaps once every three weeks etc, but the point is that it will eventually be totally automatic. A supervisor spawns a table AVS process that starts exporting data to the AVS, the AVS processes the data, and the results are imported back in again. Thus I really need (or should use) worked threads to handle the CSV export and import processes, for potentially N tables at a time, potentially "simultaneously". 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 Shamil Salakhetdinov Sent: Wednesday, December 26, 2007 12:08 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] VB.Net "proxy" progress indicator Hello John, If you're sure your main code export/import will never be used in multi-threading scenarios then you can just use so called Delegates... But I'd propose you to try to implement multi-threading and use BackGroundWorker class - they both could help you to solve your task effectively and have your tasks completed quicker because of multi-threading - have a look at this article/book excerpt: http://www.albahari.com/threading/part3.html#_BackgroundWorker -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From jwcolby at colbyconsulting.com Mon Dec 31 16:00:19 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 31 Dec 2007 17:00:19 -0500 Subject: [dba-VB] inheriting events Message-ID: <001c01c84bf8$89521650$657aa8c0@M90> I designed a base class which has events: Public Class clsProxyProgress Public Event evProcessName(ByVal strProcessName As String) Public Event evDirectory(ByVal strDirectory As String) Public Event evCurrentFile(ByVal strCurrentFile As String) Public Event evFilesCompleted(ByVal intFilesCompleted As Integer) Public Event evFileCnt(ByVal intFileCnt As Integer) Public Event evRowsCopied(ByVal intRowsCopied As Long) Public Event evStatus(ByVal strStatus As String) I then inherit that class in a child class. Public Class clsCSVDataExportSpec Inherits clsProxyProgress The child class clsCSVDataExportSpec cannot "see" the events in the parent, i.e. it cannot do: RaiseEvent evStatus(mstrStatus) even though its parent class has that event. If I try to do this in the child class I get a compile error. In order to get around this I created functions in the parent class clsProxyProgress Public Sub mStatus(ByVal strStatus As String, ByVal blnStatusReset As Boolean, ByVal blnStatusTimeStamp As Boolean) If blnStatusReset Then mstrStatus = "" If blnStatusTimeStamp Then mstrStatus = mstrStatus & vbCrLf & Now() End If If Len(mstrStatus) > 0 Then mstrStatus = mstrStatus & vbCrLf & strStatus Else mstrStatus = strStatus End If RaiseEvent evStatus(mstrStatus) End Sub NOTICE that in the last line of the sub I raise the evStatus. I then call this sub from the child clsCSVDataExportSpec so that the parent class clsProxyProgress raises the event for the child class. I do this simply because if I try to raise the event up in the parent class directly I get a compile error. The whole point of this stuff is to allow a form to sink events and display data in text boxes on the form. In a form class I dimension a variable for this child class: Private WithEvents fclsCSVDataExport As clsCSVDataExportSpec further down I "sink" the events for this class: Private Sub fclsCSVDataExport_evStatus(ByVal strStatus As String) Handles fclsCSVDataExport.evStatus txtStatus.Text = strStatus Application.DoEvents() End Sub In the "Handles ..." the evStatus is a choice in the intellisense dropdown, IOW this form's module "sees" the event that the child class fclsCSVDataExport inherits from its parent class clsProxyProgress. However the sub fclsCSVDataExport_evStatus() never receives control when the Raisevent is executed. I SUSPECT that the issue is that the "Handles ..." needs to be "Handles fclsProxyProgress", i.e. it needs to "handle" the parent of fclsCSVDataExport, not fclsCSVDataExport itself. fclsCSVDataExport is the actual class that performs the data export for me. clsProxyProgress only exists to allow several different such import / export classes inherit common events and code, and I do that so that I can (eventually) have a generic form that dimensions a clsProxyProgress rather than having a specific import or export class such as clsCSVDataExport or clsCSVDataImport. If anyone is following what I am doing and can point me to how to make this work it would be appreciated. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Dec 1 11:04:04 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 1 Dec 2007 12:04:04 -0500 Subject: [dba-VB] Converting the value in a field Message-ID: <005501c8343c$2deeb580$647aa8c0@M90> I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Dec 1 11:30:31 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 1 Dec 2007 12:30:31 -0500 Subject: [dba-VB] Ionforge Message-ID: <005601c8343f$e5533a40$647aa8c0@M90> Is anyone using Ionforge VCS? Like it? Easy to use, hard to use? Gotchas for .Net? Misc comments? John W. Colby Colby Consulting www.ColbyConsulting.com From bheid at sc.rr.com Sat Dec 1 15:37:10 2007 From: bheid at sc.rr.com (Bobby Heid) Date: Sat, 1 Dec 2007 16:37:10 -0500 Subject: [dba-VB] Converting the value in a field In-Reply-To: <005501c8343c$2deeb580$647aa8c0@M90> References: <005501c8343c$2deeb580$647aa8c0@M90> Message-ID: <001101c83462$5432e4c0$fc98ae40$@rr.com> Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Dec 2 01:18:04 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 2 Dec 2007 02:18:04 -0500 Subject: [dba-VB] Converting the value in a field In-Reply-To: <001101c83462$5432e4c0$fc98ae40$@rr.com> References: <005501c8343c$2deeb580$647aa8c0@M90> <001101c83462$5432e4c0$fc98ae40$@rr.com> Message-ID: <005e01c834b3$7b3c5140$647aa8c0@M90> And which type is faster? CInt smells of VB6 compatibility code. 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 Bobby Heid Sent: Saturday, December 01, 2007 4:37 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Mon Dec 3 02:02:56 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 03 Dec 2007 09:02:56 +0100 Subject: [dba-VB] Weird table name restriction Message-ID: Hi John Does this from Sybase work: select valid_name("Object_name") http://manuals.sybase.com/onlinebooks/group-asarc/srg1100e/sqlref/@Generic__BookTextView/64305;pt=60135/* /gustav >>> jwcolby at colbyconsulting.com 30-11-2007 20:04:15 >>> I just discovered that SQL Server (or VB.Net) does not like dashes in table names. If I use a table name "ZIP4-AA_X", the BulkCopy.WriteToServer throws an error "can't access destination table" but if I remove the dash "ZIP4AA_X" it works just fine. The problem is that I take the name of the datafile, strip off the extension and use that as my table name. Thus I now have to start doing edits of the file name before I can use it as a field name. The hoops we have to jump through... John W. Colby Colby Consulting www.ColbyConsulting.com From DWUTKA at Marlow.com Mon Dec 3 09:22:59 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 09:22:59 -0600 Subject: [dba-VB] Reserved words In-Reply-To: <002f01c83389$497a0a10$647aa8c0@M90> Message-ID: Why not prepend all your tables with tbl? That would guarantee that you don't hit a reserved word. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, November 30, 2007 1:44 PM To: dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Reserved words Does anyone know if the reserved words in SQL Server (can't be used in table names etc) are in a table anywhere (in sql server)? I have code that builds tables and it really needs to check the proposed table name to make sure that the name isn't a reserved word, and that it does not have special characters. I have had TWO times now where I was hunting down errors caused by issues with what is valid in a table name. I could build a table of reserved words but if any new ones are added my list would be short. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From DWUTKA at Marlow.com Mon Dec 3 09:24:50 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 09:24:50 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From jwcolby at colbyconsulting.com Mon Dec 3 10:19:48 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 11:19:48 -0500 Subject: [dba-VB] Reserved words In-Reply-To: References: <002f01c83389$497a0a10$647aa8c0@M90> Message-ID: <00c901c835c8$53b82ed0$647aa8c0@M90> And that is what I am doing now. Thanks for the suggestion. 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 Drew Wutka Sent: Monday, December 03, 2007 10:23 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Reserved words Why not prepend all your tables with tbl? That would guarantee that you don't hit a reserved word. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, November 30, 2007 1:44 PM To: dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Reserved words Does anyone know if the reserved words in SQL Server (can't be used in table names etc) are in a table anywhere (in sql server)? I have code that builds tables and it really needs to check the proposed table name to make sure that the name isn't a reserved word, and that it does not have special characters. I have had TWO times now where I was hunting down errors caused by issues with what is valid in a table name. I could build a table of reserved words but if any new ones are added my list would be short. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 3 10:20:41 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 11:20:41 -0500 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: <00ca01c835c8$73699610$647aa8c0@M90> Kind of scary a computer that thinks like Susan. Even scarier people who would want to use a computer that thinks like Susan. ;-) 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 Drew Wutka Sent: Monday, December 03, 2007 10:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 3 10:29:05 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:29:05 -0800 Subject: [dba-VB] Ionforge In-Reply-To: <005601c8343f$e5533a40$647aa8c0@M90> References: <005601c8343f$e5533a40$647aa8c0@M90> Message-ID: I have used it in the past and liked it, but I haven't tried it with .Net. It's pretty easy to use. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 9:31 AM To: 'Access Developers discussion and problem solving'; dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Ionforge Is anyone using Ionforge VCS? Like it? Easy to use, hard to use? Gotchas for .Net? Misc comments? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 3 10:32:45 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:32:45 -0800 Subject: [dba-VB] Converting the value in a field In-Reply-To: <005e01c834b3$7b3c5140$647aa8c0@M90> References: <005501c8343c$2deeb580$647aa8c0@M90><001101c83462$5432e4c0$fc98ae40$@rr.com> <005e01c834b3$7b3c5140$647aa8c0@M90> Message-ID: I understand that all the Ctype functions boil down to the same thing under the hood and run about the same speed. The benefit of CType is that you can cast the object as just about anything, including custom objects. Don't recall being able to do that in VBA. ;} You can also use DirectCast if you are absolutely sure the object contains data and is the right type. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 11:18 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field And which type is faster? CInt smells of VB6 compatibility code. 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 Bobby Heid Sent: Saturday, December 01, 2007 4:37 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 10:33:49 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:33:49 -0800 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL From jwcolby at colbyconsulting.com Mon Dec 3 12:22:01 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 13:22:01 -0500 Subject: [dba-VB] Listing distinct values in field Message-ID: <00db01c835d9$66d83580$647aa8c0@M90> In my client's business he needs a "data dictionary" kind of thing which essentially tells him the valid values in any given field (for WHERE clause purposes). I receive CSV and fixed width files which I import into SQL Server. I need to give him a list of the fields and the valid values in each field (actual different data items). I will be writing such a widget if I can't find one already out there. Does anyone have such a widget or know where to find one? John W. Colby Colby Consulting www.ColbyConsulting.com From DWUTKA at Marlow.com Mon Dec 3 11:49:43 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 11:49:43 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: Message-ID: I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From cfoust at infostatsystems.com Mon Dec 3 13:00:30 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 11:00:30 -0800 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: Message-ID: ROTFL Sort of like Susan? Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 9:50 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. From ssharkins at gmail.com Mon Dec 3 13:11:53 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 3 Dec 2007 14:11:53 -0500 Subject: [dba-VB] Listing distinct values in field References: <00db01c835d9$66d83580$647aa8c0@M90> Message-ID: <00ad01c835e0$60baf230$4b3a8343@SusanOne> Well, for the meta data, I'll check out schema recordsets. I know that T-SQL can produce a unique sort, but off the top of my head, I don't remember the keyword. Susan H. > In my client's business he needs a "data dictionary" kind of thing which > essentially tells him the valid values in any given field (for WHERE > clause > purposes). I receive CSV and fixed width files which I import into SQL > Server. I need to give him a list of the fields and the valid values in > each field (actual different data items). I will be writing such a widget > if I can't find one already out there. > > Does anyone have such a widget or know where to find one? > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Mon Dec 3 15:57:22 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 16:57:22 -0500 Subject: [dba-VB] VS2005 Data Form Wizard Message-ID: <00e801c835f7$7c20d5a0$647aa8c0@M90> Does the Data Form Wizard no longer exist in VS 2005? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 3 16:19:26 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 17:19:26 -0500 Subject: [dba-VB] Toolbox data objects Message-ID: <00ea01c835fa$91061450$647aa8c0@M90> My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX objects. I could swear I had used them sometime in the past. Any idea what is going on? Was this a previous version of VS? Need to include some object? help... John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 18:58:57 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 16:58:57 -0800 Subject: [dba-VB] VS2005 Data Form Wizard In-Reply-To: <00e801c835f7$7c20d5a0$647aa8c0@M90> References: <00e801c835f7$7c20d5a0$647aa8c0@M90> Message-ID: What data form wizard are you talking about, John? I must have missed that. 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 03, 2007 1:57 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VS2005 Data Form Wizard Does the Data Form Wizard no longer exist in VS 2005? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 19:05:47 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 17:05:47 -0800 Subject: [dba-VB] Toolbox data objects In-Reply-To: <00ea01c835fa$91061450$647aa8c0@M90> References: <00ea01c835fa$91061450$647aa8c0@M90> Message-ID: I don't have those objects in my toolbox, John. What are you trying to do? 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 03, 2007 2:19 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Toolbox data objects My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX objects. I could swear I had used them sometime in the past. Any idea what is going on? Was this a previous version of VS? Need to include some object? help... John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Mon Dec 3 21:51:20 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 3 Dec 2007 22:51:20 -0500 Subject: [dba-VB] Toolbox data objects References: <00ea01c835fa$91061450$647aa8c0@M90> Message-ID: <000501c83628$ef025b80$ef706c4c@jisshowsbs.local> ...I've removed vs'3 and vs'5 from my systems but those objects are not in the vs'8 toolset either. William ----- Original Message ----- From: "Charlotte Foust" To: Sent: Monday, December 03, 2007 8:05 PM Subject: Re: [dba-VB] Toolbox data objects >I don't have those objects in my toolbox, John. What are you trying to > do? > > 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 03, 2007 2:19 PM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Toolbox data objects > > My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX > objects. I could swear I had used them sometime in the past. > > Any idea what is going on? Was this a previous version of VS? Need to > include some object? help... > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > 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 > From wdhindman at dejpolsystems.com Mon Dec 3 22:42:55 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 3 Dec 2007 23:42:55 -0500 Subject: [dba-VB] Toolbox data objects References: <00ea01c835fa$91061450$647aa8c0@M90> <000501c83628$ef025b80$ef706c4c@jisshowsbs.local> Message-ID: <000301c83630$23d682d0$ef706c4c@jisshowsbs.local> JC ...methinks you may be confusing datasource selection with the tool box. William ----- Original Message ----- From: "William Hindman" To: Sent: Monday, December 03, 2007 10:51 PM Subject: Re: [dba-VB] Toolbox data objects > ...I've removed vs'3 and vs'5 from my systems but those objects are not in > the vs'8 toolset either. > William > > ----- Original Message ----- > From: "Charlotte Foust" > To: > Sent: Monday, December 03, 2007 8:05 PM > Subject: Re: [dba-VB] Toolbox data objects > > >>I don't have those objects in my toolbox, John. What are you trying to >> do? >> >> 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 03, 2007 2:19 PM >> To: dba-vb at databaseadvisors.com >> Subject: [dba-VB] Toolbox data objects >> >> My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX >> objects. I could swear I had used them sometime in the past. >> >> Any idea what is going on? Was this a previous version of VS? Need to >> include some object? help... >> >> John W. Colby >> Colby Consulting >> www.ColbyConsulting.com >> >> _______________________________________________ >> 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 >> > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From DWUTKA at Marlow.com Tue Dec 4 10:43:30 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 4 Dec 2007 10:43:30 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: Message-ID: I didn't say that.... Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 1:01 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction ROTFL Sort of like Susan? Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 9:50 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ssharkins at gmail.com Tue Dec 4 10:56:42 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 4 Dec 2007 11:56:42 -0500 Subject: [dba-VB] Weird table name restriction References: Message-ID: <00a101c83696$ac42ea80$4b3a8343@SusanOne> Macs are for sissies. ;) Susan H. >I didn't say that.... > > Drew > > ROTFL Sort of like Susan? > > Charlotte > > I wasn't trying to be insulting. A Mac does what you expect it to do, > almost regardless of what you actually tell it to do. > > Drew From DWUTKA at Marlow.com Tue Dec 4 11:05:40 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 4 Dec 2007 11:05:40 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: <00a101c83696$ac42ea80$4b3a8343@SusanOne> Message-ID: I wouldn't say that, if you need graphic arts capabilities, Macs win hands down. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Tuesday, December 04, 2007 10:57 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Macs are for sissies. ;) Susan H. >I didn't say that.... > > Drew > > ROTFL Sort of like Susan? > > Charlotte > > I wasn't trying to be insulting. A Mac does what you expect it to do, > almost regardless of what you actually tell it to do. > > Drew _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ssharkins at gmail.com Tue Dec 4 11:30:02 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 4 Dec 2007 12:30:02 -0500 Subject: [dba-VB] Weird table name restriction References: Message-ID: <00d901c8369c$18f02ad0$4b3a8343@SusanOne> I was kidding. :) Susan H. >I wouldn't say that, if you need graphic arts capabilities, Macs win > hands down. > > Drew From newsgrps at dalyn.co.nz Wed Dec 5 18:48:36 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 13:48:36 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: References: Message-ID: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open >the files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From michael at ddisolutions.com.au Wed Dec 5 21:38:01 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 6 Dec 2007 14:38:01 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) References: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> Is this what you are looking for? http://www.useit.com/alertbox/open_new_windows.html or perhaps https://addons.mozilla.org/en-US/firefox/addon/636 I'm not 100% sure but I think the code you have can only be used on the server. cheers Michael M Subject: Re: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open the >files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > > > >_______________________________________________ >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 From Gustav at cactus.dk Thu Dec 6 01:18:50 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 06 Dec 2007 08:18:50 +0100 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) Message-ID: Hi David I have not tried your code ... so just a stupid question: Is Adobe Reader (or another pdf-application) installed on the user's machine? /gustav >>> newsgrps at dalyn.co.nz 06-12-2007 01:48:36 >>> I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open >the files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand From newsgrps at dalyn.co.nz Thu Dec 6 03:24:10 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 22:24:10 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: References: Message-ID: <20071206092107.TJMB17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> There are no stupid questions - just stupid answers :-) Yes the user (who was me) does have adobe reader installed. Part of my program uses the following code to show pdf's that are created from DataDynamic's Active Reports (this was code provided by DataDynamics): Dim m_stream As New System.IO.MemoryStream() Dim rptCombined As New DataDynamics.ActiveReports.ActiveReport3 ' Other code which creates the rptCombined report If Me.PdfExport1 Is Nothing Then Me.PdfExport1 = New DataDynamics.ActiveReports.Export.Pdf.PdfExport End If Me.PdfExport1.Export(rptCombined.Document, m_stream) m_stream.Position = 0 Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment; filename=PVPReports.pdf") Response.BinaryWrite(m_stream.ToArray()) Response.End() It looks like some of this might be able to be used to show the pdf files. What happens is that the user has the option to save or open the file. This is what I want for the pdf's as well. David At 6/12/2007, you wrote: >Hi David > >I have not tried your code ... so just a stupid question: Is Adobe >Reader (or another pdf-application) installed on the user's machine? > >/gustav > > >>> newsgrps at dalyn.co.nz 06-12-2007 01:48:36 >>> >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process >runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >"\PDFFiles\" + strReportFile + ".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this >operation. It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have >thought that it would use the local machines copy. > >David > >At 27/11/2007, you wrote: > >Hi David et al > > > >A lot of useful things can be done with the Process class. > >Some examples here: > > > > http://www.thescarms.com/dotnet/Process.aspx > > > >/gustav > > > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> > >I am using VS 2005 and VB.Net for a web site. > > > >I have a number of PDF files that are stored in a static folder on > the server. > > > >Users select from a list on files on a web page and I want to open > >the files in Adobe. Adobe reader is installed on the server. > > > >Can anyone give me a pointer to how I can take a string with path and > >file name, and open it? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 6 03:28:00 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 22:28:00 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> References: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> Message-ID: <20071206092456.OVAG9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Michael, The first link looks promising - see my reply to Gustav. David At 6/12/2007, you wrote: >Is this what you are looking for? > >http://www.useit.com/alertbox/open_new_windows.html >or perhaps >https://addons.mozilla.org/en-US/firefox/addon/636 > >I'm not 100% sure but I think the code you have can only be used on the >server. > >cheers > > >Michael M > >Subject: Re: [dba-VB] Launch and monitor external programs from .NET >(was: Open PDF file) > >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = >HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + >".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this operation. >It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have thought >that it would use the local machines copy. > >David > >At 27/11/2007, you wrote: > >Hi David et al > > > >A lot of useful things can be done with the Process class. > >Some examples here: > > > > http://www.thescarms.com/dotnet/Process.aspx > > > >/gustav > > > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> > >I am using VS 2005 and VB.Net for a web site. > > > >I have a number of PDF files that are stored in a static folder on the >server. > > > >Users select from a list on files on a web page and I want to open the > >files in Adobe. Adobe reader is installed on the server. > > > >Can anyone give me a pointer to how I can take a string with path and > >file name, and open it? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand > > > > > > > >_______________________________________________ > >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 > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From robert at webedb.com Thu Dec 6 12:28:08 2007 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 06 Dec 2007 12:28:08 -0600 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: Message-ID: <200712061832.lB6IWrgr023718@databaseadvisors.com> David, Here is what I use: Interest and skills assesment survey. As far as I know, Adobe Reader is not installed on the server. Robert At 12:00 PM 12/6/2007, you wrote: >Date: Thu, 06 Dec 2007 13:48:36 +1300 >From: David Emerson >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > (was: Open PDF file) >To: dba-vb at databaseadvisors.com >Message-ID: > <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >Content-Type: text/plain; charset="us-ascii"; format=flowed > >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process >runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >"\PDFFiles\" + strReportFile + ".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this >operation. It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have >thought that it would use the local machines copy. > >David From newsgrps at dalyn.co.nz Thu Dec 6 12:55:57 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 07 Dec 2007 07:55:57 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET References: Message-ID: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Thanks Robert. This looks like it open the pdf in a browser window. Am I correct? I am wanting the box to appear giving the user the option of opening it or saving the file. David At 7/12/2007, you wrote: >David, > >Here is what I use: > > runat="server" > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > Text="Interest and skills assesment survey." > Target="_blank"> > Interest and skills assesment survey. > > >As far as I know, Adobe Reader is not installed on the server. > >Robert > >At 12:00 PM 12/6/2007, you wrote: >>Date: Thu, 06 Dec 2007 13:48:36 +1300 >>From: David Emerson >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET >> (was: Open PDF file) >>To: dba-vb at databaseadvisors.com >>Message-ID: >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >>Content-Type: text/plain; charset="us-ascii"; format=flowed >> >>I included Gustav's code in my web application as below: >> >>Dim runPdf As New System.Diagnostics.Process >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >>"\PDFFiles\" + strReportFile + ".pdf" >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >>runPdf.Start() >> >>However, when it is run by a user I get the following error: No >>application is associated with the specified file for this >>operation. It seems to be wanting to open the file on the server. >> >>Do I need to install Adobe Acrobat on the server? I would have >>thought that it would use the local machines copy. >> >>David From joeo at appoli.com Thu Dec 6 13:19:08 2007 From: joeo at appoli.com (Joe O'Connell) Date: Thu, 6 Dec 2007 14:19:08 -0500 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> References: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: David, I have not followed this thread, so your question may have already been answered. If you want to open a pdf in the user's browser, couldn't the pdf just be the href? Open PDF If the user left clicks, the pdf should open in a new browser window. If the user right clicks, a box will open allowing the user to save the pdf on their local disk drive. Joe O'Connell -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Thursday, December 06, 2007 1:56 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Thanks Robert. This looks like it open the pdf in a browser window. Am I correct? I am wanting the box to appear giving the user the option of opening it or saving the file. David At 7/12/2007, you wrote: >David, > >Here is what I use: > > runat="server" > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > Text="Interest and skills assesment survey." > Target="_blank"> > Interest and skills assesment survey. > > >As far as I know, Adobe Reader is not installed on the server. > >Robert > >At 12:00 PM 12/6/2007, you wrote: >>Date: Thu, 06 Dec 2007 13:48:36 +1300 >>From: David Emerson >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET >> (was: Open PDF file) >>To: dba-vb at databaseadvisors.com >>Message-ID: >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >>Content-Type: text/plain; charset="us-ascii"; format=flowed >> >>I included Gustav's code in my web application as below: >> >>Dim runPdf As New System.Diagnostics.Process >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >>"\PDFFiles\" + strReportFile + ".pdf" >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >>runPdf.Start() >> >>However, when it is run by a user I get the following error: No >>application is associated with the specified file for this >>operation. It seems to be wanting to open the file on the server. >> >>Do I need to install Adobe Acrobat on the server? I would have >>thought that it would use the local machines copy. >> >>David _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 6 14:29:28 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 07 Dec 2007 09:29:28 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <20071206202629.DROX9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Joe, The PDF is one of a number of reports that are shown dynamically on the screen based on table records. The user clicks on check boxes to select the reports they want to run, then the code processes the check boxes and opens the appropriate reports/files etc. Therefore hardcoding the href isn't an option in this case. Thanks for your reply though. David At 7/12/2007, you wrote: >David, > >I have not followed this thread, so your question may have already been >answered. > >If you want to open a pdf in the user's browser, couldn't the pdf just >be the href? Open PDF > >If the user left clicks, the pdf should open in a new browser window. >If the user right clicks, a box will open allowing the user to save the >pdf on their local disk drive. > >Joe O'Connell > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Thursday, December 06, 2007 1:56 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Thanks Robert. This looks like it open the pdf in a browser >window. Am I correct? I am wanting the box to appear giving the >user the option of opening it or saving the file. > >David > >At 7/12/2007, you wrote: > >David, > > > >Here is what I use: > > > > > runat="server" > > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > > Text="Interest and skills assesment survey." > > Target="_blank"> > > Interest and skills assesment survey. > > > > > >As far as I know, Adobe Reader is not installed on the server. > > > >Robert > > > >At 12:00 PM 12/6/2007, you wrote: > >>Date: Thu, 06 Dec 2007 13:48:36 +1300 > >>From: David Emerson > >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >> (was: Open PDF file) > >>To: dba-vb at databaseadvisors.com > >>Message-ID: > >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> > >>Content-Type: text/plain; charset="us-ascii"; format=flowed > >> > >>I included Gustav's code in my web application as below: > >> > >>Dim runPdf As New System.Diagnostics.Process > >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + > >>"\PDFFiles\" + strReportFile + ".pdf" > >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal > >>runPdf.Start() > >> > >>However, when it is run by a user I get the following error: No > >>application is associated with the specified file for this > >>operation. It seems to be wanting to open the file on the server. > >> > >>Do I need to install Adobe Acrobat on the server? I would have > >>thought that it would use the local machines copy. > >> > >>David > >_______________________________________________ >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 From jwcolby at colbyconsulting.com Fri Dec 7 08:38:34 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 09:38:34 -0500 Subject: [dba-VB] Lib object references lib obj Message-ID: <00ea01c838de$d91bebc0$977aa8c0@M90> I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Dec 7 09:51:53 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 7 Dec 2007 07:51:53 -0800 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <00ea01c838de$d91bebc0$977aa8c0@M90> References: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Dec 7 10:44:11 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 11:44:11 -0500 Subject: [dba-VB] Lib object references lib obj In-Reply-To: References: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: <010901c838f0$651a0650$977aa8c0@M90> Charlotte, Thanks for the response. The last time I asked this kind of thing you showed me how to link specific modules from another project, which is the method I am currently using. How do I link the entire project? This is essentially a "framework" I am starting, so it would certainly be appropriate to link that framework to the new project if I knew how. 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: Friday, December 07, 2007 10:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From shamil at users.mns.ru Fri Dec 7 11:13:59 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Fri, 7 Dec 2007 20:13:59 +0300 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: <000301c838f4$8ea91340$6401a8c0@nant> Hello John, Why not use dedicated ClassLibs for different sets of functionality: - in one of the current ASP.NET/C# solutions I'm working here I have 7 classlibs and the main ASP.Net app... VS works very well with that kind of "advanced" stuff... Just set the reference to projects - and you're done - you can debug/trace "navigating" between projects' source code if needed... Note: Cross-referencing projects is not allowed... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 5:39 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Fri Dec 7 11:38:31 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 7 Dec 2007 09:38:31 -0800 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <010901c838f0$651a0650$977aa8c0@M90> References: <00ea01c838de$d91bebc0$977aa8c0@M90> <010901c838f0$651a0650$977aa8c0@M90> Message-ID: Bring up the properties of the project, select references, and add the dll in the selected project's bin folder. That should give you access to the functionality in that project. I'm winging it here, because we do it in a totally different way due in part to the team development environment. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 8:44 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Charlotte, Thanks for the response. The last time I asked this kind of thing you showed me how to link specific modules from another project, which is the method I am currently using. How do I link the entire project? This is essentially a "framework" I am starting, so it would certainly be appropriate to link that framework to the new project if I knew how. 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: Friday, December 07, 2007 10:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From robert at webedb.com Fri Dec 7 12:25:54 2007 From: robert at webedb.com (Robert L. Stewart) Date: Fri, 07 Dec 2007 12:25:54 -0600 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: Message-ID: <200712071829.lB7ISxDd021422@databaseadvisors.com> Yes, David, it opens it in the browser and from there, the user is viewing it and can save it from there. At 11:39 AM 12/7/2007, you wrote: >Date: Fri, 07 Dec 2007 07:55:57 +1300 >From: David Emerson >Subject: Re: [dba-VB] Launch and monitor external programs from .NET >To: dba-vb at databaseadvisors.com >Message-ID: > <20071206185408.YCUE9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >Content-Type: text/plain; charset="us-ascii"; format=flowed > >Thanks Robert. This looks like it open the pdf in a browser >window. Am I correct? I am wanting the box to appear giving the >user the option of opening it or saving the file. > >David From jwcolby at colbyconsulting.com Fri Dec 7 14:27:30 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 15:27:30 -0500 Subject: [dba-VB] Connection closed Message-ID: <012701c8390f$978270e0$977aa8c0@M90> I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Dec 7 23:32:01 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 8 Dec 2007 00:32:01 -0500 Subject: [dba-VB] Connection closed In-Reply-To: <012701c8390f$978270e0$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: <014a01c8395b$a91ebbf0$977aa8c0@M90> Any ideas out there? The ExecuteNonQuery complains that the connection is closed. If I break at that point (the catch) and do a lcnn.open it says the connection is open. Further it tells me the name of the server, the table name etc. Doesn't sound closed. 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 jwcolby Sent: Friday, December 07, 2007 3:28 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ssharkins at gmail.com Sat Dec 8 08:23:46 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Sat, 8 Dec 2007 09:23:46 -0500 Subject: [dba-VB] Connection closed References: <012701c8390f$978270e0$977aa8c0@M90> <014a01c8395b$a91ebbf0$977aa8c0@M90> Message-ID: <003201c839a6$359f0ef0$4b3a8343@SusanOne> John, this is just a wilda*s guess because I've seen this happen to me, but it may be the syntax you're using and you're just getting one of the less the helpful error messages. The interesting word is "available" -- my guess is that one of your parameters isn't the right type of something obscure like that, but I really am only guessing. Susan H. > Any ideas out there? The ExecuteNonQuery complains that the connection is > closed. If I break at that point (the catch) and do a lcnn.open it says > the > connection is open. Further it tells me the name of the server, the table > name etc. Doesn't sound closed. From jwcolby at colbyconsulting.com Sat Dec 8 09:45:57 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 8 Dec 2007 10:45:57 -0500 Subject: [dba-VB] Connection closed In-Reply-To: <003201c839a6$359f0ef0$4b3a8343@SusanOne> References: <012701c8390f$978270e0$977aa8c0@M90><014a01c8395b$a91ebbf0$977aa8c0@M90> <003201c839a6$359f0ef0$4b3a8343@SusanOne> Message-ID: <016401c839b1$6d4f7e60$977aa8c0@M90> Susan, Thanks for the reply. I don't have a clue and no time to screw around with it more. I was trying to use a stored procedure to migrate data from a "horizontal" to a "vertical" schema. In the end I just resorted to VB.Net. I have a class with a bunch of prewritten functions that allows me to just instantiate and call my class to do things including executing action queries directly out on SQL Server. It took me about 1/2 hour to just redo the whole process, replace the stored procedure with a new function in a form in VB.Net and voila, I am crunching away doing the conversion. At first it was whizzing through the fields of the horizontal table, throwing their data and field ID into the vertical table. It has slowed down now as the number of records in the vertical table has grown. I was reading just the other night about all the work SQL Server has to do to maintain a balanced tree and I think that is what I am seeing now. I have processed 18 fields from the horizontal table and pulled 142 million pieces of actual data out of those 18 fields. There are 584 fields to process in the horizontal table so this could take till next week to process. And then once the process is finished I have to build an index on the table. All in order to discover whether it will be faster to execute a given query using this vertical schema. It should be interesting. 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 Susan Harkins Sent: Saturday, December 08, 2007 9:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, this is just a wilda*s guess because I've seen this happen to me, but it may be the syntax you're using and you're just getting one of the less the helpful error messages. The interesting word is "available" -- my guess is that one of your parameters isn't the right type of something obscure like that, but I really am only guessing. Susan H. > Any ideas out there? The ExecuteNonQuery complains that the connection > is closed. If I break at that point (the catch) and do a lcnn.open it > says the connection is open. Further it tells me the name of the > server, the table name etc. Doesn't sound closed. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From joeget at vgernet.net Sun Dec 9 21:08:14 2007 From: joeget at vgernet.net (John Eget) Date: Sun, 9 Dec 2007 21:08:14 -0600 Subject: [dba-VB] Access 2003 to 2007 issue Message-ID: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> Anyone I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? From cfoust at infostatsystems.com Mon Dec 10 10:03:33 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:03:33 -0800 Subject: [dba-VB] Connection closed In-Reply-To: <012701c8390f$978270e0$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 10 10:06:02 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:06:02 -0800 Subject: [dba-VB] Access 2003 to 2007 issue In-Reply-To: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> References: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> Message-ID: Did you cross-post this? It really belongs in the AccessD list. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John Eget Sent: Sunday, December 09, 2007 7:08 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Access 2003 to 2007 issue Anyone I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 10:23:39 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 11:23:39 -0500 Subject: [dba-VB] Connection closed In-Reply-To: References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: <01f401c83b49$064c3c50$977aa8c0@M90> When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From cfoust at infostatsystems.com Mon Dec 10 10:28:01 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:28:01 -0800 Subject: [dba-VB] Connection closed In-Reply-To: <01f401c83b49$064c3c50$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> <01f401c83b49$064c3c50$977aa8c0@M90> Message-ID: I thought you were USING vb.net, John. I wondered why you were coding it that way. 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 8:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 10 11:11:09 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 12:11:09 -0500 Subject: [dba-VB] Connection closed In-Reply-To: References: <012701c8390f$978270e0$977aa8c0@M90><01f401c83b49$064c3c50$977aa8c0@M90> Message-ID: <01f501c83b4f$a93299e0$977aa8c0@M90> Well I keep getting advice to use stored procedures in SQL Server. That is what I was trying to do. I created a stored procedure that would take table / field names and dynamically construct and execute an append query. I got that working, but I could not iterate a table from TSQL so I was trying to run the SP from VB.Net. THAT is where I was getting the failure. In the end I had to get it finished so I just replaced the SP with the equivalent directly out in VB.Net and then executed an action query (in VB.Net). That action query was the equivalent of the stored procedure, but because it was constructed and executed in VB.Net code I could then call it from another VB.Net function. It all worked and I performed an entire deconstruction of a "wide" table into a set of "tall" tables. I was implementing a schema that Arthur recommended. 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 11:28 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed I thought you were USING vb.net, John. I wondered why you were coding it that way. 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 8:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 12:21:42 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 13:21:42 -0500 Subject: [dba-VB] Does anyone have Message-ID: <01f701c83b59$84432460$977aa8c0@M90> A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 10 13:19:40 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 14:19:40 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: <01f701c83b59$84432460$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: <01fb01c83b61$9d43ec80$977aa8c0@M90> And then of course I immediately stumbled on this: http://www.developer.com/net/vb/article.php/3558771 by Paul Kimmel. Everything I needed to at least get started. The Oh No second strikes again. 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 jwcolby Sent: Monday, December 10, 2007 1:22 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Does anyone have A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 10 13:32:12 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 11:32:12 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <01f701c83b59$84432460$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: 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 -----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 10:22 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Does anyone have A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 13:54:26 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 14:54:26 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: <01fd01c83b66$787f49d0$977aa8c0@M90> 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 From cfoust at infostatsystems.com Mon Dec 10 14:55:26 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 12:55:26 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <01fd01c83b66$787f49d0$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> <01fd01c83b66$787f49d0$977aa8c0@M90> Message-ID: 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 From R.Griffiths at bury.gov.uk Tue Dec 11 03:30:12 2007 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Dec 2007 09:30:12 -0000 Subject: [dba-VB] Does anyone have In-Reply-To: References: <01f701c83b59$84432460$977aa8c0@M90><01fd01c83b66$787f49d0$977aa8c0@M90> Message-ID: <200712110913.lBB9DlM01061@smarthost.yourcomms.net> 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 . ************************************************************* From Gustav at cactus.dk Tue Dec 11 03:43:43 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 10:43:43 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John (crossposted to AccessD because this brief chapter is excellent reading if you know nearly nothing about Visual Studio and wish a first-hand impression on how it "compares" to Access regarding creating forms). Did you read the sample chapter 4 from the link provided by Arthur for "Visual Basic 2005 Jumpstart (see below): www.oreilly.com/catalog/vbjumpstart/chapter/ch04.pdf The chapter covers exactly this. --- Hi Arthur All samples? It lists 470 on Visual Studio alone! Found the JumpStart code download and the book: http://examples.oreilly.com/vbjumpstart/ http://www.oreilly.com/catalog/vbjumpstart/ Thanks! /gustav --- >>> fuller.artful at gmail.com 27-04-2007 16:28 >>> Go to GotDotNet and download all the samples. Do it relatively quickly since MS has decided to phase out this site. Also go to Visual Studio Magazine and CodePlex. There is a very good intro book called VB.NET JumpStart (google vbJumpStart and you should get to the downloadable code). I found this book so good that I am currently thinking that .NET is even easier than Access. Arthur -- >>> jwcolby at colbyconsulting.com 10-12-2007 20:54 >>> 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 From max.wanadoo at gmail.com Tue Dec 11 04:09:02 2007 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 11 Dec 2007 10:09:02 -0000 Subject: [dba-VB] Remote closing of Front Ends In-Reply-To: Message-ID: <00bf01c83bdd$dba05c30$8119fea9@LTVM> Hi Guys, Can anybody point me to code where I can close down Front Ends remotely. I have seen this sort of code posted in the past but cannot find it. Situation: Running an overnight compact and repair on the BE, but falls over because it "thinks" that somebody still has the FE open and linked to it (in fact they don't, so I think there must still be a flag sitting somewhere). Thanks in advance. Max From joeget at vgernet.net Tue Dec 11 06:21:15 2007 From: joeget at vgernet.net (John Eget) Date: Tue, 11 Dec 2007 06:21:15 -0600 Subject: [dba-VB] Autolinking front end to back end application Message-ID: <004b01c83bf0$594011a0$4ec2f63f@gateway8529fab> Does anyone have a link to or code to autolink the front end to the backend when a splash screen is opened? I cannot figure out the issue below I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? From jwcolby at colbyconsulting.com Tue Dec 11 08:28:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 09:28:23 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: <200712110913.lBB9DlM01061@smarthost.yourcomms.net> References: <01f701c83b59$84432460$977aa8c0@M90><01fd01c83b66$787f49d0$977aa8c0@M90> <200712110913.lBB9DlM01061@smarthost.yourcomms.net> Message-ID: <023601c83c02$16769350$977aa8c0@M90> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From Gustav at cactus.dk Tue Dec 11 08:52:46 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 15:52:46 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From jwcolby at colbyconsulting.com Tue Dec 11 09:02:09 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 10:02:09 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <023a01c83c06$cdc15910$977aa8c0@M90> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From robert at webedb.com Tue Dec 11 09:06:23 2007 From: robert at webedb.com (Robert L. Stewart) Date: Tue, 11 Dec 2007 09:06:23 -0600 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <200712111508.lBBF83se028103@databaseadvisors.com> For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 From Gustav at cactus.dk Tue Dec 11 09:17:20 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 16:17:20 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From wdhindman at dejpolsystems.com Tue Dec 11 09:38:43 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 11 Dec 2007 10:38:43 -0500 Subject: [dba-VB] Does anyone have References: Message-ID: <001001c83c0b$e9e8bcf0$0c10a8c0@jisshowsbs.local> gustav ...sssshhhh ...whatever you do, don't mention jc and "obtuse" in the same line ...upsets him it does :) William ----- Original Message ----- From: "Gustav Brock" To: Sent: Tuesday, December 11, 2007 9:52 AM Subject: Re: [dba-VB] Does anyone have > Hi John > > I visited the site and got the same impression. > > This is, sadly, the case for most open-source sites - lots of info on > marginal latest revisions and nerded comments, but only an obtuse - or > completely lacking - overview for the first-time visitor. Often not even > system/software requirements are listed. > These people could really gain by learning some marketing: What is this, > what is the purpose, who is it aimed for, what skill is required, what > software is required, etc. It's a mess and a waste. > > /gustav > >>>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> > Richard, > > Thanks for the link. I have to say it is annoying when an author does > things in reverse order. I go to the site. Plastered all over is CSLA. > So > what is CSLA? There is a link, plainly labeled "what is CSLA". So I go > to > that link. There is an entire page starting with CSLA is a .... At the > VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. > > Sigh. > > But in the end I ordered the book, as well as an older book by the same > author apparently no longer in print. Let's hope he can help me! > > ;-) > > 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 Griffiths, > Richard > Sent: Tuesday, December 11, 2007 4:30 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Does anyone have > > 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 > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From Gustav at cactus.dk Tue Dec 11 09:45:40 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 16:45:40 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi William I know - it was his documentation, right - so I didn't! /gustav >>> wdhindman at dejpolsystems.com 11-12-2007 16:38 >>> gustav ...sssshhhh ...whatever you do, don't mention jc and "obtuse" in the same line ...upsets him it does :) William ----- Original Message ----- From: "Gustav Brock" To: Sent: Tuesday, December 11, 2007 9:52 AM Subject: Re: [dba-VB] Does anyone have > Hi John > > I visited the site and got the same impression. > > This is, sadly, the case for most open-source sites - lots of info on > marginal latest revisions and nerded comments, but only an obtuse - or > completely lacking - overview for the first-time visitor. Often not even > system/software requirements are listed. > These people could really gain by learning some marketing: What is this, > what is the purpose, who is it aimed for, what skill is required, what > software is required, etc. It's a mess and a waste. > > /gustav > >>>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> > Richard, > > Thanks for the link. I have to say it is annoying when an author does > things in reverse order. I go to the site. Plastered all over is CSLA. So > what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to > that link. There is an entire page starting with CSLA is a .... At the > VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. > > Sigh. > > But in the end I ordered the book, as well as an older book by the same > author apparently no longer in print. Let's hope he can help me! > > ;-) > > 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 Griffiths, > Richard > Sent: Tuesday, December 11, 2007 4:30 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Does anyone have > > 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 From R.Griffiths at bury.gov.uk Tue Dec 11 09:51:04 2007 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Dec 2007 15:51:04 -0000 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <200712111534.lBBFYZM20719@smarthost.yourcomms.net> Hi I'm not exactly sure what the target audience is, but everything is OO based and whilst under the hood of the framework is some advanced coding, app usage is I would say intermediate to advanced. Rocky is a programmer at heart and I guess sticks programming and not any peripherals. I'm sure he would answer you if you posted a question or looked around - there's plenty of info. I adopted this framework as what I started do myself in designing my own sort of framework seemed covered (plus much more) and to a hugely better standard by Rocky. Such things a validation - where to put business rules, authorisation, data access, n-level undo (never used this though), smartdates etc - he has put a lot of thought into this and come up with a v.good framework. The framework is supported by Codesmith, Code Complete and CSLAGen (codemsmith incorporated/customised specifically for CSLA.net) for code generation of the business classes. .Nettiers whilst v.good I believe is more data access and does not cover the issues cited above. Same as the MS Enterprise libraries - these compliment CSLA (and vice-versa) rather than compete. Rocky has excellent credentials, speaking at VS Live 2008 conferences along with Ken Getz etc and is also running a post conference workshop on his framework. My advice would be not to plough too deeply into the book(s) as this can get heavy going sometimes but along with the book(s) try out yourself - but as I say a learning curve is to be taken. One thing to consider is that if you decide not to utilise this framework you still have to resolve those issues such as validation, authorisation and so on yourself. HTH Richard -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 11 December 2007 14:53 To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ 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 . ************************************************************* From jwcolby at colbyconsulting.com Tue Dec 11 10:05:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:05:23 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <024401c83c0f$a3800030$977aa8c0@M90> Charlotte's is home built it seems. I have not really read anything from Shamil re a .net framework but it would not surprise me if he were using such a thing. I watched a 15 minute overview video of codesmith and ntiers and all I can say is WOW. OTOH it seems that it would be WOW if you were an experienced .NET developer. My first impression is that it would simply be overwhelming to me. Sadly there are no books you can buy to help you get started with Codesmith. 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 Gustav Brock Sent: Tuesday, December 11, 2007 10:17 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 10:17:33 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:17:33 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <200712111508.lBBF83se028103@databaseadvisors.com> References: <200712111508.lBBF83se028103@databaseadvisors.com> Message-ID: Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 From jwcolby at colbyconsulting.com Tue Dec 11 10:26:32 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:26:32 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: <200712111508.lBBF83se028103@databaseadvisors.com> Message-ID: <024a01c83c12$97df97b0$977aa8c0@M90> And that is precisely my main complaint. I watched the demo and codesmith generated SIX PROJECTS with tens of thousands of lines of code in HUNDREDS of modules. Now what do I do when something doesn't work? I didn't write the modules, nor the code. 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: Tuesday, December 11, 2007 11:18 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 10:28:36 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:28:36 -0800 Subject: [dba-VB] Frameworks Message-ID: Yes, we build what can be called a framework. We created a solution and added project for Configuration, Controls, Exceptions, Charts, Data, Data.OleDbProvider, Reports, ResourceData (xml data tables), UI and Security. Some of those were added as we developed the concept, but Configuration, Exceptions, Data, Reports, UI and Security we there from the start. Controls was added when we started customising third party controls or building our own. Using those allows us to maintain a consistent look throughout the applications and save the developer having to set countless properties over and over. Charlotte From cfoust at infostatsystems.com Tue Dec 11 10:37:06 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:37:06 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <024a01c83c12$97df97b0$977aa8c0@M90> References: <200712111508.lBBF83se028103@databaseadvisors.com> <024a01c83c12$97df97b0$977aa8c0@M90> Message-ID: It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:27 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have And that is precisely my main complaint. I watched the demo and codesmith generated SIX PROJECTS with tens of thousands of lines of code in HUNDREDS of modules. Now what do I do when something doesn't work? I didn't write the modules, nor the code. 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: Tuesday, December 11, 2007 11:18 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert From jwcolby at colbyconsulting.com Tue Dec 11 10:51:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:51:23 -0500 Subject: [dba-VB] Open a filtered form Message-ID: <024b01c83c16$10ae61f0$977aa8c0@M90> Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Tue Dec 11 11:07:52 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 12:07:52 -0500 Subject: [dba-VB] Codesmith trials and tribulations In-Reply-To: References: <200712111508.lBBF83se028103@databaseadvisors.com><024a01c83c12$97df97b0$977aa8c0@M90> Message-ID: <024c01c83c18$5e1d7690$977aa8c0@M90> Yea, yea, yea. And I actually do believe that. However think of this from my perspective. It is just me, sitting here in my office. I work to make money, if I don't do billable hours I do not get paid. No "salary", no employer who will pay me to come up to speed on how to do this. So I look at this and say WOW, if I could learn this I could make SO much more money because I could be so much more productive. And then I say WOW, there is no book, it will take me weeks to learn it, I don't have anyone else using it that I can pop into their cube and ask questions, and I have work to do so that Robbie and Allie can eat in January. BTW I spent 45 (non paid) minutes this morning JUST trying to download the thing. I had to get a user name in order to download it. I did that. Then it said it would take 15 minutes to set up the account (ever heard of computers guys?). Then I am poking around and tried a download. It wanted my email so I gave it. It said the email was in use. Uhhh... hmmm... MIGHT BE ME? Then I clicked "lost my password" because 15 minutes later no password had appeared in me email box. Then I get TWO emails, with TWO DIFFERENT (industrial strength, will resist the CIA) passwords, NEITHER OF WHICH work. In one place on the site it asks for my email and a password (neither of which works) and in another it asks for my USER NAME and password (neither of which works). And all of this to get a code generator to allow me to standardize my coding practices. HMMMMmmmmmmmm. Perhaps they need to use Codesmith? Or maybe the problem is that they DID use Codesmith? Scary to contemplate! So I replied to the email for the last password asking them to figure out what is wrong. 45 minutes wasted, and I haven't even managed to get in to see the documentation or download the trial software. 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: Tuesday, December 11, 2007 11:37 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte From cfoust at infostatsystems.com Tue Dec 11 12:16:57 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 10:16:57 -0800 Subject: [dba-VB] Open a filtered form In-Reply-To: <024b01c83c16$10ae61f0$977aa8c0@M90> References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 12:19:20 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 10:19:20 -0800 Subject: [dba-VB] Codesmith trials and tribulations In-Reply-To: <024c01c83c18$5e1d7690$977aa8c0@M90> References: <200712111508.lBBF83se028103@databaseadvisors.com><024a01c83c12$97df97b0$977aa8c0@M90> <024c01c83c18$5e1d7690$977aa8c0@M90> Message-ID: I have to admit that the developers don't use it, only our boss, who acts primarily as a project manager. The rest of us come along behind and fix the problems with it! LOL Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 9:08 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Codesmith trials and tribulations Yea, yea, yea. And I actually do believe that. However think of this from my perspective. It is just me, sitting here in my office. I work to make money, if I don't do billable hours I do not get paid. No "salary", no employer who will pay me to come up to speed on how to do this. So I look at this and say WOW, if I could learn this I could make SO much more money because I could be so much more productive. And then I say WOW, there is no book, it will take me weeks to learn it, I don't have anyone else using it that I can pop into their cube and ask questions, and I have work to do so that Robbie and Allie can eat in January. BTW I spent 45 (non paid) minutes this morning JUST trying to download the thing. I had to get a user name in order to download it. I did that. Then it said it would take 15 minutes to set up the account (ever heard of computers guys?). Then I am poking around and tried a download. It wanted my email so I gave it. It said the email was in use. Uhhh... hmmm... MIGHT BE ME? Then I clicked "lost my password" because 15 minutes later no password had appeared in me email box. Then I get TWO emails, with TWO DIFFERENT (industrial strength, will resist the CIA) passwords, NEITHER OF WHICH work. In one place on the site it asks for my email and a password (neither of which works) and in another it asks for my USER NAME and password (neither of which works). And all of this to get a code generator to allow me to standardize my coding practices. HMMMMmmmmmmmm. Perhaps they need to use Codesmith? Or maybe the problem is that they DID use Codesmith? Scary to contemplate! So I replied to the email for the last password asking them to figure out what is wrong. 45 minutes wasted, and I haven't even managed to get in to see the documentation or download the trial software. 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: Tuesday, December 11, 2007 11:37 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 11 12:25:15 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 11 Dec 2007 21:25:15 +0300 Subject: [dba-VB] Does anyone have In-Reply-To: Message-ID: <000001c83c23$2cf1b8a0$6401a8c0@nant> Hello Gustav, Yes, I do have my own home-made very light "framework", which I use to develop ASP.Net apps as well as other kinds of .NET Framework based apps... Most of the "plumbing" code and CRUD/lookup UDFs/SPs is generated from SPARX systems EA's meta data synchronized with MS SQL db and some simple manually prepared meta-data... Generator is "home made" also... It's all multi-tiered/layered, quite effective way of application development with hundreds (thousands?) of custom classes and zero ADO.NET datasets... I didn't want to get bounded to any frameworks as CodeSmith or NHibernate or similar tools provide - hence in parallel with custom coding I have written my own light framework which I will be throwing away by pieces with MS technologies progressing making my home-made "framework exercises" obsolete... I did get the main ideas of this light framework from Marco Bellinaso book on ASP.NET, and then I expanded these ideas in the direction I needed to solve custom tasks... I also used quite some of my past experience to organize and keep simple custom meta-data... I do plan to add some parts to this "framework" from MS Enterpise Library, which is freely available on MS site... Etc... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 11, 2007 6:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. John W. Colby Colby Consulting www.ColbyConsulting.com From robert at webedb.com Tue Dec 11 13:41:25 2007 From: robert at webedb.com (Robert L. Stewart) Date: Tue, 11 Dec 2007 13:41:25 -0600 Subject: [dba-VB] Codesmith Woes In-Reply-To: References: Message-ID: <200712111943.lBBJgvbs021321@databaseadvisors.com> Where can I send VS 2005 project so we can get John's head placed properly on his anatomy? I have a simple one for both Win forms and Web forms. That uses Codesmith with netTiers. Sorry, but you have to use both, my opinion, for Codesmith to be usable for data layer stuff. If you place code at the base level in the generated code, you will always have the problem of it replace it. There is a level above that you have to put code into. It is never, at least they say never, replaced. John, everything has a learning curve. You just need to study between midnight and 4 AM like I do to keep up with the changing technology. :-) At 12:00 PM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 08:37:06 -0800 >From: "Charlotte Foust" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >It's wonderful for quickly regenerating a data tier after schema >changes, but we had to tweak the template to make sure it didn't throw >away the business rules we had added to our data entity classes. It's >very handy for generating the typeddatasets and basic NUnit tests >though. > >Charlotte > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby >Sent: Tuesday, December 11, 2007 8:27 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >And that is precisely my main complaint. I watched the demo and >codesmith generated SIX PROJECTS with tens of thousands of lines of code >in HUNDREDS of modules. Now what do I do when something doesn't work? >I didn't write the modules, nor the code. > > >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: Tuesday, December 11, 2007 11:18 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >Maybe, but while we use CodeSmith, we hand program around it. If we >didn't understand the concepts and how to implement them without the >tools, that wouldn't be possible. > >Charlotte Foust > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. >Stewart >Sent: Tuesday, December 11, 2007 7:06 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >For a less steep learning curve, use CodeSmith Tools and .netTiers. Give >you a great data layer. Think of it as Access on steroids as far as the >DAO layer in it is concerned. > >Robert From jwcolby at colbyconsulting.com Tue Dec 11 13:56:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 14:56:23 -0500 Subject: [dba-VB] Codesmith Woes In-Reply-To: <200712111943.lBBJgvbs021321@databaseadvisors.com> References: <200712111943.lBBJgvbs021321@databaseadvisors.com> Message-ID: <025101c83c2f$e87880c0$977aa8c0@M90> You may send it directly to me, attached to an email. If it is large I can create an FTP user / password for you to upload it to my web site. I went back to Codesmith's web site and asked for a THIRD password and that one works. So I am now able to log in and download the docs and stuff. As for getting my head properly placed on my anatomy, better folks than you have tried and failed. ;-) And finally as for midnight to 4... at my age I am finding it difficult to do that any more. Besides which I am back up at 7 to get the kids ready for school, and by the time I am done with that I have clients calling... Oh well. 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 Robert L. Stewart Sent: Tuesday, December 11, 2007 2:41 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Codesmith Woes Where can I send VS 2005 project so we can get John's head placed properly on his anatomy? I have a simple one for both Win forms and Web forms. That uses Codesmith with netTiers. Sorry, but you have to use both, my opinion, for Codesmith to be usable for data layer stuff. If you place code at the base level in the generated code, you will always have the problem of it replace it. There is a level above that you have to put code into. It is never, at least they say never, replaced. John, everything has a learning curve. You just need to study between midnight and 4 AM like I do to keep up with the changing technology. :-) At 12:00 PM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 08:37:06 -0800 >From: "Charlotte Foust" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >It's wonderful for quickly regenerating a data tier after schema >changes, but we had to tweak the template to make sure it didn't throw >away the business rules we had added to our data entity classes. It's >very handy for generating the typeddatasets and basic NUnit tests >though. > >Charlotte > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby >Sent: Tuesday, December 11, 2007 8:27 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >And that is precisely my main complaint. I watched the demo and >codesmith generated SIX PROJECTS with tens of thousands of lines of >code in HUNDREDS of modules. Now what do I do when something doesn't work? >I didn't write the modules, nor the code. > > >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: Tuesday, December 11, 2007 11:18 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >Maybe, but while we use CodeSmith, we hand program around it. If we >didn't understand the concepts and how to implement them without the >tools, that wouldn't be possible. > >Charlotte Foust > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. >Stewart >Sent: Tuesday, December 11, 2007 7:06 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >For a less steep learning curve, use CodeSmith Tools and .netTiers. >Give you a great data layer. Think of it as Access on steroids as far >as the DAO layer in it is concerned. > >Robert _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 14:07:02 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 15:07:02 -0500 Subject: [dba-VB] Open a filtered form In-Reply-To: References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: <025201c83c31$6550fe50$977aa8c0@M90> OK, but do you understand ADO enough to do it without all of that stuff? Let me say that I am not an ADO kinda guy yet, and then let me show you what I am up against. Here is some actual "example code" for doing this stuff: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Creating connection and command sting Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb" Dim sqlStr As String = "SELECT * FROM Employees" ' Create connection object Dim conn As OleDbConnection = New OleDbConnection(conStr) ' Create data adapter object Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) ' Create a dataset object and fill with data using data adapter's Fill method Dim ds As DataSet = New DataSet da.Fill(ds, "Employees") ' Attach dataset's DefaultView to the datagrid control DataGrid1.DataSource = ds.DefaultViewManager End Sub Now let me ask some questions so that you can perhaps understand how I am confused... >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) Does this actually LOAD the data? Why pass in strSQL if not? >da.Fill(ds, "Employees") This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Intellisense says that I am providing "srcTable" which would indicate that I am asking the data adapter to go look for "Employees" in SQL Server and fill DS with that. If that is the case then why did we do a "SELECT * FROM EMPLOYEES" in the SqlStr? This example is just a mess, and I haven't really found examples where they discuss what is actually happening in any depth. 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: Tuesday, December 11, 2007 1:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From cfoust at infostatsystems.com Tue Dec 11 14:17:11 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 12:17:11 -0800 Subject: [dba-VB] Open a filtered form In-Reply-To: <025201c83c31$6550fe50$977aa8c0@M90> References: <024b01c83c16$10ae61f0$977aa8c0@M90> <025201c83c31$6550fe50$977aa8c0@M90> Message-ID: 1. > >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) >>Does this actually LOAD the data? Why pass in strSQL if not? No it creates a new instance of an OleDbDataAdapter and sets the SQL it will use and the connection, that's all. The dataadapter is the conduit for loading the data into a dataset. 2. >>>da.Fill(ds, "Employees") >>This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Right, this is where the dataSET is filled USING the dataadapter's fill method. Employees is the name of the table in the dataadapter, which usually translates to the name of a table in the database, but not necessarily. A dataadapter can contain multiple tables, so you need to indicate which one to use. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 12:07 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form OK, but do you understand ADO enough to do it without all of that stuff? Let me say that I am not an ADO kinda guy yet, and then let me show you what I am up against. Here is some actual "example code" for doing this stuff: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Creating connection and command sting Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb" Dim sqlStr As String = "SELECT * FROM Employees" ' Create connection object Dim conn As OleDbConnection = New OleDbConnection(conStr) ' Create data adapter object Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) ' Create a dataset object and fill with data using data adapter's Fill method Dim ds As DataSet = New DataSet da.Fill(ds, "Employees") ' Attach dataset's DefaultView to the datagrid control DataGrid1.DataSource = ds.DefaultViewManager End Sub Now let me ask some questions so that you can perhaps understand how I am confused... >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) Does this actually LOAD the data? Why pass in strSQL if not? >da.Fill(ds, "Employees") This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Intellisense says that I am providing "srcTable" which would indicate that I am asking the data adapter to go look for "Employees" in SQL Server and fill DS with that. If that is the case then why did we do a "SELECT * FROM EMPLOYEES" in the SqlStr? This example is just a mess, and I haven't really found examples where they discuss what is actually happening in any depth. 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: Tuesday, December 11, 2007 1:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 15:52:18 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 16:52:18 -0500 Subject: [dba-VB] So much for codesmith Message-ID: <000001c83c40$1ac7bbd0$977aa8c0@M90> I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com From dwaters at usinternet.com Tue Dec 11 16:02:23 2007 From: dwaters at usinternet.com (Dan Waters) Date: Tue, 11 Dec 2007 16:02:23 -0600 Subject: [dba-VB] So much for codesmith In-Reply-To: <000001c83c40$1ac7bbd0$977aa8c0@M90> References: <000001c83c40$1ac7bbd0$977aa8c0@M90> Message-ID: <002101c83c41$822c20d0$0300a8c0@danwaters> Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 11 16:07:59 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 12 Dec 2007 01:07:59 +0300 Subject: [dba-VB] So much for codesmith In-Reply-To: <000001c83c40$1ac7bbd0$977aa8c0@M90> Message-ID: <000301c83c42$4a8be790$6401a8c0@nant> Hello John, The following tools look promising but I must say I didn't try them: http://www.llblgen.com/defaultgeneric.aspx http://www.codeauthor.org/ http://www.latticesoft.com/DesktopDefault.aspx?showLogin=N Have a look also at this post telling why CodeSmith (which you've just removed from your system) could be the best choice if you're not going to write your own tool like that yet wanted to have as flexible as possible (custom(-isable)) templates based code generator: http://forums.asp.net/t/757009.aspx HTH... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 12, 2007 12:52 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 16:17:22 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 17:17:22 -0500 Subject: [dba-VB] So much for codesmith In-Reply-To: <002101c83c41$822c20d0$0300a8c0@danwaters> References: <000001c83c40$1ac7bbd0$977aa8c0@M90> <002101c83c41$822c20d0$0300a8c0@danwaters> Message-ID: <000001c83c43$9b6322e0$977aa8c0@M90> LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From michael at ddisolutions.com.au Tue Dec 11 16:48:48 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 12 Dec 2007 09:48:48 +1100 Subject: [dba-VB] So much for codesmith References: <000001c83c40$1ac7bbd0$977aa8c0@M90><002101c83c41$822c20d0$0300a8c0@danwaters> <000001c83c43$9b6322e0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> Hi John, Wow! What a PITA... I gotta say though that when I eval'd it about a year ago I didn't have any problems. The nag screen came up when the tool loaded, asked you to either register or continue trial, that was it! Your not running Vista are you? It's a shame because you would have liked the netTiers stuff. My annoyance threshhold is about the same as yours these days so I would have binned it as well ;-) cheers Michael M To: dwaters at usinternet.com; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 18:24:58 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 19:24:58 -0500 Subject: [dba-VB] So much for codesmith In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> References: <000001c83c40$1ac7bbd0$977aa8c0@M90><002101c83c41$822c20d0$0300a8c0@danwaters><000001c83c43$9b6322e0$977aa8c0@M90> <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> Message-ID: <000601c83c55$6e267540$977aa8c0@M90> You know there is a shareware version (older), there is a basic version ($99) and there is an advanced version. The basic might not do what I was seeing because it does not integrate into VS 2005 at all, it is just standalone. Perhaps the nag only happens like that from inside of VS 2005? I never tried it standalone. 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 Michael Maddison Sent: Tuesday, December 11, 2007 5:49 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Hi John, Wow! What a PITA... I gotta say though that when I eval'd it about a year ago I didn't have any problems. The nag screen came up when the tool loaded, asked you to either register or continue trial, that was it! Your not running Vista are you? It's a shame because you would have liked the netTiers stuff. My annoyance threshhold is about the same as yours these days so I would have binned it as well ;-) cheers Michael M To: dwaters at usinternet.com; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ 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 From michael at ddisolutions.com.au Tue Dec 11 19:51:23 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 12 Dec 2007 12:51:23 +1100 Subject: [dba-VB] Open a filtered form References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> Hi John, Is this what you are looking for? I've done the sample as a parent child and used the absolute minimum of code. (4 lines C#) 1. Create blank project 2. Use menu to add Dataset, call it Orders. Project --> Add Class select Dataset from available items. 3. In Server Explorer add a OLEDB connection to Northwind. 4. Drag the Customers, Orders and the Order Details tables onto Orders.xsd (Dataset). If you want read only data then you can right click on the OrdersTableAdapter, Configure, Advanced, untick Generate Insert...etc 5. Save. 6. Go to form1, add DataSet from Toolbox, select Typed dataset from dialog, you should see the Dataset you just created. OK 7. Add 3 text boxes and a combo box to the form1. 8. Add a BindingSource to the form, select Orders1 as the datasource, Orders as the DataMember. 9. Add a BindingNavigator, set the BindingSource to BindingSource1. 10 Bind each of the textboxes. Select the textbox, in the properties window open the DataBindings Node. Click advanced, Binding: select bindingSource1 - OrderID Do the same for the other textboxes, notice the formatting options. 11. Add another BindingSource to form1, DataSource = orders1, DataMember = Customers 12. Binding the Combo. *Different to textbox... >From Combo properties select DataSource - bindingSource2 Go to the code view, in the Form1_Load event add... comboBox1.DataSource = this.bindingSource2; comboBox1.DisplayMember = "CompanyName"; comboBox1.ValueMember = "CustomerID"; comboBox1.DataBindings.Add( "SelectedValue", this.bindingSource1, "CustomerID" ); This completes the parent part of the form. Run the app. Child records will be shown in the DataGridView. 1. Add DataGridView to form. 2. Properties, DataSource, Drill into bindingSource1 and select order details (ordersOrderDetailsBindingSource). Done! Run the app. cheers Michael M Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 21:56:51 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 22:56:51 -0500 Subject: [dba-VB] Open a filtered form In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> References: <024b01c83c16$10ae61f0$977aa8c0@M90> <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> Message-ID: <000b01c83c73$07581da0$977aa8c0@M90> Well it certainly sounds like it. 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 Michael Maddison Sent: Tuesday, December 11, 2007 8:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form Hi John, Is this what you are looking for? I've done the sample as a parent child and used the absolute minimum of code. (4 lines C#) 1. Create blank project 2. Use menu to add Dataset, call it Orders. Project --> Add Class select Dataset from available items. 3. In Server Explorer add a OLEDB connection to Northwind. 4. Drag the Customers, Orders and the Order Details tables onto Orders.xsd (Dataset). If you want read only data then you can right click on the OrdersTableAdapter, Configure, Advanced, untick Generate Insert...etc 5. Save. 6. Go to form1, add DataSet from Toolbox, select Typed dataset from dialog, you should see the Dataset you just created. OK 7. Add 3 text boxes and a combo box to the form1. 8. Add a BindingSource to the form, select Orders1 as the datasource, Orders as the DataMember. 9. Add a BindingNavigator, set the BindingSource to BindingSource1. 10 Bind each of the textboxes. Select the textbox, in the properties window open the DataBindings Node. Click advanced, Binding: select bindingSource1 - OrderID Do the same for the other textboxes, notice the formatting options. 11. Add another BindingSource to form1, DataSource = orders1, DataMember = Customers 12. Binding the Combo. *Different to textbox... >From Combo properties select DataSource - bindingSource2 Go to the code view, in the Form1_Load event add... comboBox1.DataSource = this.bindingSource2; comboBox1.DisplayMember = "CompanyName"; comboBox1.ValueMember = "CustomerID"; comboBox1.DataBindings.Add( "SelectedValue", this.bindingSource1, "CustomerID" ); This completes the parent part of the form. Run the app. Child records will be shown in the DataGridView. 1. Add DataGridView to form. 2. Properties, DataSource, Drill into bindingSource1 and select order details (ordersOrderDetailsBindingSource). Done! Run the app. cheers Michael M Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From michael at ddisolutions.com.au Thu Dec 13 00:33:17 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 13 Dec 2007 17:33:17 +1100 Subject: [dba-VB] C# ArcObjects? References: <024b01c83c16$10ae61f0$977aa8c0@M90><59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> <000b01c83c73$07581da0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1F5@ddi-01.DDI.local> Anyone worked with this stuff willing to give a point in the right direction? I need to join a external standalone datatable (Access qry) to a featureclass and export the result to a shape file. O yeah, must use the runtime engine only :-/ cheers Michael M From robert at webedb.com Thu Dec 13 12:30:33 2007 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 13 Dec 2007 12:30:33 -0600 Subject: [dba-VB] C# ArcObjects? In-Reply-To: References: Message-ID: <200712131833.lBDIX4jn018207@databaseadvisors.com> I tried using them at one point and gave up. I use thinkgeo.com's Windows forms objects instead. There is more to creating the shape file than just exporting a query to one. At 12:00 PM 12/13/2007, you wrote: >Date: Thu, 13 Dec 2007 17:33:17 +1100 >From: "Michael Maddison" >Subject: [dba-VB] C# ArcObjects? >To: >Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1F5 at ddi-01.DDI.local> >Content-Type: text/plain; charset="us-ascii" > >Anyone worked with this stuff willing to give a point in the right >direction? >I need to join a external standalone datatable (Access qry) to a >featureclass and export the result to a shape file. >O yeah, must use the runtime engine only :-/ > >cheers > >Michael M > > > >------------------------------ > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb > > >End of dba-VB Digest, Vol 50, Issue 16 >************************************** From jwcolby at colbyconsulting.com Thu Dec 13 22:48:35 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 13 Dec 2007 23:48:35 -0500 Subject: [dba-VB] Expert VB 2005 Business Objects; Lhotka - was RE: [AccessD] Access or SQL Server Express to web In-Reply-To: <001201c83e0a$80401ea0$ef706c4c@jisshowsbs.local> References: <000301c83dcc$d8155ac0$6401a8c0@nant> <001201c83e0a$80401ea0$ef706c4c@jisshowsbs.local> Message-ID: <001401c83e0c$965c4c20$977aa8c0@M90> I have to say I like this book. This is the book that explains the CSLA framework. It is READABLE, it goes into just enough depth to explain the topic at hand, it explains the pros and cons of different strategies and why he chooses the strategies he chooses. Really quite a nice read for someone at my level to be able to start getting a handle on N tier, business objects, DALs and all that. Fascinating stuff on top of all that. He discusses business objects being passed between machines, and being able to modify the implementation using config files so that you can move the layers onto dedicated machines if necessary! Pretty cool stuff. I had always heard about this stuff but had no idea how they did that. Still don't, but at least I am grasping the concepts now. Recommended. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Thursday, December 13, 2007 11:34 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access or SQL Server Express to web ...I know this will get your goat but we've had over 150 users in mdb sourced pages simultaneously without a hick-up so far ...I'm in the process of moving to SQL Server because the load will get much larger in the next few months but so far, Drew has been right, Access mdbs can take a lot of abuse on the web ...of course I'll freely admit that its read only and I cache the hell out of it ...but still :) ...the web based apps all are hosted on shared win2K3 boxes w plenty of ram and dedicated app spaces. ...the largest intranet based app never has more than ten users in it and the average is probably less than five ...the servers are all Dell PE's w/ 2GB ram and large Raid5 HDs running SBS2003 Premium R2 ...pretty vanilla but I like vanilla in servers :) ...like I said, I cater to small business owners and tend to keep it simple ...something an ignorant lout like me can stay on top of :) ...btw, the MS ajax built into 3.5 works really well compared to that added on to 2.0 ...its a very noticeable difference imnsho, especially in the gridview ...the MS sponsored open-source 3.5 ajax controls toolkit version on the other hand, still has some performance problems with some of the controls ...two steps forward, one step back. William From jwcolby at colbyconsulting.com Sat Dec 15 08:55:54 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 15 Dec 2007 09:55:54 -0500 Subject: [dba-VB] Projects and solutions Message-ID: <004d01c83f2a$983b2b50$977aa8c0@M90> I am writing this set of applications that allow me to import and export data form SQL Server. My needs are somewhat complex in that I tend to need to import directories full of files, which could be CSV or flat files. All of the files need to import into the same table, or a single table needs to be exported into many files, going out to a single directory. Again, flat file or CSV. I also need to do this repetitively, i.e. I get disks every week that need to be imported into the same table, or I need to export the same table every couple of weeks. Thus I am have built a set of four fairly simple projects. Each has a similar structure, tables that define the import or export with information such as the source or target table, the source or target directory, the max file size if an export, the chunk size to import (for timing issues) on import, log files and tables to log the progress etc. So I built these four applications, and I now need to tie them together so that I can have a single control panel to start the applications, or to edit the tables that define an import or export job. My question is, should I pull all four of these into a single project or should I leave them out in their respective projects and just run them in place? If I should leave them as separate projects, what are the mechanics behind tying them into a solution? John W. Colby Colby Consulting www.ColbyConsulting.com From shamil at users.mns.ru Sat Dec 15 14:30:16 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Sat, 15 Dec 2007 23:30:16 +0300 Subject: [dba-VB] Projects and solutions In-Reply-To: <004d01c83f2a$983b2b50$977aa8c0@M90> Message-ID: <000001c83f59$4d835130$6401a8c0@nant> John, I'd put your four projects into four classlib projects and create another (FE dispatch) project and keep all of them within one solution... You can also have dedicated thread for every of the four projects/classlibs when you call them from FE project - that could make overall elapsed time to run all four of them (considerably) less if that is needed/possible at all to run all four of them in parallel... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 15, 2007 5:56 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Projects and solutions I am writing this set of applications that allow me to import and export data form SQL Server. My needs are somewhat complex in that I tend to need to import directories full of files, which could be CSV or flat files. All of the files need to import into the same table, or a single table needs to be exported into many files, going out to a single directory. Again, flat file or CSV. I also need to do this repetitively, i.e. I get disks every week that need to be imported into the same table, or I need to export the same table every couple of weeks. Thus I am have built a set of four fairly simple projects. Each has a similar structure, tables that define the import or export with information such as the source or target table, the source or target directory, the max file size if an export, the chunk size to import (for timing issues) on import, log files and tables to log the progress etc. So I built these four applications, and I now need to tie them together so that I can have a single control panel to start the applications, or to edit the tables that define an import or export job. My question is, should I pull all four of these into a single project or should I leave them out in their respective projects and just run them in place? If I should leave them as separate projects, what are the mechanics behind tying them into a solution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Mon Dec 17 15:41:00 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 00:41:00 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: <001401c840f5$843fd480$6401a8c0@nant> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn?t allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From wdhindman at dejpolsystems.com Tue Dec 18 02:13:10 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 18 Dec 2007 03:13:10 -0500 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <002801c8414d$d4c8dd40$ef706c4c@jisshowsbs.local> ...if you control the server then you can install the MS limitlogin script to manage this. ...if you have to do it from asp.net I'd think setting the session username to null and then calling session abandon on logout would kill the current session data so a second login with the same username would be moot ...or not :) ...haven't had a need to do anything like this so I'm not sure what you're looking for here. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Tue Dec 18 02:23:39 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 18 Dec 2007 03:23:39 -0500 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 03:02:57 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 10:02:57 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From shamil at users.mns.ru Tue Dec 18 03:03:18 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 12:03:18 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when thisloginis in use in active session? In-Reply-To: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> Message-ID: <000001c84154$d5601000$6401a8c0@nant> Yes, William, the article you refer is the closest to what I'm hunting for... (BTW, what Google(?) search criteria did you use to find it - I missed it when looking for such information in Google) Yes, this is the closest to what I'm looking for but still it isn't what I need I think (but it looks like there is no other more close solution)... In fact I planned to implement something like proposed by this article but still at least one(?) problem exists with this solution: - if a user will close the browser and then immediately will try to login using the same FormsAuthentication credentials then he will be "kicked-out" every time until Cache object simulating Session_End expires... That's not a big issue(?) - a user will have to wait between 15 and 30 minutes to login again - usual session time-out... But I anticipate "angry users" calls if that solution implemented... I can try to use an IP of a user trying to login and compare it with IP stored with the info on cached login, which isn't yet expired - and if it's not then I can use SetAuthCookie (using session cookie stored in my session object to "catch" live session) but then here is another "use case": user has a couple of PCs on his desktop, he closes browser on one of them and thus leave his session active on server side until time out happens, and then this user tries to login using the same credentials from another PC but he will be "kicked out" because there is no expired session information simulated in custom Cache object, which will be there until this Cache object expires... Sorry for such a "hectic" e-mail but it looks like (and the article you referred approves(?) that) - it looks like this simple(?) issue doesn't have a satisfactory solution covering all of/most of the possible use cases... Going circles here... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Tuesday, December 18, 2007 11:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when thisloginis in use in active session? http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 04:30:25 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 13:30:25 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how topreven using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <000301c84161$0078f7a0$6401a8c0@nant> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 05:10:09 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 12:10:09 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil > Am I missing simple solution of the subject issue? Or maybe I am ...? The difference is that I have only made some careful thoughts about this for an upcoming application, while you are actively dealing with real code and test. In the scenario you describe, which is very likely to happen, at the second login the user would need to make a choice. If he choses to keep the new session, your app kills the first. At the third login, if he choses to keep that, the second session (and the first if still alive) would be killed by the app. On the other hand, if he cancels new a login, the previous session will not be affected while the new session will be killed (message: Login cancelled, session closed). Of course, the browser windows will not close, but if he tries to operate the first or second session, a page will be displayed telling that the session has been closed. If this is not possible, please tell. /gustav >>> shamil at users.mns.ru 18-12-2007 11:30 >>> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From Gustav at cactus.dk Tue Dec 18 05:48:04 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 12:48:04 +0100 Subject: [dba-VB] How to download full (admin) .Net 3.0 SP1 Message-ID: Hi all Had a struggle to find this out: http://go.microsoft.com/fwlink/?LinkId=98105 That was shown here: http://blogs.msdn.com/aaronru/archive/2007/12/13/creating-net-framework-3-0-sp1-redist.aspx The official page only carries the small download bootstrapper. The full package is 25.6 MB. /gustav From accessd at shaw.ca Tue Dec 18 08:29:34 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:29:34 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <001401c840f5$843fd480$6401a8c0@nant> References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <9D3F9F3ECCFD42ABAB2DD7A8D1A94195@creativesystemdesigns.com> Hi Shamil: The login limitations are set at the server end. Everything from who can login, when they can login, how long they can login for, what can be accessed when login is obtained, the level of password complexity and even if they can login in more than once. This is all set at the Server login using roles, groups and policies. The user can be confronted at the splash or landing page to login and from the login the user ability is controlled from the server. That is the server's role and not the responsibility of the presentation section of the application whether desktop of browser. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Monday, December 17, 2007 1:41 PM To: 'Access-D - VB' Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 08:39:15 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:39:15 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when this loginis in use in active session? In-Reply-To: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> References: <001401c840f5$843fd480$6401a8c0@nant> <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> Message-ID: <97764B4BA3C04701A0BA325C688FB2A0@creativesystemdesigns.com> The link is a great piece and example of code, William. The one comment I make about the code sample is that a large professional site should never use 'sa' login style; they should use user groups or windows authentication instead. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Tuesday, December 18, 2007 12:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when this loginis in use in active session? http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From accessd at shaw.ca Tue Dec 18 08:57:47 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:57:47 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: References: Message-ID: The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 08:58:45 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 15:58:45 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Jim So how would you approach this? /gustav >>> accessd at shaw.ca 18-12-2007 15:57 >>> The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From shamil at users.mns.ru Tue Dec 18 09:52:05 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 18:52:05 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: Message-ID: <004201c8418d$f1d15080$6401a8c0@nant> Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 09:52:05 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 18:52:05 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <004101c8418d$f17dd950$6401a8c0@nant> Hello Gustav, The subject issue sounds simple but it looks like it doesn't have a "perfect" solution: there are so many issues involved here starting from usability, scalability, stateless/stateful apps, current context,....., and ending in application access roles, membership and security - there are so many that issues that we can discuss them here endlessly - my Internet search from yesterday evening and this day gave me many sometimes contradictory "hints" that I must say I should abandon all of them and just use "common sense" here: agree with customer what way to solve the subject issue suites my customer best of all and just implement it: - we currently agreed it's not a problem for a user to wait for 15-30 minutes for an abandoned session to expire, and for testing purposes I will have "killing" functionality implemented - later on when all the other custom functionality will be ready I will try to find out is it possible to release this "killing sessions" functionality for user mode system access - if that will not look hazardous to the system consistency then I will adjust and release this "session killing" functionality... (the apps under development does have a part talking to the external Credit Card processing provider/server - and this is two/three steps process which should be better not interrupted at least when external server talks back to our app which should process this answer in one go: yes, I can program it that way but better later than now because as usual time frame to finish development and release the first public version is very strict... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 2:10 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil > Am I missing simple solution of the subject issue? Or maybe I am ...? The difference is that I have only made some careful thoughts about this for an upcoming application, while you are actively dealing with real code and test. In the scenario you describe, which is very likely to happen, at the second login the user would need to make a choice. If he choses to keep the new session, your app kills the first. At the third login, if he choses to keep that, the second session (and the first if still alive) would be killed by the app. On the other hand, if he cancels new a login, the previous session will not be affected while the new session will be killed (message: Login cancelled, session closed). Of course, the browser windows will not close, but if he tries to operate the first or second session, a page will be displayed telling that the session has been closed. If this is not possible, please tell. /gustav >>> shamil at users.mns.ru 18-12-2007 11:30 >>> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 10:20:54 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 17:20:54 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time fr Message-ID: Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... From shamil at users.mns.ru Tue Dec 18 11:02:13 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 20:02:13 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr In-Reply-To: Message-ID: <004601c84197$bcb932a0$6401a8c0@nant> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 11:27:12 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 18:27:12 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil Oh, that is a nightmare. I just opened three tabs (it's me at 213.150.48.58) and the only parameter changing is Page View Count. And that counts up also if the user requests a refresh of the browser window! And it counts down as the sessions time out. Not very useful. So now what? Could a client side GUID be generated that was recorded at server side? Sadly, I have little time to work intensively with this right now - a web session on the new MySQL Falcon engine is approaching - but count me in if you need further testing - it would be really nice to find out how to deal with this issue which will pop up again and again. /gustav >>> shamil at users.mns.ru 18-12-2007 18:02 >>> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... From accessd at shaw.ca Tue Dec 18 13:31:16 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 11:31:16 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: References: Message-ID: <1A5EB2DC14054A6CBC3C398270F7597B@creativesystemdesigns.com> Hi Gustav: I think someone should either be stopped at the login or allowed to on. By setting the policies on a group of users, through the Group Policy Management Console (GPMC), added/attaching the group to the SQL Server > Security > Logins section. Within GPMC the login ability of a group can set to only one active session at a time. In effect the MS SQL server is managing rights of the user. (I have not checked to see whether this ability is extended to SQL Server Express but I am almost positive it is...) Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 6:59 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Jim So how would you approach this? /gustav >>> accessd at shaw.ca 18-12-2007 15:57 >>> The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 13:51:18 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 11:51:18 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <004201c8418d$f1d15080$6401a8c0@nant> References: <004201c8418d$f1d15080$6401a8c0@nant> Message-ID: <15EBF9201DFA4F2E823608B7104BF6B4@creativesystemdesigns.com> Hi Shamil: Looks like a good plan. If the web server is either IIS there is a default web site inactivity session timeout of between 120 and 200 seconds. That can be set to any value, like 10 minutes or 600 seconds when the "Ebable HTTP Keep-Alives" turned off (un-checked). So if there is no activity for an extended period of time the connection and session is closed. There are a number of other settings that can be set on the IIS to control duration; See: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3 1a2f39c-4d59-4cba-905c-60e7af657e49.mspx?mfr=true for details. If you tune up IIS for your application/web site that should handle most events. Do you have access to the BE server? Is this what you are looking for? Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 7:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 14:06:10 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 12:06:10 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr In-Reply-To: <004601c84197$bcb932a0$6401a8c0@nant> References: <004601c84197$bcb932a0$6401a8c0@nant> Message-ID: <0B14524FF51E40968C9C3895FB534E2B@creativesystemdesigns.com> That is a good article... Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 9:02 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <000401c841d8$ea5f88d0$6401a8c0@nant> Hi Gustav, It looks like I have found a rather generic solution - here it's: Requirements: ------------- Allow ===== - to have multiple tabs opened for a browser instance for a logged-in user: all tabs will share the same login and Session id (this login/sessionId sharing is a feature by design of browsers, ASP.NET, forms authentication, custom functionality) - a session of an abandoned browser to expire in 15-30 minutes and then another session can be started with the same login or - "optionally kill" active login's session - first informing the user trying to use login, which is currently used in an active session that his attempt will "kill" active session, which he probably abandoned (by mistake) without explicit logout ... Prevent ======= - to use the same login with another instance of a browser running on the same PC; - to use the same login on another PC, while this login is active (logged-in) somewhere else; - running (loading, rendering web page) by copying & pasting URL from one tab's window to another tab within one browser instance or to another browser instance... To implement above requirements I plan to: ------------------------------------------ Before navigating to a URL with my Web App: =========================================== - prepare context parameters to put them in the URL's QueryString to keep initial rendering state/context for a Web Page to be navigated/transferred; - generate a unique hash for the QueryString using the following values: 1) Login name; 2) login timestamp - created on login and stored in Cache using login name as a key; 3) The session navigation step Id (navid) - unique sequential number incremented for every Redirect/Transfer and kept on the Session level; 4) SessionId (the fact is that Sessionid can be the same for logins/logouts for the same/other logins when these logins are happening in one browser instance...) This hash will be added to the QueryString together with navId; - make an URL with parameters and navigate/transfer to it; On page loading/building on server side I will: =============================================== - use generated hash to create Session[...] item key on page's first load within given context (!Page.IsPostback); - if the same query string will be used (copy & paste) on another *tab of the same browser instance* then I can check that this hash was already used (by reading Session[...] item) when rendering the first page and I will cancel rendering of the second's tab page.... - if the same query string will be used (copy & paste) on another *instance* of a browser then by recreating hash I will see that it will not fit the SessionId and I will cancel rendering page on the second browser instance... - IOW this hash will be a good measure to prevent compromising the QueryString values... - the Session[....] hash value has to be cleared out/saved in db when navigating to another URL, that will not always be possible, but that should be rare occasions and therefore I expect there will be not be that much "hanging abandoned hashes"... Additionally ============ - to prevent copied & pasted URL with QueryString parameters to be used within the same browser instance when first page is navigated out I can keep hash saved in the db table and this table's data used for the check described above. This table's data will be cleared when session ends/expires or this data can be used as a navigation audit trail... Summary ====== It looks like I covered all the possible variations - still the above solution is rather simple to implement and it's scalable... Currently I will just use QueryString to keep navigation context: QueryString is known as being an insecure for compromising attempts but because of the fact that I plan to add a hash to this QueryString in (the near) future I will keep it secure: and the hash calculation/check will be done in the generic part of my code as well as mentioned above navId caluclation, as well as keeping session login timeStamp in Cache[...], as well as keeping page rendering hash in Session[...], as well as clearing Session[...] hash/saving it in DB when navigating out or when session gets expired... Final note: =========== Originally I planned to stop using QueryString because it's commonly accepted as insecure but the solution above allows me (?) to continue using it (QueryString) without that much additional efforts and having it good enough secured (I have a Web app under development, which has different user contexts depending on roles and these contexts' can be dynamically changed without logging-out/-in, and users are rather inexperienced, and this application have to communicate with external credit card processing server, and this application should have easy navigation, and this application should place consistent orders, which are generated from shopping cart(s)' items, which in turn are collected in different contexts in which e.g. a user can be an admin making an order for a customer who in turn purchases a service for another customer who should be able to see this to be purchased service as owned by his account when purchase completes but the first customer should have this service paid from his accountetc... Because of this relative complexity of the app I looked for a solution, which is presented above, which isn't contradictory (?) and which is not that a big issue to implement generic way.... Being here now I will probably even weaken the requirement stating to not let an URL with QueryString parameters to be copied & pasted and activated (corresponding page loaded/rendered) within tabs of one browser instance: I will let to do that except just one case when application redirects to an external credit cards processing service - this service should be redirected only once within check-out process and until it calls back transaction is not finished... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 8:27 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil Oh, that is a nightmare. I just opened three tabs (it's me at 213.150.48.58) and the only parameter changing is Page View Count. And that counts up also if the user requests a refresh of the browser window! And it counts down as the sessions time out. Not very useful. So now what? Could a client side GUID be generated that was recorded at server side? Sadly, I have little time to work intensively with this right now - a web session on the new MySQL Falcon engine is approaching - but count me in if you need further testing - it would be really nice to find out how to deal with this issue which will pop up again and again. /gustav >>> shamil at users.mns.ru 18-12-2007 18:02 >>> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr In-Reply-To: <0B14524FF51E40968C9C3895FB534E2B@creativesystemdesigns.com> Message-ID: <000b01c841d8$eb90b5d0$6401a8c0@nant> Yes, I agree, the author - Faisal Khan - wrote really good article and made a very useful and well running sample for it. Here I found another interesting article by the same author: http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 11:06 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr That is a good article... Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 9:02 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <15EBF9201DFA4F2E823608B7104BF6B4@creativesystemdesigns.com> Message-ID: <001201c841d8$ec163980$6401a8c0@nant> Hi Jim, I need to find a solution independent on the fact do I have available dedicated Windows/IIS/ASP.NET server or my/my customers' web app run on a hosted windows/asp.net server, which could not have available for me options to fine tune IIS attributes/properties... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 10:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil: Looks like a good plan. If the web server is either IIS there is a default web site inactivity session timeout of between 120 and 200 seconds. That can be set to any value, like 10 minutes or 600 seconds when the "Ebable HTTP Keep-Alives" turned off (un-checked). So if there is no activity for an extended period of time the connection and session is closed. There are a number of other settings that can be set on the IIS to control duration; See: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3 1a2f39c-4d59-4cba-905c-60e7af657e49.mspx?mfr=true for details. If you tune up IIS for your application/web site that should handle most events. Do you have access to the BE server? Is this what you are looking for? Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 7:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 _______________________________________________ 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 From Gustav at cactus.dk Wed Dec 19 05:21:01 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 19 Dec 2007 12:21:01 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Message-ID: Hi Shamil Thanks for that link - looks extremely On Topic, and for your comprehensive thoughts in the other mail. I'll have to study them carefully at some later after-office hours ... /gustav >>> shamil at users.mns.ru 19-12-2007 01:48 >>> Yes, I agree, the author - Faisal Khan - wrote really good article and made a very useful and well running sample for it. Here I found another interesting article by the same author: http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 -- Shamil From wdhindman at dejpolsystems.com Wed Dec 19 11:07:45 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 19 Dec 2007 12:07:45 -0500 Subject: [dba-VB] ASP.NEt 2.0: FormsAuthentication:how to prevent usingthe same login *second* time fr References: <000b01c841d8$eb90b5d0$6401a8c0@nant> Message-ID: <001601c84261$ad4b3ff0$ef706c4c@jisshowsbs.local> ...that's a very useful resource site ...tks William ----- Original Message ----- From: "Shamil Salakhetdinov" To: Sent: Tuesday, December 18, 2007 7:48 PM Subject: Re: [dba-VB] ASP.NEt 2.0: FormsAuthentication:how to prevent usingthe same login *second* time fr > Yes, I agree, the author - Faisal Khan - wrote really good article and > made > a very useful and well running sample for it. > > Here I found another interesting article by the same author: > http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 > > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Tuesday, December 18, 2007 11:06 PM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > usingthe same login *second* time fr > > That is a good article... Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil > Salakhetdinov > Sent: Tuesday, December 18, 2007 9:02 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > usingthe same login *second* time fr > > Hi Gustav, > > OK, killing session when simultaneous FormsAutentication login with the > same > credentials happens or wait 20 minutes this is one "programmers' > nightmare" > issue, and here is another one: > > - in IE7 (or FireFox 2.x +) you can open several tabs in one browser > instance and then all these tabs' windows will share the same session... > > How about that "nightmare"? > > I have got deployed here > > http://shamils-4.hosting.parking.ru/Sessions > > a sample from this article > > http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 > > > by setting session time-out for three minutes > > mode="InProc" > cookieless="AutoDetect" > timeout="3" /> > > just for testing purposes to see how sessions expire and how one browser's > instance tabs share the same session ID... > > Now imagine a Web app having context (i.e. some internal state) and a user > opening several tabs in one browser instance and copying and pasting URL > "to > see what happens" or to maybe do several tasks with the same Web app > having > issues the *same* session Ids for one login, which could be working on one > task when this user switches and prepares another. When > FormsAuthentication > added then user *will not* need to login again if he copy and paste URLs > in > windows of the different tabs of the same browser instance... > > Server side app will not be aware how many windows are opened on client > side > without special measures... > > What those measures should be to differentiate calls coming from different > windows having the same URL, same session Id, same Forms Authentication > cookie? > > I currently see the only "simple" solution to have hidden HTML field(s) > with > some IDs for every page returned from server to browser, and when browser > posts back such page then this ID expires and is changed to another, and > server side app has to keep track of these custom IDs, and when they are > sent via callback remove them etc. > > ... > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, December 18, 2007 7:21 PM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > using > the same login *second* time fr > > Hi Shamil > > That was my thoughts and conclusion. > And it does have that complication. However, at _any_ time the user can > "pull the plug" - in many ways with or without intention. I think that's > the > programmer's nightmare all the time to consider "what happens at this > point > if the user session is killed?". The user may loose data typed in, but the > app should not crash and stored data should not get corrupted. > > Further, you cannot educate users to always logout clicking a button. As > the > good guy I am I always try to do so, but in Hotmail you are redirected to > msn.com which I hate, thus I always close a Hotmail session by clicking > the > close button of the window, and most users will do as well as they forget > or > don't understand why not to do so. > > Also, your client must be really nice and patient! Keeping a user logged > out > for about 20 minutes if something happens will not raise popularity among > users. Again, users are impatient and will not understand why they can not > just log in again. > > /gustav > >>>> shamil at users.mns.ru 18-12-2007 16:52 >>> > > > > ...the most user-friendly looks like to "kill" existing session when a > login > with the same FormsAuthentication credentials happens - this should be a > rare occasion after all and this will not force users to wait until > session > time-out expires... > > ...the only complication for the latter approach is that Web application > keeping some state information should be ready to be "killed" any time - I > mean when they get "killed" they shouldn't leave the system and back-end > database in inconsistent state - the "killer: should be able to "catch-on" > on the session it "kills"... > > ...yes, I know web applications should be better programmed completely > stateless - trying to achieve that here but not yet there - have to > convince > customer to change the ways they usually work with desktop apps - I mean > to > not expect the same "stateful" behavior from Web apps because "it's all > two > blades sword" - you gain in one feature/functionality/usability issue - > you > loose in another... > > > > > _______________________________________________ > 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 > > _______________________________________________ > 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 > From newsgrps at dalyn.co.nz Thu Dec 20 20:27:15 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 15:27:15 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <200712071829.lB7ISxDd021422@databaseadvisors.com> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> Message-ID: <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Group, I couldn't work out how this could be done so I am trying the group again. I am using VB.net in Visual Studio 2005. This is a web application. I have code that gets the path and name of a pdf file located on a server. What I want to do within the code is have a file download box open which gives the user an option of opening or saving the PDF file. The Process class doesn't deem to help because it tries to open the file on the web server (and not the user's). My.Computer.Network.DownloadFile Method seems to require a destination path and filename, but I don't want it to automatically be saved. Regards David Emerson Dalyn Software Ltd Wellington, New Zealand From michael at ddisolutions.com.au Thu Dec 20 20:42:31 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 21 Dec 2007 13:42:31 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> Hi David, I guess the links I sent you didn't do the job then... How about 2 links on the page, 1 to the pdf that will open it in the browser. The other to a zip of the pdf that can be downloaded. Too simple? ;-) cheers Michael M -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Friday, 21 December 2007 1:27 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Group, I couldn't work out how this could be done so I am trying the group again. I am using VB.net in Visual Studio 2005. This is a web application. I have code that gets the path and name of a pdf file located on a server. What I want to do within the code is have a file download box open which gives the user an option of opening or saving the PDF file. The Process class doesn't deem to help because it tries to open the file on the web server (and not the user's). My.Computer.Network.DownloadFile Method seems to require a destination path and filename, but I don't want it to automatically be saved. Regards David Emerson Dalyn Software Ltd Wellington, New Zealand _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 20 20:56:52 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 15:56:52 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> Message-ID: <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Michael, I looked at the two links. The first got me in the right direction but didn't provide a direct solution. The second one was an addon for Firefox which most of the users don't have. However, I have found a couple of links that might solve the problem: http://www.west-wind.com/WebLog/posts/76293.aspx http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_Dialog David At 21/12/2007, you wrote: >Hi David, > >I guess the links I sent you didn't do the job then... > >How about 2 links on the page, 1 to the pdf that will open it in the >browser. >The other to a zip of the pdf that can be downloaded. > >Too simple? ;-) > >cheers > >Michael M > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:27 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Group, > >I couldn't work out how this could be done so I am trying the group >again. > >I am using VB.net in Visual Studio 2005. This is a web application. I >have code that gets the path and name of a pdf file located on a server. >What I want to do within the code is have a file download box open which >gives the user an option of opening or saving the PDF file. > >The Process class doesn't deem to help because it tries to open the file >on the web server (and not the user's). > >My.Computer.Network.DownloadFile Method seems to require a destination >path and filename, but I don't want it to automatically be saved. > > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > >_______________________________________________ >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 From michael at ddisolutions.com.au Thu Dec 20 22:23:12 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 21 Dec 2007 15:23:12 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET References: <200712071829.lB7ISxDd021422@databaseadvisors.com><20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> Looking through the comments from http://www.west-wind.com/WebLog/posts/76293.aspx it appears that Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") ); will fail in some circumstances... one of the many reasons I prefer working with desktop apps. good luck! Michael M From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Friday, 21 December 2007 1:57 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Michael, I looked at the two links. The first got me in the right direction but didn't provide a direct solution. The second one was an addon for Firefox which most of the users don't have. However, I have found a couple of links that might solve the problem: http://www.west-wind.com/WebLog/posts/76293.aspx http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_ Dialog David At 21/12/2007, you wrote: >Hi David, > >I guess the links I sent you didn't do the job then... > >How about 2 links on the page, 1 to the pdf that will open it in the >browser. >The other to a zip of the pdf that can be downloaded. > >Too simple? ;-) > >cheers > >Michael M > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:27 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Group, > >I couldn't work out how this could be done so I am trying the group >again. > >I am using VB.net in Visual Studio 2005. This is a web application. I >have code that gets the path and name of a pdf file located on a server. >What I want to do within the code is have a file download box open >which gives the user an option of opening or saving the PDF file. > >The Process class doesn't deem to help because it tries to open the >file on the web server (and not the user's). > >My.Computer.Network.DownloadFile Method seems to require a destination >path and filename, but I don't want it to automatically be saved. > > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > >_______________________________________________ >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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 20 23:03:34 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 18:03:34 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> Message-ID: <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> I looked and couldn't see the problems you were referring to. My app seems to work ok (fingers crossed). The only problem I have now is that if I want two different PDF's downloaded they can't be done. The reason seems to be that Respond.End() ends the scripting of the page. Here is my code (simplified): boolRPXReport = False Dim split As String() = strReportNoList.Split(New [Char]() {"|"c}) Dim strReportNo As String For Each strReportNo In split 'Code here gets values for strReportType intReport = CInt(strReportNo) If strReportType <> "pdf" Then 'Code here gets ActiveReport and adds it to rptCombined.Document boolRPXReport = True Else 'If the report is already a PDF then it should be downloaded separately Response.ContentType = "Application/pdf" Response.AppendHeader("Content-Disposition", "attachment; filename=" + strReportFile + ".pdf") Response.TransmitFile("D:\PDFFiles\" + strReportFile + ".pdf") Response.End() End If Next strReportNo If boolRPXReport = True Then 'Download the combined report PDF If Me.PdfExport1 Is Nothing Then Me.PdfExport1 = New DataDynamics.ActiveReports.Export.Pdf.PdfExport End If Me.PdfExport1.Export(rptCombined.Document, m_stream) m_stream.Position = 0 Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment; filename=PVPBlankReports.pdf") Response.BinaryWrite(m_stream.ToArray()) Response.End() End If Is there any way for the code to continue processing each strReportNo even after one PDF has been downloaded? David At 21/12/2007, you wrote: >Looking through the comments from >http://www.west-wind.com/WebLog/posts/76293.aspx it appears that >Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") ); >will fail in some circumstances... one of the many reasons I prefer >working with desktop apps. > >good luck! > >Michael M > >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:57 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Michael, > >I looked at the two links. The first got me in the right direction but >didn't provide a direct solution. The second one was an addon for >Firefox which most of the users don't have. > >However, I have found a couple of links that might solve the problem: > >http://www.west-wind.com/WebLog/posts/76293.aspx > >http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_ >Dialog > >David > > > >At 21/12/2007, you wrote: > >Hi David, > > > >I guess the links I sent you didn't do the job then... > > > >How about 2 links on the page, 1 to the pdf that will open it in the > >browser. > >The other to a zip of the pdf that can be downloaded. > > > >Too simple? ;-) > > > >cheers > > > >Michael M > > > >-----Original Message----- > >From: dba-vb-bounces at databaseadvisors.com > >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson > >Sent: Friday, 21 December 2007 1:27 PM > >To: dba-vb at databaseadvisors.com > >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > > > >Group, > > > >I couldn't work out how this could be done so I am trying the group > >again. > > > >I am using VB.net in Visual Studio 2005. This is a web application. I > > >have code that gets the path and name of a pdf file located on a >server. > >What I want to do within the code is have a file download box open > >which gives the user an option of opening or saving the PDF file. > > > >The Process class doesn't deem to help because it tries to open the > >file on the web server (and not the user's). > > > >My.Computer.Network.DownloadFile Method seems to require a destination > >path and filename, but I don't want it to automatically be saved. > > > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand From accessd at shaw.ca Mon Dec 24 11:21:38 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Mon, 24 Dec 2007 09:21:38 -0800 Subject: [dba-VB] Ot Christmas In-Reply-To: <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: Hi All: At the risk of being politically incorrect: Merry Christmas and a Happy New Year to the best list on the Internet... :-) Best Regards Jim From wdhindman at dejpolsystems.com Mon Dec 24 11:43:25 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 24 Dec 2007 12:43:25 -0500 Subject: [dba-VB] Ot Christmas References: <200712071829.lB7ISxDd021422@databaseadvisors.com><20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local><20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local><20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <001901c84654$7ccbfe40$ef706c4c@jisshowsbs.local> ...and a very pc holiday season to you and yours :) William ----- Original Message ----- From: "Jim Lawrence" To: Sent: Monday, December 24, 2007 12:21 PM Subject: [dba-VB] Ot Christmas > Hi All: > > At the risk of being politically incorrect: > > Merry Christmas and a Happy New Year to the best list on the Internet... > :-) > > Best Regards > Jim > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From ridermark at gmail.com Mon Dec 24 14:55:07 2007 From: ridermark at gmail.com (Mark Rider) Date: Mon, 24 Dec 2007 14:55:07 -0600 Subject: [dba-VB] Ot Christmas In-Reply-To: References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: I thought the only PC part of this list was the machines we use to program! Merry Christmas! -- Mark Rider http://commonsensesecurity.info Try to learn something about everything and everything about something. - Thomas H. Huxley From jwcolby at colbyconsulting.com Wed Dec 26 10:04:48 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 26 Dec 2007 11:04:48 -0500 Subject: [dba-VB] VB.Net "proxy" progress indicator Message-ID: <000901c847d9$0b076b10$977aa8c0@M90> I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com From max.wanadoo at gmail.com Wed Dec 26 10:27:44 2007 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 26 Dec 2007 16:27:44 -0000 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <002901c847dc$3ec7ae30$8119fea9@LTVM> John, My EATBloat shows progess of import/export of Access object (Forms, Queries, etc) (A3k). I am sure that you could adapt that to your files. You can get to it from here if it is of any use: www.peoplelinks.co.uk/msaccess Max -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 4:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Wed Dec 26 11:08:17 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 26 Dec 2007 20:08:17 +0300 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <000901c847e1$e8c8da30$6501a8c0@nant> Hello John, If you're sure your main code export/import will never be used in multi-threading scenarios then you can just use so called Delegates... But I'd propose you to try to implement multi-threading and use BackGroundWorker class - they both could help you to solve your task effectively and have your tasks completed quicker because of multi-threading - have a look at this article/book excerpt: http://www.albahari.com/threading/part3.html#_BackgroundWorker -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Wed Dec 26 11:08:48 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 26 Dec 2007 09:08:48 -0800 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> References: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: John, I'm not sure I followed all of that, but you might be able to simplify your life with a "ProxyHelper" class and separate classes for import and export. We tend to use objects like that to handle repetitive code for performing similar actions. We simply pass the appropriate objects into the helper class, which handles all the UI stuff like progress meters, message boxes, etc. For example, we have a TransferHelper class which calls into TranferImport, TransferExport, TransferByEmail, etc. We declare an instance of that class in the helper and use a structure to retrieve the results from the specific class, and we use those results to log the event, notify the user, etc. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 8:05 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Wed Dec 26 11:17:40 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 26 Dec 2007 20:17:40 +0300 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <000001c847e3$3843e0e0$6501a8c0@nant> Hi John, I addition to my previous posting here is delegates sample: using System; public delegate void LogHandler(string s); public class Process { public void Run(LogHandler lh) { lh("Start process"); //... lh("Stop process"); } } public class Tracer { public void Trace(string s) { System.Console.WriteLine("Tracer: {0}", s); } } public class Test { public static void Log(string s) { System.Console.WriteLine("static Log: {0}", s); } public static int Main(string[] args) { Process p = new Process(); Tracer t = new Tracer(); LogHandler lh = null; lh += new LogHandler(Log); lh += new LogHandler(t.Trace); p.Run(lh); return 0; } } And here is events sample (events is a subset of delegates in .NET Framework) using System; public delegate void LogHandler(string s); public class Process { public event LogHandler LogEvent = null; public void Run() { if (LogEvent != null) LogEvent("Start process"); //... if (LogEvent != null) LogEvent("Stop process"); } } public class Tracer { public void Trace(string s) { System.Console.WriteLine("Tracer: {0}", s); } } public class Test { public static void Log(string s) { System.Console.WriteLine("static Log: {0}", s); } public static int Main(string[] args) { Process p = new Process(); Tracer t = new Tracer(); p.LogEvent += new LogHandler(Log); p.LogEvent += new LogHandler(t.Trace); p.Run(); return 0; } } The samples above are from this page: http://www.math.msu.su/~vvb/2course/Borisenko/AddEdu/CSharp/CSharp.html but its "meat" text is in Russia therefore I copied and pasted code samples here... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Wed Dec 26 11:45:38 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 26 Dec 2007 12:45:38 -0500 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847e1$e8c8da30$6501a8c0@nant> References: <000901c847d9$0b076b10$977aa8c0@M90> <000901c847e1$e8c8da30$6501a8c0@nant> Message-ID: <001d01c847e7$20cb21e0$977aa8c0@M90> Yes, I want to use backgroundworker. The in some cases the process will really be: 1) The CSVExport process will export a table of tens of millions of records to a directory on an Address Validation Server (AVS), the AVS Input directory. 2) The Address Validation Server has a set of directories that it watches. As files appear in the watched directories the AVS starts to perform the address validation process on those files. 3) The AVS places address validation processed files into a set of matching output directories (one input / output pair), the AVS Output directory. 4) The CSVImport process will watch the AVS Output directory for that CSV process. As files appear in that directory it will import those files back in to SQL Server. So the entire process is an Out / AVS / In cycle. This cycle can be performed on many different tables. Each table needing AVS processing has a Spec record for the CSV OUT and a spec record for the CSV IN. I currently have five different tables of addresses needing validation, and the validation can occur on a timetable, perhaps once every three weeks etc, but the point is that it will eventually be totally automatic. A supervisor spawns a table AVS process that starts exporting data to the AVS, the AVS processes the data, and the results are imported back in again. Thus I really need (or should use) worked threads to handle the CSV export and import processes, for potentially N tables at a time, potentially "simultaneously". 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 Shamil Salakhetdinov Sent: Wednesday, December 26, 2007 12:08 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] VB.Net "proxy" progress indicator Hello John, If you're sure your main code export/import will never be used in multi-threading scenarios then you can just use so called Delegates... But I'd propose you to try to implement multi-threading and use BackGroundWorker class - they both could help you to solve your task effectively and have your tasks completed quicker because of multi-threading - have a look at this article/book excerpt: http://www.albahari.com/threading/part3.html#_BackgroundWorker -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From jwcolby at colbyconsulting.com Mon Dec 31 16:00:19 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 31 Dec 2007 17:00:19 -0500 Subject: [dba-VB] inheriting events Message-ID: <001c01c84bf8$89521650$657aa8c0@M90> I designed a base class which has events: Public Class clsProxyProgress Public Event evProcessName(ByVal strProcessName As String) Public Event evDirectory(ByVal strDirectory As String) Public Event evCurrentFile(ByVal strCurrentFile As String) Public Event evFilesCompleted(ByVal intFilesCompleted As Integer) Public Event evFileCnt(ByVal intFileCnt As Integer) Public Event evRowsCopied(ByVal intRowsCopied As Long) Public Event evStatus(ByVal strStatus As String) I then inherit that class in a child class. Public Class clsCSVDataExportSpec Inherits clsProxyProgress The child class clsCSVDataExportSpec cannot "see" the events in the parent, i.e. it cannot do: RaiseEvent evStatus(mstrStatus) even though its parent class has that event. If I try to do this in the child class I get a compile error. In order to get around this I created functions in the parent class clsProxyProgress Public Sub mStatus(ByVal strStatus As String, ByVal blnStatusReset As Boolean, ByVal blnStatusTimeStamp As Boolean) If blnStatusReset Then mstrStatus = "" If blnStatusTimeStamp Then mstrStatus = mstrStatus & vbCrLf & Now() End If If Len(mstrStatus) > 0 Then mstrStatus = mstrStatus & vbCrLf & strStatus Else mstrStatus = strStatus End If RaiseEvent evStatus(mstrStatus) End Sub NOTICE that in the last line of the sub I raise the evStatus. I then call this sub from the child clsCSVDataExportSpec so that the parent class clsProxyProgress raises the event for the child class. I do this simply because if I try to raise the event up in the parent class directly I get a compile error. The whole point of this stuff is to allow a form to sink events and display data in text boxes on the form. In a form class I dimension a variable for this child class: Private WithEvents fclsCSVDataExport As clsCSVDataExportSpec further down I "sink" the events for this class: Private Sub fclsCSVDataExport_evStatus(ByVal strStatus As String) Handles fclsCSVDataExport.evStatus txtStatus.Text = strStatus Application.DoEvents() End Sub In the "Handles ..." the evStatus is a choice in the intellisense dropdown, IOW this form's module "sees" the event that the child class fclsCSVDataExport inherits from its parent class clsProxyProgress. However the sub fclsCSVDataExport_evStatus() never receives control when the Raisevent is executed. I SUSPECT that the issue is that the "Handles ..." needs to be "Handles fclsProxyProgress", i.e. it needs to "handle" the parent of fclsCSVDataExport, not fclsCSVDataExport itself. fclsCSVDataExport is the actual class that performs the data export for me. clsProxyProgress only exists to allow several different such import / export classes inherit common events and code, and I do that so that I can (eventually) have a generic form that dimensions a clsProxyProgress rather than having a specific import or export class such as clsCSVDataExport or clsCSVDataImport. If anyone is following what I am doing and can point me to how to make this work it would be appreciated. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Dec 1 11:04:04 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 1 Dec 2007 12:04:04 -0500 Subject: [dba-VB] Converting the value in a field Message-ID: <005501c8343c$2deeb580$647aa8c0@M90> I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Dec 1 11:30:31 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 1 Dec 2007 12:30:31 -0500 Subject: [dba-VB] Ionforge Message-ID: <005601c8343f$e5533a40$647aa8c0@M90> Is anyone using Ionforge VCS? Like it? Easy to use, hard to use? Gotchas for .Net? Misc comments? John W. Colby Colby Consulting www.ColbyConsulting.com From bheid at sc.rr.com Sat Dec 1 15:37:10 2007 From: bheid at sc.rr.com (Bobby Heid) Date: Sat, 1 Dec 2007 16:37:10 -0500 Subject: [dba-VB] Converting the value in a field In-Reply-To: <005501c8343c$2deeb580$647aa8c0@M90> References: <005501c8343c$2deeb580$647aa8c0@M90> Message-ID: <001101c83462$5432e4c0$fc98ae40$@rr.com> Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun Dec 2 01:18:04 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 2 Dec 2007 02:18:04 -0500 Subject: [dba-VB] Converting the value in a field In-Reply-To: <001101c83462$5432e4c0$fc98ae40$@rr.com> References: <005501c8343c$2deeb580$647aa8c0@M90> <001101c83462$5432e4c0$fc98ae40$@rr.com> Message-ID: <005e01c834b3$7b3c5140$647aa8c0@M90> And which type is faster? CInt smells of VB6 compatibility code. 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 Bobby Heid Sent: Saturday, December 01, 2007 4:37 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Mon Dec 3 02:02:56 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 03 Dec 2007 09:02:56 +0100 Subject: [dba-VB] Weird table name restriction Message-ID: Hi John Does this from Sybase work: select valid_name("Object_name") http://manuals.sybase.com/onlinebooks/group-asarc/srg1100e/sqlref/@Generic__BookTextView/64305;pt=60135/* /gustav >>> jwcolby at colbyconsulting.com 30-11-2007 20:04:15 >>> I just discovered that SQL Server (or VB.Net) does not like dashes in table names. If I use a table name "ZIP4-AA_X", the BulkCopy.WriteToServer throws an error "can't access destination table" but if I remove the dash "ZIP4AA_X" it works just fine. The problem is that I take the name of the datafile, strip off the extension and use that as my table name. Thus I now have to start doing edits of the file name before I can use it as a field name. The hoops we have to jump through... John W. Colby Colby Consulting www.ColbyConsulting.com From DWUTKA at Marlow.com Mon Dec 3 09:22:59 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 09:22:59 -0600 Subject: [dba-VB] Reserved words In-Reply-To: <002f01c83389$497a0a10$647aa8c0@M90> Message-ID: Why not prepend all your tables with tbl? That would guarantee that you don't hit a reserved word. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, November 30, 2007 1:44 PM To: dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Reserved words Does anyone know if the reserved words in SQL Server (can't be used in table names etc) are in a table anywhere (in sql server)? I have code that builds tables and it really needs to check the proposed table name to make sure that the name isn't a reserved word, and that it does not have special characters. I have had TWO times now where I was hunting down errors caused by issues with what is valid in a table name. I could build a table of reserved words but if any new ones are added my list would be short. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From DWUTKA at Marlow.com Mon Dec 3 09:24:50 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 09:24:50 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From jwcolby at colbyconsulting.com Mon Dec 3 10:19:48 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 11:19:48 -0500 Subject: [dba-VB] Reserved words In-Reply-To: References: <002f01c83389$497a0a10$647aa8c0@M90> Message-ID: <00c901c835c8$53b82ed0$647aa8c0@M90> And that is what I am doing now. Thanks for the suggestion. 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 Drew Wutka Sent: Monday, December 03, 2007 10:23 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Reserved words Why not prepend all your tables with tbl? That would guarantee that you don't hit a reserved word. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, November 30, 2007 1:44 PM To: dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Reserved words Does anyone know if the reserved words in SQL Server (can't be used in table names etc) are in a table anywhere (in sql server)? I have code that builds tables and it really needs to check the proposed table name to make sure that the name isn't a reserved word, and that it does not have special characters. I have had TWO times now where I was hunting down errors caused by issues with what is valid in a table name. I could build a table of reserved words but if any new ones are added my list would be short. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 3 10:20:41 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 11:20:41 -0500 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: <00ca01c835c8$73699610$647aa8c0@M90> Kind of scary a computer that thinks like Susan. Even scarier people who would want to use a computer that thinks like Susan. ;-) 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 Drew Wutka Sent: Monday, December 03, 2007 10:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 3 10:29:05 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:29:05 -0800 Subject: [dba-VB] Ionforge In-Reply-To: <005601c8343f$e5533a40$647aa8c0@M90> References: <005601c8343f$e5533a40$647aa8c0@M90> Message-ID: I have used it in the past and liked it, but I haven't tried it with .Net. It's pretty easy to use. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 9:31 AM To: 'Access Developers discussion and problem solving'; dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Ionforge Is anyone using Ionforge VCS? Like it? Easy to use, hard to use? Gotchas for .Net? Misc comments? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 3 10:32:45 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:32:45 -0800 Subject: [dba-VB] Converting the value in a field In-Reply-To: <005e01c834b3$7b3c5140$647aa8c0@M90> References: <005501c8343c$2deeb580$647aa8c0@M90><001101c83462$5432e4c0$fc98ae40$@rr.com> <005e01c834b3$7b3c5140$647aa8c0@M90> Message-ID: I understand that all the Ctype functions boil down to the same thing under the hood and run about the same speed. The benefit of CType is that you can cast the object as just about anything, including custom objects. Don't recall being able to do that in VBA. ;} You can also use DirectCast if you are absolutely sure the object contains data and is the right type. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 11:18 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field And which type is faster? CInt smells of VB6 compatibility code. 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 Bobby Heid Sent: Saturday, December 01, 2007 4:37 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Converting the value in a field Hi John, Yes, CInt will work. As will: mintNumOfRecsToExport = Ctype(!EDS_FileSize,Integer) and mintNumOfRecsToExport = Convert.ToInt32(!EDS_FileSize) Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 01, 2007 12:04 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Converting the value in a field I have lines of code like this: mintNumOfRecsToExport = !EDS_FileSize The compile complains because !EDS_FileSize is an object (a field) and mintNumOfRecsToExport is an integer variable. The error is: Error 2 Option Strict On disallows implicit conversions from 'Object' to 'Integer'. There is no .Value property for the field object !EDS_FileSize. Will simply wrapping the object in CInt() fix the problem, or will I get an integer pointer to the object? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 10:33:49 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 08:33:49 -0800 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: <001401c833b4$365ccb40$4b3a8343@SusanOne> Message-ID: Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL From jwcolby at colbyconsulting.com Mon Dec 3 12:22:01 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 13:22:01 -0500 Subject: [dba-VB] Listing distinct values in field Message-ID: <00db01c835d9$66d83580$647aa8c0@M90> In my client's business he needs a "data dictionary" kind of thing which essentially tells him the valid values in any given field (for WHERE clause purposes). I receive CSV and fixed width files which I import into SQL Server. I need to give him a list of the fields and the valid values in each field (actual different data items). I will be writing such a widget if I can't find one already out there. Does anyone have such a widget or know where to find one? John W. Colby Colby Consulting www.ColbyConsulting.com From DWUTKA at Marlow.com Mon Dec 3 11:49:43 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 3 Dec 2007 11:49:43 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: Message-ID: I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. > Right! Those pesky, literal-minded computers! They insist on doing > what I tell them instead of what I WANT. LOL _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From cfoust at infostatsystems.com Mon Dec 3 13:00:30 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 11:00:30 -0800 Subject: [dba-VB] Weird table name restriction In-Reply-To: References: Message-ID: ROTFL Sort of like Susan? Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 9:50 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 7:25 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction They call such computers Macs.... ;) Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, November 30, 2007 6:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I have always wished for a computer that would do want I expect rather than what I tell it! ;) Ohhhhhhhh, why can't a computer think more like me, more like me, more like me.... Susan H. From ssharkins at gmail.com Mon Dec 3 13:11:53 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 3 Dec 2007 14:11:53 -0500 Subject: [dba-VB] Listing distinct values in field References: <00db01c835d9$66d83580$647aa8c0@M90> Message-ID: <00ad01c835e0$60baf230$4b3a8343@SusanOne> Well, for the meta data, I'll check out schema recordsets. I know that T-SQL can produce a unique sort, but off the top of my head, I don't remember the keyword. Susan H. > In my client's business he needs a "data dictionary" kind of thing which > essentially tells him the valid values in any given field (for WHERE > clause > purposes). I receive CSV and fixed width files which I import into SQL > Server. I need to give him a list of the fields and the valid values in > each field (actual different data items). I will be writing such a widget > if I can't find one already out there. > > Does anyone have such a widget or know where to find one? > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Mon Dec 3 15:57:22 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 16:57:22 -0500 Subject: [dba-VB] VS2005 Data Form Wizard Message-ID: <00e801c835f7$7c20d5a0$647aa8c0@M90> Does the Data Form Wizard no longer exist in VS 2005? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 3 16:19:26 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 3 Dec 2007 17:19:26 -0500 Subject: [dba-VB] Toolbox data objects Message-ID: <00ea01c835fa$91061450$647aa8c0@M90> My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX objects. I could swear I had used them sometime in the past. Any idea what is going on? Was this a previous version of VS? Need to include some object? help... John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 18:58:57 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 16:58:57 -0800 Subject: [dba-VB] VS2005 Data Form Wizard In-Reply-To: <00e801c835f7$7c20d5a0$647aa8c0@M90> References: <00e801c835f7$7c20d5a0$647aa8c0@M90> Message-ID: What data form wizard are you talking about, John? I must have missed that. 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 03, 2007 1:57 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VS2005 Data Form Wizard Does the Data Form Wizard no longer exist in VS 2005? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Dec 3 19:05:47 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 3 Dec 2007 17:05:47 -0800 Subject: [dba-VB] Toolbox data objects In-Reply-To: <00ea01c835fa$91061450$647aa8c0@M90> References: <00ea01c835fa$91061450$647aa8c0@M90> Message-ID: I don't have those objects in my toolbox, John. What are you trying to do? 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 03, 2007 2:19 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Toolbox data objects My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX objects. I could swear I had used them sometime in the past. Any idea what is going on? Was this a previous version of VS? Need to include some object? help... John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Mon Dec 3 21:51:20 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 3 Dec 2007 22:51:20 -0500 Subject: [dba-VB] Toolbox data objects References: <00ea01c835fa$91061450$647aa8c0@M90> Message-ID: <000501c83628$ef025b80$ef706c4c@jisshowsbs.local> ...I've removed vs'3 and vs'5 from my systems but those objects are not in the vs'8 toolset either. William ----- Original Message ----- From: "Charlotte Foust" To: Sent: Monday, December 03, 2007 8:05 PM Subject: Re: [dba-VB] Toolbox data objects >I don't have those objects in my toolbox, John. What are you trying to > do? > > 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 03, 2007 2:19 PM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Toolbox data objects > > My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX > objects. I could swear I had used them sometime in the past. > > Any idea what is going on? Was this a previous version of VS? Need to > include some object? help... > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > 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 > From wdhindman at dejpolsystems.com Mon Dec 3 22:42:55 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 3 Dec 2007 23:42:55 -0500 Subject: [dba-VB] Toolbox data objects References: <00ea01c835fa$91061450$647aa8c0@M90> <000501c83628$ef025b80$ef706c4c@jisshowsbs.local> Message-ID: <000301c83630$23d682d0$ef706c4c@jisshowsbs.local> JC ...methinks you may be confusing datasource selection with the tool box. William ----- Original Message ----- From: "William Hindman" To: Sent: Monday, December 03, 2007 10:51 PM Subject: Re: [dba-VB] Toolbox data objects > ...I've removed vs'3 and vs'5 from my systems but those objects are not in > the vs'8 toolset either. > William > > ----- Original Message ----- > From: "Charlotte Foust" > To: > Sent: Monday, December 03, 2007 8:05 PM > Subject: Re: [dba-VB] Toolbox data objects > > >>I don't have those objects in my toolbox, John. What are you trying to >> do? >> >> 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 03, 2007 2:19 PM >> To: dba-vb at databaseadvisors.com >> Subject: [dba-VB] Toolbox data objects >> >> My toolbox data objects tree seems to be missing the OLEDBXXX and SQLXXX >> objects. I could swear I had used them sometime in the past. >> >> Any idea what is going on? Was this a previous version of VS? Need to >> include some object? help... >> >> John W. Colby >> Colby Consulting >> www.ColbyConsulting.com >> >> _______________________________________________ >> 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 >> > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From DWUTKA at Marlow.com Tue Dec 4 10:43:30 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 4 Dec 2007 10:43:30 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: Message-ID: I didn't say that.... Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 1:01 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction ROTFL Sort of like Susan? Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Monday, December 03, 2007 9:50 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction I wasn't trying to be insulting. A Mac does what you expect it to do, almost regardless of what you actually tell it to do. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, December 03, 2007 10:34 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Now, Drew, don't be insulting. LOL Charlotte Foust The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ssharkins at gmail.com Tue Dec 4 10:56:42 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 4 Dec 2007 11:56:42 -0500 Subject: [dba-VB] Weird table name restriction References: Message-ID: <00a101c83696$ac42ea80$4b3a8343@SusanOne> Macs are for sissies. ;) Susan H. >I didn't say that.... > > Drew > > ROTFL Sort of like Susan? > > Charlotte > > I wasn't trying to be insulting. A Mac does what you expect it to do, > almost regardless of what you actually tell it to do. > > Drew From DWUTKA at Marlow.com Tue Dec 4 11:05:40 2007 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 4 Dec 2007 11:05:40 -0600 Subject: [dba-VB] Weird table name restriction In-Reply-To: <00a101c83696$ac42ea80$4b3a8343@SusanOne> Message-ID: I wouldn't say that, if you need graphic arts capabilities, Macs win hands down. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Tuesday, December 04, 2007 10:57 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Weird table name restriction Macs are for sissies. ;) Susan H. >I didn't say that.... > > Drew > > ROTFL Sort of like Susan? > > Charlotte > > I wasn't trying to be insulting. A Mac does what you expect it to do, > almost regardless of what you actually tell it to do. > > Drew _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ssharkins at gmail.com Tue Dec 4 11:30:02 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 4 Dec 2007 12:30:02 -0500 Subject: [dba-VB] Weird table name restriction References: Message-ID: <00d901c8369c$18f02ad0$4b3a8343@SusanOne> I was kidding. :) Susan H. >I wouldn't say that, if you need graphic arts capabilities, Macs win > hands down. > > Drew From newsgrps at dalyn.co.nz Wed Dec 5 18:48:36 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 13:48:36 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: References: Message-ID: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open >the files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From michael at ddisolutions.com.au Wed Dec 5 21:38:01 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 6 Dec 2007 14:38:01 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) References: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> Is this what you are looking for? http://www.useit.com/alertbox/open_new_windows.html or perhaps https://addons.mozilla.org/en-US/firefox/addon/636 I'm not 100% sure but I think the code you have can only be used on the server. cheers Michael M Subject: Re: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open the >files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > > > >_______________________________________________ >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 From Gustav at cactus.dk Thu Dec 6 01:18:50 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 06 Dec 2007 08:18:50 +0100 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) Message-ID: Hi David I have not tried your code ... so just a stupid question: Is Adobe Reader (or another pdf-application) installed on the user's machine? /gustav >>> newsgrps at dalyn.co.nz 06-12-2007 01:48:36 >>> I included Gustav's code in my web application as below: Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + ".pdf" runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal runPdf.Start() However, when it is run by a user I get the following error: No application is associated with the specified file for this operation. It seems to be wanting to open the file on the server. Do I need to install Adobe Acrobat on the server? I would have thought that it would use the local machines copy. David At 27/11/2007, you wrote: >Hi David et al > >A lot of useful things can be done with the Process class. >Some examples here: > > http://www.thescarms.com/dotnet/Process.aspx > >/gustav > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> >I am using VS 2005 and VB.Net for a web site. > >I have a number of PDF files that are stored in a static folder on the server. > >Users select from a list on files on a web page and I want to open >the files in Adobe. Adobe reader is installed on the server. > >Can anyone give me a pointer to how I can take a string with path and >file name, and open it? > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand From newsgrps at dalyn.co.nz Thu Dec 6 03:24:10 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 22:24:10 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: References: Message-ID: <20071206092107.TJMB17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> There are no stupid questions - just stupid answers :-) Yes the user (who was me) does have adobe reader installed. Part of my program uses the following code to show pdf's that are created from DataDynamic's Active Reports (this was code provided by DataDynamics): Dim m_stream As New System.IO.MemoryStream() Dim rptCombined As New DataDynamics.ActiveReports.ActiveReport3 ' Other code which creates the rptCombined report If Me.PdfExport1 Is Nothing Then Me.PdfExport1 = New DataDynamics.ActiveReports.Export.Pdf.PdfExport End If Me.PdfExport1.Export(rptCombined.Document, m_stream) m_stream.Position = 0 Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment; filename=PVPReports.pdf") Response.BinaryWrite(m_stream.ToArray()) Response.End() It looks like some of this might be able to be used to show the pdf files. What happens is that the user has the option to save or open the file. This is what I want for the pdf's as well. David At 6/12/2007, you wrote: >Hi David > >I have not tried your code ... so just a stupid question: Is Adobe >Reader (or another pdf-application) installed on the user's machine? > >/gustav > > >>> newsgrps at dalyn.co.nz 06-12-2007 01:48:36 >>> >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process >runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >"\PDFFiles\" + strReportFile + ".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this >operation. It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have >thought that it would use the local machines copy. > >David > >At 27/11/2007, you wrote: > >Hi David et al > > > >A lot of useful things can be done with the Process class. > >Some examples here: > > > > http://www.thescarms.com/dotnet/Process.aspx > > > >/gustav > > > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> > >I am using VS 2005 and VB.Net for a web site. > > > >I have a number of PDF files that are stored in a static folder on > the server. > > > >Users select from a list on files on a web page and I want to open > >the files in Adobe. Adobe reader is installed on the server. > > > >Can anyone give me a pointer to how I can take a string with path and > >file name, and open it? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 6 03:28:00 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 06 Dec 2007 22:28:00 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET (was: Open PDF file) In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> References: <20071206004538.RHEB9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A19A@ddi-01.DDI.local> Message-ID: <20071206092456.OVAG9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Michael, The first link looks promising - see my reply to Gustav. David At 6/12/2007, you wrote: >Is this what you are looking for? > >http://www.useit.com/alertbox/open_new_windows.html >or perhaps >https://addons.mozilla.org/en-US/firefox/addon/636 > >I'm not 100% sure but I think the code you have can only be used on the >server. > >cheers > > >Michael M > >Subject: Re: [dba-VB] Launch and monitor external programs from .NET >(was: Open PDF file) > >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process runPdf.StartInfo.FileName = >HttpContext.Current.Server.MapPath("") + "\PDFFiles\" + strReportFile + >".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this operation. >It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have thought >that it would use the local machines copy. > >David > >At 27/11/2007, you wrote: > >Hi David et al > > > >A lot of useful things can be done with the Process class. > >Some examples here: > > > > http://www.thescarms.com/dotnet/Process.aspx > > > >/gustav > > > > >>> newsgrps at dalyn.co.nz 26-11-2007 06:14 >>> > >I am using VS 2005 and VB.Net for a web site. > > > >I have a number of PDF files that are stored in a static folder on the >server. > > > >Users select from a list on files on a web page and I want to open the > >files in Adobe. Adobe reader is installed on the server. > > > >Can anyone give me a pointer to how I can take a string with path and > >file name, and open it? > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand > > > > > > > >_______________________________________________ > >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 > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com From robert at webedb.com Thu Dec 6 12:28:08 2007 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 06 Dec 2007 12:28:08 -0600 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: Message-ID: <200712061832.lB6IWrgr023718@databaseadvisors.com> David, Here is what I use: Interest and skills assesment survey. As far as I know, Adobe Reader is not installed on the server. Robert At 12:00 PM 12/6/2007, you wrote: >Date: Thu, 06 Dec 2007 13:48:36 +1300 >From: David Emerson >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > (was: Open PDF file) >To: dba-vb at databaseadvisors.com >Message-ID: > <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >Content-Type: text/plain; charset="us-ascii"; format=flowed > >I included Gustav's code in my web application as below: > >Dim runPdf As New System.Diagnostics.Process >runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >"\PDFFiles\" + strReportFile + ".pdf" >runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >runPdf.Start() > >However, when it is run by a user I get the following error: No >application is associated with the specified file for this >operation. It seems to be wanting to open the file on the server. > >Do I need to install Adobe Acrobat on the server? I would have >thought that it would use the local machines copy. > >David From newsgrps at dalyn.co.nz Thu Dec 6 12:55:57 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 07 Dec 2007 07:55:57 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET References: Message-ID: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Thanks Robert. This looks like it open the pdf in a browser window. Am I correct? I am wanting the box to appear giving the user the option of opening it or saving the file. David At 7/12/2007, you wrote: >David, > >Here is what I use: > > runat="server" > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > Text="Interest and skills assesment survey." > Target="_blank"> > Interest and skills assesment survey. > > >As far as I know, Adobe Reader is not installed on the server. > >Robert > >At 12:00 PM 12/6/2007, you wrote: >>Date: Thu, 06 Dec 2007 13:48:36 +1300 >>From: David Emerson >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET >> (was: Open PDF file) >>To: dba-vb at databaseadvisors.com >>Message-ID: >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >>Content-Type: text/plain; charset="us-ascii"; format=flowed >> >>I included Gustav's code in my web application as below: >> >>Dim runPdf As New System.Diagnostics.Process >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >>"\PDFFiles\" + strReportFile + ".pdf" >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >>runPdf.Start() >> >>However, when it is run by a user I get the following error: No >>application is associated with the specified file for this >>operation. It seems to be wanting to open the file on the server. >> >>Do I need to install Adobe Acrobat on the server? I would have >>thought that it would use the local machines copy. >> >>David From joeo at appoli.com Thu Dec 6 13:19:08 2007 From: joeo at appoli.com (Joe O'Connell) Date: Thu, 6 Dec 2007 14:19:08 -0500 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> References: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: David, I have not followed this thread, so your question may have already been answered. If you want to open a pdf in the user's browser, couldn't the pdf just be the href? Open PDF If the user left clicks, the pdf should open in a new browser window. If the user right clicks, a box will open allowing the user to save the pdf on their local disk drive. Joe O'Connell -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Thursday, December 06, 2007 1:56 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Thanks Robert. This looks like it open the pdf in a browser window. Am I correct? I am wanting the box to appear giving the user the option of opening it or saving the file. David At 7/12/2007, you wrote: >David, > >Here is what I use: > > runat="server" > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > Text="Interest and skills assesment survey." > Target="_blank"> > Interest and skills assesment survey. > > >As far as I know, Adobe Reader is not installed on the server. > >Robert > >At 12:00 PM 12/6/2007, you wrote: >>Date: Thu, 06 Dec 2007 13:48:36 +1300 >>From: David Emerson >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET >> (was: Open PDF file) >>To: dba-vb at databaseadvisors.com >>Message-ID: >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >>Content-Type: text/plain; charset="us-ascii"; format=flowed >> >>I included Gustav's code in my web application as below: >> >>Dim runPdf As New System.Diagnostics.Process >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + >>"\PDFFiles\" + strReportFile + ".pdf" >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal >>runPdf.Start() >> >>However, when it is run by a user I get the following error: No >>application is associated with the specified file for this >>operation. It seems to be wanting to open the file on the server. >> >>Do I need to install Adobe Acrobat on the server? I would have >>thought that it would use the local machines copy. >> >>David _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 6 14:29:28 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 07 Dec 2007 09:29:28 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: <20071206185408.YCUE9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <20071206202629.DROX9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Joe, The PDF is one of a number of reports that are shown dynamically on the screen based on table records. The user clicks on check boxes to select the reports they want to run, then the code processes the check boxes and opens the appropriate reports/files etc. Therefore hardcoding the href isn't an option in this case. Thanks for your reply though. David At 7/12/2007, you wrote: >David, > >I have not followed this thread, so your question may have already been >answered. > >If you want to open a pdf in the user's browser, couldn't the pdf just >be the href? Open PDF > >If the user left clicks, the pdf should open in a new browser window. >If the user right clicks, a box will open allowing the user to save the >pdf on their local disk drive. > >Joe O'Connell > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Thursday, December 06, 2007 1:56 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Thanks Robert. This looks like it open the pdf in a browser >window. Am I correct? I am wanting the box to appear giving the >user the option of opening it or saving the file. > >David > >At 7/12/2007, you wrote: > >David, > > > >Here is what I use: > > > > > runat="server" > > NavigateUrl="Documents/Interest_Skills_Survey.PDF" > > Text="Interest and skills assesment survey." > > Target="_blank"> > > Interest and skills assesment survey. > > > > > >As far as I know, Adobe Reader is not installed on the server. > > > >Robert > > > >At 12:00 PM 12/6/2007, you wrote: > >>Date: Thu, 06 Dec 2007 13:48:36 +1300 > >>From: David Emerson > >>Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >> (was: Open PDF file) > >>To: dba-vb at databaseadvisors.com > >>Message-ID: > >> <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> > >>Content-Type: text/plain; charset="us-ascii"; format=flowed > >> > >>I included Gustav's code in my web application as below: > >> > >>Dim runPdf As New System.Diagnostics.Process > >>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") + > >>"\PDFFiles\" + strReportFile + ".pdf" > >>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal > >>runPdf.Start() > >> > >>However, when it is run by a user I get the following error: No > >>application is associated with the specified file for this > >>operation. It seems to be wanting to open the file on the server. > >> > >>Do I need to install Adobe Acrobat on the server? I would have > >>thought that it would use the local machines copy. > >> > >>David > >_______________________________________________ >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 From jwcolby at colbyconsulting.com Fri Dec 7 08:38:34 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 09:38:34 -0500 Subject: [dba-VB] Lib object references lib obj Message-ID: <00ea01c838de$d91bebc0$977aa8c0@M90> I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Dec 7 09:51:53 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 7 Dec 2007 07:51:53 -0800 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <00ea01c838de$d91bebc0$977aa8c0@M90> References: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Dec 7 10:44:11 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 11:44:11 -0500 Subject: [dba-VB] Lib object references lib obj In-Reply-To: References: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: <010901c838f0$651a0650$977aa8c0@M90> Charlotte, Thanks for the response. The last time I asked this kind of thing you showed me how to link specific modules from another project, which is the method I am currently using. How do I link the entire project? This is essentially a "framework" I am starting, so it would certainly be appropriate to link that framework to the new project if I knew how. 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: Friday, December 07, 2007 10:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From shamil at users.mns.ru Fri Dec 7 11:13:59 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Fri, 7 Dec 2007 20:13:59 +0300 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <00ea01c838de$d91bebc0$977aa8c0@M90> Message-ID: <000301c838f4$8ea91340$6401a8c0@nant> Hello John, Why not use dedicated ClassLibs for different sets of functionality: - in one of the current ASP.NET/C# solutions I'm working here I have 7 classlibs and the main ASP.Net app... VS works very well with that kind of "advanced" stuff... Just set the reference to projects - and you're done - you can debug/trace "navigating" between projects' source code if needed... Note: Cross-referencing projects is not allowed... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 5:39 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Fri Dec 7 11:38:31 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 7 Dec 2007 09:38:31 -0800 Subject: [dba-VB] Lib object references lib obj In-Reply-To: <010901c838f0$651a0650$977aa8c0@M90> References: <00ea01c838de$d91bebc0$977aa8c0@M90> <010901c838f0$651a0650$977aa8c0@M90> Message-ID: Bring up the properties of the project, select references, and add the dll in the selected project's bin folder. That should give you access to the functionality in that project. I'm winging it here, because we do it in a totally different way due in part to the team development environment. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 8:44 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Charlotte, Thanks for the response. The last time I asked this kind of thing you showed me how to link specific modules from another project, which is the method I am currently using. How do I link the entire project? This is essentially a "framework" I am starting, so it would certainly be appropriate to link that framework to the new project if I knew how. 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: Friday, December 07, 2007 10:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Lib object references lib obj Why not just link the project that contains the error class? We work very differently in .Net than we did in Access. Out apps are solutions that contain multiple projects, some shared with other apps. Otherwise, I think you'd need the full path reference in the Imports statement in your data class. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 6:39 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Lib object references lib obj I have modules out in a library. These objects use other objects out in the lib. For example a data reader uses an error class to log and record errors. Under normal circumstances (a large project) I link those other classes directly into the current project. In the latest case (a very small project) I did not do so, but I did link my data class (which uses the log and error classes out in the lib). When I go into that data class it is informing me that it can't find the error and log classes that it normally uses. The reason is that I did not link those error and log classes in to the current project. Is there a syntax to tell the parent object that the used object exists in the same library and to just go there to find it? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From robert at webedb.com Fri Dec 7 12:25:54 2007 From: robert at webedb.com (Robert L. Stewart) Date: Fri, 07 Dec 2007 12:25:54 -0600 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: References: Message-ID: <200712071829.lB7ISxDd021422@databaseadvisors.com> Yes, David, it opens it in the browser and from there, the user is viewing it and can save it from there. At 11:39 AM 12/7/2007, you wrote: >Date: Fri, 07 Dec 2007 07:55:57 +1300 >From: David Emerson >Subject: Re: [dba-VB] Launch and monitor external programs from .NET >To: dba-vb at databaseadvisors.com >Message-ID: > <20071206185408.YCUE9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz> >Content-Type: text/plain; charset="us-ascii"; format=flowed > >Thanks Robert. This looks like it open the pdf in a browser >window. Am I correct? I am wanting the box to appear giving the >user the option of opening it or saving the file. > >David From jwcolby at colbyconsulting.com Fri Dec 7 14:27:30 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 7 Dec 2007 15:27:30 -0500 Subject: [dba-VB] Connection closed Message-ID: <012701c8390f$978270e0$977aa8c0@M90> I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Dec 7 23:32:01 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 8 Dec 2007 00:32:01 -0500 Subject: [dba-VB] Connection closed In-Reply-To: <012701c8390f$978270e0$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: <014a01c8395b$a91ebbf0$977aa8c0@M90> Any ideas out there? The ExecuteNonQuery complains that the connection is closed. If I break at that point (the catch) and do a lcnn.open it says the connection is open. Further it tells me the name of the server, the table name etc. Doesn't sound closed. 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 jwcolby Sent: Friday, December 07, 2007 3:28 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ssharkins at gmail.com Sat Dec 8 08:23:46 2007 From: ssharkins at gmail.com (Susan Harkins) Date: Sat, 8 Dec 2007 09:23:46 -0500 Subject: [dba-VB] Connection closed References: <012701c8390f$978270e0$977aa8c0@M90> <014a01c8395b$a91ebbf0$977aa8c0@M90> Message-ID: <003201c839a6$359f0ef0$4b3a8343@SusanOne> John, this is just a wilda*s guess because I've seen this happen to me, but it may be the syntax you're using and you're just getting one of the less the helpful error messages. The interesting word is "available" -- my guess is that one of your parameters isn't the right type of something obscure like that, but I really am only guessing. Susan H. > Any ideas out there? The ExecuteNonQuery complains that the connection is > closed. If I break at that point (the catch) and do a lcnn.open it says > the > connection is open. Further it tells me the name of the server, the table > name etc. Doesn't sound closed. From jwcolby at colbyconsulting.com Sat Dec 8 09:45:57 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 8 Dec 2007 10:45:57 -0500 Subject: [dba-VB] Connection closed In-Reply-To: <003201c839a6$359f0ef0$4b3a8343@SusanOne> References: <012701c8390f$978270e0$977aa8c0@M90><014a01c8395b$a91ebbf0$977aa8c0@M90> <003201c839a6$359f0ef0$4b3a8343@SusanOne> Message-ID: <016401c839b1$6d4f7e60$977aa8c0@M90> Susan, Thanks for the reply. I don't have a clue and no time to screw around with it more. I was trying to use a stored procedure to migrate data from a "horizontal" to a "vertical" schema. In the end I just resorted to VB.Net. I have a class with a bunch of prewritten functions that allows me to just instantiate and call my class to do things including executing action queries directly out on SQL Server. It took me about 1/2 hour to just redo the whole process, replace the stored procedure with a new function in a form in VB.Net and voila, I am crunching away doing the conversion. At first it was whizzing through the fields of the horizontal table, throwing their data and field ID into the vertical table. It has slowed down now as the number of records in the vertical table has grown. I was reading just the other night about all the work SQL Server has to do to maintain a balanced tree and I think that is what I am seeing now. I have processed 18 fields from the horizontal table and pulled 142 million pieces of actual data out of those 18 fields. There are 584 fields to process in the horizontal table so this could take till next week to process. And then once the process is finished I have to build an index on the table. All in order to discover whether it will be faster to execute a given query using this vertical schema. It should be interesting. 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 Susan Harkins Sent: Saturday, December 08, 2007 9:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, this is just a wilda*s guess because I've seen this happen to me, but it may be the syntax you're using and you're just getting one of the less the helpful error messages. The interesting word is "available" -- my guess is that one of your parameters isn't the right type of something obscure like that, but I really am only guessing. Susan H. > Any ideas out there? The ExecuteNonQuery complains that the connection > is closed. If I break at that point (the catch) and do a lcnn.open it > says the connection is open. Further it tells me the name of the > server, the table name etc. Doesn't sound closed. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From joeget at vgernet.net Sun Dec 9 21:08:14 2007 From: joeget at vgernet.net (John Eget) Date: Sun, 9 Dec 2007 21:08:14 -0600 Subject: [dba-VB] Access 2003 to 2007 issue Message-ID: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> Anyone I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? From cfoust at infostatsystems.com Mon Dec 10 10:03:33 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:03:33 -0800 Subject: [dba-VB] Connection closed In-Reply-To: <012701c8390f$978270e0$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 10 10:06:02 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:06:02 -0800 Subject: [dba-VB] Access 2003 to 2007 issue In-Reply-To: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> References: <002701c83ad9$ed752210$38c2f63f@gateway8529fab> Message-ID: Did you cross-post this? It really belongs in the AccessD list. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John Eget Sent: Sunday, December 09, 2007 7:08 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Access 2003 to 2007 issue Anyone I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 10:23:39 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 11:23:39 -0500 Subject: [dba-VB] Connection closed In-Reply-To: References: <012701c8390f$978270e0$977aa8c0@M90> Message-ID: <01f401c83b49$064c3c50$977aa8c0@M90> When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From cfoust at infostatsystems.com Mon Dec 10 10:28:01 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 08:28:01 -0800 Subject: [dba-VB] Connection closed In-Reply-To: <01f401c83b49$064c3c50$977aa8c0@M90> References: <012701c8390f$978270e0$977aa8c0@M90> <01f401c83b49$064c3c50$977aa8c0@M90> Message-ID: I thought you were USING vb.net, John. I wondered why you were coding it that way. 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 8:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 10 11:11:09 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 12:11:09 -0500 Subject: [dba-VB] Connection closed In-Reply-To: References: <012701c8390f$978270e0$977aa8c0@M90><01f401c83b49$064c3c50$977aa8c0@M90> Message-ID: <01f501c83b4f$a93299e0$977aa8c0@M90> Well I keep getting advice to use stored procedures in SQL Server. That is what I was trying to do. I created a stored procedure that would take table / field names and dynamically construct and execute an append query. I got that working, but I could not iterate a table from TSQL so I was trying to run the SP from VB.Net. THAT is where I was getting the failure. In the end I had to get it finished so I just replaced the SP with the equivalent directly out in VB.Net and then executed an action query (in VB.Net). That action query was the equivalent of the stored procedure, but because it was constructed and executed in VB.Net code I could then call it from another VB.Net function. It all worked and I performed an entire deconstruction of a "wide" table into a set of "tall" tables. I was implementing a schema that Arthur recommended. 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 11:28 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed I thought you were USING vb.net, John. I wondered why you were coding it that way. 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 8:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed When I tried to set the provider it barfed saying that "provider is not a valid parameter" or some such. This is actually closed. I wrote the whole damned thing in two tiny little functions in VB.Net. 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 11:04 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Connection closed John, Where are you setting your provider? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, December 07, 2007 12:27 PM To: dba-vb at databaseadvisors.com; dba-sqlserver at databaseadvisors.com Subject: [dba-VB] Connection closed I am trying to run the following code: Private Const cstrCnn2 As String = "Data Source = Azul;Initial Catalog = HSID;Integrated Security=SSPI" Private Sub btnMigrateData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMigrateData.Click Dim lrow As DataRow Dim tbl As DataTable tbl = clsDataAccess.mtblGet("tblHSIDFldName") Dim lcnn As New SqlConnection(cstrCnn2) Dim cmdFldToVertical As New SqlCommand("USP_FldToVertical", lcnn) cmdFldToVertical.CommandType = CommandType.StoredProcedure For Each lrow In tbl.Rows If CInt(lrow("FLD_ID")) > 2 Then Debug.Print(lrow("Fld_ID").ToString & ", " & lrow("Fld_Name").ToString) cmdFldToVertical.Parameters.Add("@SrcTblName", SqlDbType.NVarChar, 100).Value = "" cmdFldToVertical.Parameters.Add("@FldNameID", SqlDbType.Int).Value = CInt(lrow("Fld_ID")) cmdFldToVertical.Parameters.Add("@SrcFldName", SqlDbType.NVarChar, 100).Value = lrow("Fld_Name").ToString Try cmdFldToVertical.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try End If Next End Sub I am getting an error on the try that the connection is closed: "ExecuteNonQuery requires an open and available Connection. The connection's current state is closed." I did not get an error when I dimmed the cmd object which passes in the connection object. How do I check that the connection is open, or troubleshoot why it is not open? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 12:21:42 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 13:21:42 -0500 Subject: [dba-VB] Does anyone have Message-ID: <01f701c83b59$84432460$977aa8c0@M90> A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Dec 10 13:19:40 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 14:19:40 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: <01f701c83b59$84432460$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: <01fb01c83b61$9d43ec80$977aa8c0@M90> And then of course I immediately stumbled on this: http://www.developer.com/net/vb/article.php/3558771 by Paul Kimmel. Everything I needed to at least get started. The Oh No second strikes again. 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 jwcolby Sent: Monday, December 10, 2007 1:22 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Does anyone have A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Dec 10 13:32:12 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 11:32:12 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <01f701c83b59$84432460$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: 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 -----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 10:22 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Does anyone have A good tutorial for displaying / editing / saving data in VB.Net 2005? A recommended book? I want a form that displays records in a table in SQL Server. I do NOT want to use a continuous or grid control, but rather a set of controls that I create on the form and then somehow "bind" to the data. The form should have the typical VCR controls for moving through the data. The form should be capable of displaying, updating and saving changes. I have the typical parent child relationships so it would be nice if I could also learn how to display child data in sub forms or the .Net equivalent as the parent moves through it's records. We all know I have always been a "bound" kind of guy in Access. VB.Net is a new beastie and I am certainly willing to learn new things, so unbound is fine as long as data integrity is maintained, changes by other users respected and so forth. I am no longer a complete nubee to .Net but I am also by no stretch an interface wizard so It will need to start from the beginning and explain every step. I have a ton of VB.Net books but they all seem to want to bind to the grid control. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Dec 10 13:54:26 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 10 Dec 2007 14:54:26 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: <01f701c83b59$84432460$977aa8c0@M90> Message-ID: <01fd01c83b66$787f49d0$977aa8c0@M90> 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 From cfoust at infostatsystems.com Mon Dec 10 14:55:26 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 10 Dec 2007 12:55:26 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <01fd01c83b66$787f49d0$977aa8c0@M90> References: <01f701c83b59$84432460$977aa8c0@M90> <01fd01c83b66$787f49d0$977aa8c0@M90> Message-ID: 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 From R.Griffiths at bury.gov.uk Tue Dec 11 03:30:12 2007 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Dec 2007 09:30:12 -0000 Subject: [dba-VB] Does anyone have In-Reply-To: References: <01f701c83b59$84432460$977aa8c0@M90><01fd01c83b66$787f49d0$977aa8c0@M90> Message-ID: <200712110913.lBB9DlM01061@smarthost.yourcomms.net> 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 . ************************************************************* From Gustav at cactus.dk Tue Dec 11 03:43:43 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 10:43:43 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John (crossposted to AccessD because this brief chapter is excellent reading if you know nearly nothing about Visual Studio and wish a first-hand impression on how it "compares" to Access regarding creating forms). Did you read the sample chapter 4 from the link provided by Arthur for "Visual Basic 2005 Jumpstart (see below): www.oreilly.com/catalog/vbjumpstart/chapter/ch04.pdf The chapter covers exactly this. --- Hi Arthur All samples? It lists 470 on Visual Studio alone! Found the JumpStart code download and the book: http://examples.oreilly.com/vbjumpstart/ http://www.oreilly.com/catalog/vbjumpstart/ Thanks! /gustav --- >>> fuller.artful at gmail.com 27-04-2007 16:28 >>> Go to GotDotNet and download all the samples. Do it relatively quickly since MS has decided to phase out this site. Also go to Visual Studio Magazine and CodePlex. There is a very good intro book called VB.NET JumpStart (google vbJumpStart and you should get to the downloadable code). I found this book so good that I am currently thinking that .NET is even easier than Access. Arthur -- >>> jwcolby at colbyconsulting.com 10-12-2007 20:54 >>> 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 From max.wanadoo at gmail.com Tue Dec 11 04:09:02 2007 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 11 Dec 2007 10:09:02 -0000 Subject: [dba-VB] Remote closing of Front Ends In-Reply-To: Message-ID: <00bf01c83bdd$dba05c30$8119fea9@LTVM> Hi Guys, Can anybody point me to code where I can close down Front Ends remotely. I have seen this sort of code posted in the past but cannot find it. Situation: Running an overnight compact and repair on the BE, but falls over because it "thinks" that somebody still has the FE open and linked to it (in fact they don't, so I think there must still be a flag sitting somewhere). Thanks in advance. Max From joeget at vgernet.net Tue Dec 11 06:21:15 2007 From: joeget at vgernet.net (John Eget) Date: Tue, 11 Dec 2007 06:21:15 -0600 Subject: [dba-VB] Autolinking front end to back end application Message-ID: <004b01c83bf0$594011a0$4ec2f63f@gateway8529fab> Does anyone have a link to or code to autolink the front end to the backend when a splash screen is opened? I cannot figure out the issue below I have a database that works fine in 2003, but when I open it in 2007 I get an error code popup when I open my splash screen that states "Invalid procedure call or argument". I have isolated it (at least I think so) to the following area within the Splash Screen: Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error ' Check to see if EASILOOK Back End XP is available. If modRefreshTableLinks.CheckLinks() = False Then ' Try to relink the tables; if it fails, shut down EASILOOK Front End XP Application. If modRefreshTableLinks.RelinkTables() = False Then DoCmd.Close acForm, "frmSplash" 'Closes EASILOOK Front End XP Application DoCmd.Quit End If End If Call SetEnabledState(True) 'Enables application close and exit capability 'Call SetEnabledState(False) 'Disables application close and exit capability Form_Open_Exit: Exit Sub Form_Open_Error: MsgBox Err.Description CloseCurrentDatabase Resume Form_Open_Exit End Sub If i comment out the Call SetEnabledState area the form works fine. I also have a module that states: Public Function SetEnabledState(blnState As Boolean) Call CloseButtonState(blnState) Call ExitMenuState(blnState) End Function I am at a loss as to why this is happening. My Tool-References are as follows: Visual Basic for Applications Microsoft Access 12.0 Object Library Microsoft DAO 3.6 Object Library Microsoft ActiveX Data Objects 2.5 Library Microsoft Visual Basics for Applications Extendibility 5.3 OLE Automation All of the above works perfectly in 2003 Anyone have any ideas?? From jwcolby at colbyconsulting.com Tue Dec 11 08:28:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 09:28:23 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: <200712110913.lBB9DlM01061@smarthost.yourcomms.net> References: <01f701c83b59$84432460$977aa8c0@M90><01fd01c83b66$787f49d0$977aa8c0@M90> <200712110913.lBB9DlM01061@smarthost.yourcomms.net> Message-ID: <023601c83c02$16769350$977aa8c0@M90> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From Gustav at cactus.dk Tue Dec 11 08:52:46 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 15:52:46 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From jwcolby at colbyconsulting.com Tue Dec 11 09:02:09 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 10:02:09 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <023a01c83c06$cdc15910$977aa8c0@M90> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From robert at webedb.com Tue Dec 11 09:06:23 2007 From: robert at webedb.com (Robert L. Stewart) Date: Tue, 11 Dec 2007 09:06:23 -0600 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <200712111508.lBBF83se028103@databaseadvisors.com> For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 From Gustav at cactus.dk Tue Dec 11 09:17:20 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 16:17:20 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 From wdhindman at dejpolsystems.com Tue Dec 11 09:38:43 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 11 Dec 2007 10:38:43 -0500 Subject: [dba-VB] Does anyone have References: Message-ID: <001001c83c0b$e9e8bcf0$0c10a8c0@jisshowsbs.local> gustav ...sssshhhh ...whatever you do, don't mention jc and "obtuse" in the same line ...upsets him it does :) William ----- Original Message ----- From: "Gustav Brock" To: Sent: Tuesday, December 11, 2007 9:52 AM Subject: Re: [dba-VB] Does anyone have > Hi John > > I visited the site and got the same impression. > > This is, sadly, the case for most open-source sites - lots of info on > marginal latest revisions and nerded comments, but only an obtuse - or > completely lacking - overview for the first-time visitor. Often not even > system/software requirements are listed. > These people could really gain by learning some marketing: What is this, > what is the purpose, who is it aimed for, what skill is required, what > software is required, etc. It's a mess and a waste. > > /gustav > >>>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> > Richard, > > Thanks for the link. I have to say it is annoying when an author does > things in reverse order. I go to the site. Plastered all over is CSLA. > So > what is CSLA? There is a link, plainly labeled "what is CSLA". So I go > to > that link. There is an entire page starting with CSLA is a .... At the > VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. > > Sigh. > > But in the end I ordered the book, as well as an older book by the same > author apparently no longer in print. Let's hope he can help me! > > ;-) > > 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 Griffiths, > Richard > Sent: Tuesday, December 11, 2007 4:30 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Does anyone have > > 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 > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From Gustav at cactus.dk Tue Dec 11 09:45:40 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 11 Dec 2007 16:45:40 +0100 Subject: [dba-VB] Does anyone have Message-ID: Hi William I know - it was his documentation, right - so I didn't! /gustav >>> wdhindman at dejpolsystems.com 11-12-2007 16:38 >>> gustav ...sssshhhh ...whatever you do, don't mention jc and "obtuse" in the same line ...upsets him it does :) William ----- Original Message ----- From: "Gustav Brock" To: Sent: Tuesday, December 11, 2007 9:52 AM Subject: Re: [dba-VB] Does anyone have > Hi John > > I visited the site and got the same impression. > > This is, sadly, the case for most open-source sites - lots of info on > marginal latest revisions and nerded comments, but only an obtuse - or > completely lacking - overview for the first-time visitor. Often not even > system/software requirements are listed. > These people could really gain by learning some marketing: What is this, > what is the purpose, who is it aimed for, what skill is required, what > software is required, etc. It's a mess and a waste. > > /gustav > >>>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> > Richard, > > Thanks for the link. I have to say it is annoying when an author does > things in reverse order. I go to the site. Plastered all over is CSLA. So > what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to > that link. There is an entire page starting with CSLA is a .... At the > VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. > > Sigh. > > But in the end I ordered the book, as well as an older book by the same > author apparently no longer in print. Let's hope he can help me! > > ;-) > > 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 Griffiths, > Richard > Sent: Tuesday, December 11, 2007 4:30 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Does anyone have > > 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 From R.Griffiths at bury.gov.uk Tue Dec 11 09:51:04 2007 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Dec 2007 15:51:04 -0000 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <200712111534.lBBFYZM20719@smarthost.yourcomms.net> Hi I'm not exactly sure what the target audience is, but everything is OO based and whilst under the hood of the framework is some advanced coding, app usage is I would say intermediate to advanced. Rocky is a programmer at heart and I guess sticks programming and not any peripherals. I'm sure he would answer you if you posted a question or looked around - there's plenty of info. I adopted this framework as what I started do myself in designing my own sort of framework seemed covered (plus much more) and to a hugely better standard by Rocky. Such things a validation - where to put business rules, authorisation, data access, n-level undo (never used this though), smartdates etc - he has put a lot of thought into this and come up with a v.good framework. The framework is supported by Codesmith, Code Complete and CSLAGen (codemsmith incorporated/customised specifically for CSLA.net) for code generation of the business classes. .Nettiers whilst v.good I believe is more data access and does not cover the issues cited above. Same as the MS Enterprise libraries - these compliment CSLA (and vice-versa) rather than compete. Rocky has excellent credentials, speaking at VS Live 2008 conferences along with Ken Getz etc and is also running a post conference workshop on his framework. My advice would be not to plough too deeply into the book(s) as this can get heavy going sometimes but along with the book(s) try out yourself - but as I say a learning curve is to be taken. One thing to consider is that if you decide not to utilise this framework you still have to resolve those issues such as validation, authorisation and so on yourself. HTH Richard -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 11 December 2007 14:53 To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ 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 . ************************************************************* From jwcolby at colbyconsulting.com Tue Dec 11 10:05:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:05:23 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: Message-ID: <024401c83c0f$a3800030$977aa8c0@M90> Charlotte's is home built it seems. I have not really read anything from Shamil re a .net framework but it would not surprise me if he were using such a thing. I watched a 15 minute overview video of codesmith and ntiers and all I can say is WOW. OTOH it seems that it would be WOW if you were an experienced .NET developer. My first impression is that it would simply be overwhelming to me. Sadly there are no books you can buy to help you get started with Codesmith. 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 Gustav Brock Sent: Tuesday, December 11, 2007 10:17 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. 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 Gustav Brock Sent: Tuesday, December 11, 2007 9:53 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John I visited the site and got the same impression. This is, sadly, the case for most open-source sites - lots of info on marginal latest revisions and nerded comments, but only an obtuse - or completely lacking - overview for the first-time visitor. Often not even system/software requirements are listed. These people could really gain by learning some marketing: What is this, what is the purpose, who is it aimed for, what skill is required, what software is required, etc. It's a mess and a waste. /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 15:28 >>> Richard, Thanks for the link. I have to say it is annoying when an author does things in reverse order. I go to the site. Plastered all over is CSLA. So what is CSLA? There is a link, plainly labeled "what is CSLA". So I go to that link. There is an entire page starting with CSLA is a .... At the VERY BOTTOM is the paragraph that DEFINES the acronym CSLA. Sigh. But in the end I ordered the book, as well as an older book by the same author apparently no longer in print. Let's hope he can help me! ;-) 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 Griffiths, Richard Sent: Tuesday, December 11, 2007 4:30 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 10:17:33 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:17:33 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <200712111508.lBBF83se028103@databaseadvisors.com> References: <200712111508.lBBF83se028103@databaseadvisors.com> Message-ID: Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 From jwcolby at colbyconsulting.com Tue Dec 11 10:26:32 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:26:32 -0500 Subject: [dba-VB] Does anyone have In-Reply-To: References: <200712111508.lBBF83se028103@databaseadvisors.com> Message-ID: <024a01c83c12$97df97b0$977aa8c0@M90> And that is precisely my main complaint. I watched the demo and codesmith generated SIX PROJECTS with tens of thousands of lines of code in HUNDREDS of modules. Now what do I do when something doesn't work? I didn't write the modules, nor the code. 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: Tuesday, December 11, 2007 11:18 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert At 04:09 AM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 09:30:12 -0000 >From: "Griffiths, Richard" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: <200712110913.lBB9DlM01061 at smarthost.yourcomms.net> >Content-Type: text/plain; charset="us-ascii" > >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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 10:28:36 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:28:36 -0800 Subject: [dba-VB] Frameworks Message-ID: Yes, we build what can be called a framework. We created a solution and added project for Configuration, Controls, Exceptions, Charts, Data, Data.OleDbProvider, Reports, ResourceData (xml data tables), UI and Security. Some of those were added as we developed the concept, but Configuration, Exceptions, Data, Reports, UI and Security we there from the start. Controls was added when we started customising third party controls or building our own. Using those allows us to maintain a consistent look throughout the applications and save the developer having to set countless properties over and over. Charlotte From cfoust at infostatsystems.com Tue Dec 11 10:37:06 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 08:37:06 -0800 Subject: [dba-VB] Does anyone have In-Reply-To: <024a01c83c12$97df97b0$977aa8c0@M90> References: <200712111508.lBBF83se028103@databaseadvisors.com> <024a01c83c12$97df97b0$977aa8c0@M90> Message-ID: It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:27 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have And that is precisely my main complaint. I watched the demo and codesmith generated SIX PROJECTS with tens of thousands of lines of code in HUNDREDS of modules. Now what do I do when something doesn't work? I didn't write the modules, nor the code. 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: Tuesday, December 11, 2007 11:18 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Maybe, but while we use CodeSmith, we hand program around it. If we didn't understand the concepts and how to implement them without the tools, that wouldn't be possible. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, December 11, 2007 7:06 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have For a less steep learning curve, use CodeSmith Tools and .netTiers. Give you a great data layer. Think of it as Access on steroids as far as the DAO layer in it is concerned. Robert From jwcolby at colbyconsulting.com Tue Dec 11 10:51:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 11:51:23 -0500 Subject: [dba-VB] Open a filtered form Message-ID: <024b01c83c16$10ae61f0$977aa8c0@M90> Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Tue Dec 11 11:07:52 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 12:07:52 -0500 Subject: [dba-VB] Codesmith trials and tribulations In-Reply-To: References: <200712111508.lBBF83se028103@databaseadvisors.com><024a01c83c12$97df97b0$977aa8c0@M90> Message-ID: <024c01c83c18$5e1d7690$977aa8c0@M90> Yea, yea, yea. And I actually do believe that. However think of this from my perspective. It is just me, sitting here in my office. I work to make money, if I don't do billable hours I do not get paid. No "salary", no employer who will pay me to come up to speed on how to do this. So I look at this and say WOW, if I could learn this I could make SO much more money because I could be so much more productive. And then I say WOW, there is no book, it will take me weeks to learn it, I don't have anyone else using it that I can pop into their cube and ask questions, and I have work to do so that Robbie and Allie can eat in January. BTW I spent 45 (non paid) minutes this morning JUST trying to download the thing. I had to get a user name in order to download it. I did that. Then it said it would take 15 minutes to set up the account (ever heard of computers guys?). Then I am poking around and tried a download. It wanted my email so I gave it. It said the email was in use. Uhhh... hmmm... MIGHT BE ME? Then I clicked "lost my password" because 15 minutes later no password had appeared in me email box. Then I get TWO emails, with TWO DIFFERENT (industrial strength, will resist the CIA) passwords, NEITHER OF WHICH work. In one place on the site it asks for my email and a password (neither of which works) and in another it asks for my USER NAME and password (neither of which works). And all of this to get a code generator to allow me to standardize my coding practices. HMMMMmmmmmmmm. Perhaps they need to use Codesmith? Or maybe the problem is that they DID use Codesmith? Scary to contemplate! So I replied to the email for the last password asking them to figure out what is wrong. 45 minutes wasted, and I haven't even managed to get in to see the documentation or download the trial software. 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: Tuesday, December 11, 2007 11:37 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte From cfoust at infostatsystems.com Tue Dec 11 12:16:57 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 10:16:57 -0800 Subject: [dba-VB] Open a filtered form In-Reply-To: <024b01c83c16$10ae61f0$977aa8c0@M90> References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Tue Dec 11 12:19:20 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 10:19:20 -0800 Subject: [dba-VB] Codesmith trials and tribulations In-Reply-To: <024c01c83c18$5e1d7690$977aa8c0@M90> References: <200712111508.lBBF83se028103@databaseadvisors.com><024a01c83c12$97df97b0$977aa8c0@M90> <024c01c83c18$5e1d7690$977aa8c0@M90> Message-ID: I have to admit that the developers don't use it, only our boss, who acts primarily as a project manager. The rest of us come along behind and fix the problems with it! LOL Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 9:08 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Codesmith trials and tribulations Yea, yea, yea. And I actually do believe that. However think of this from my perspective. It is just me, sitting here in my office. I work to make money, if I don't do billable hours I do not get paid. No "salary", no employer who will pay me to come up to speed on how to do this. So I look at this and say WOW, if I could learn this I could make SO much more money because I could be so much more productive. And then I say WOW, there is no book, it will take me weeks to learn it, I don't have anyone else using it that I can pop into their cube and ask questions, and I have work to do so that Robbie and Allie can eat in January. BTW I spent 45 (non paid) minutes this morning JUST trying to download the thing. I had to get a user name in order to download it. I did that. Then it said it would take 15 minutes to set up the account (ever heard of computers guys?). Then I am poking around and tried a download. It wanted my email so I gave it. It said the email was in use. Uhhh... hmmm... MIGHT BE ME? Then I clicked "lost my password" because 15 minutes later no password had appeared in me email box. Then I get TWO emails, with TWO DIFFERENT (industrial strength, will resist the CIA) passwords, NEITHER OF WHICH work. In one place on the site it asks for my email and a password (neither of which works) and in another it asks for my USER NAME and password (neither of which works). And all of this to get a code generator to allow me to standardize my coding practices. HMMMMmmmmmmmm. Perhaps they need to use Codesmith? Or maybe the problem is that they DID use Codesmith? Scary to contemplate! So I replied to the email for the last password asking them to figure out what is wrong. 45 minutes wasted, and I haven't even managed to get in to see the documentation or download the trial software. 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: Tuesday, December 11, 2007 11:37 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have It's wonderful for quickly regenerating a data tier after schema changes, but we had to tweak the template to make sure it didn't throw away the business rules we had added to our data entity classes. It's very handy for generating the typeddatasets and basic NUnit tests though. Charlotte _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 11 12:25:15 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 11 Dec 2007 21:25:15 +0300 Subject: [dba-VB] Does anyone have In-Reply-To: Message-ID: <000001c83c23$2cf1b8a0$6401a8c0@nant> Hello Gustav, Yes, I do have my own home-made very light "framework", which I use to develop ASP.Net apps as well as other kinds of .NET Framework based apps... Most of the "plumbing" code and CRUD/lookup UDFs/SPs is generated from SPARX systems EA's meta data synchronized with MS SQL db and some simple manually prepared meta-data... Generator is "home made" also... It's all multi-tiered/layered, quite effective way of application development with hundreds (thousands?) of custom classes and zero ADO.NET datasets... I didn't want to get bounded to any frameworks as CodeSmith or NHibernate or similar tools provide - hence in parallel with custom coding I have written my own light framework which I will be throwing away by pieces with MS technologies progressing making my home-made "framework exercises" obsolete... I did get the main ideas of this light framework from Marco Bellinaso book on ASP.NET, and then I expanded these ideas in the direction I needed to solve custom tasks... I also used quite some of my past experience to organize and keep simple custom meta-data... I do plan to add some parts to this "framework" from MS Enterpise Library, which is freely available on MS site... Etc... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 11, 2007 6:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Does anyone have Hi John Isn't Charlotte and Shamil using a framework for business objects? Probably home built. Any recommendations for a third party tool? /gustav >>> jwcolby at colbyconsulting.com 11-12-2007 16:02 >>> It is indeed a mess, but in fact less so than most of the open source things. And the guy has credentials (listen to me 8-(, and his first book gets a 4.5 star rating from ~50 reviewers on Amazon.com. I desperately need an introduction to business objects so I'll give it a try. John W. Colby Colby Consulting www.ColbyConsulting.com From robert at webedb.com Tue Dec 11 13:41:25 2007 From: robert at webedb.com (Robert L. Stewart) Date: Tue, 11 Dec 2007 13:41:25 -0600 Subject: [dba-VB] Codesmith Woes In-Reply-To: References: Message-ID: <200712111943.lBBJgvbs021321@databaseadvisors.com> Where can I send VS 2005 project so we can get John's head placed properly on his anatomy? I have a simple one for both Win forms and Web forms. That uses Codesmith with netTiers. Sorry, but you have to use both, my opinion, for Codesmith to be usable for data layer stuff. If you place code at the base level in the generated code, you will always have the problem of it replace it. There is a level above that you have to put code into. It is never, at least they say never, replaced. John, everything has a learning curve. You just need to study between midnight and 4 AM like I do to keep up with the changing technology. :-) At 12:00 PM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 08:37:06 -0800 >From: "Charlotte Foust" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >It's wonderful for quickly regenerating a data tier after schema >changes, but we had to tweak the template to make sure it didn't throw >away the business rules we had added to our data entity classes. It's >very handy for generating the typeddatasets and basic NUnit tests >though. > >Charlotte > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby >Sent: Tuesday, December 11, 2007 8:27 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >And that is precisely my main complaint. I watched the demo and >codesmith generated SIX PROJECTS with tens of thousands of lines of code >in HUNDREDS of modules. Now what do I do when something doesn't work? >I didn't write the modules, nor the code. > > >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: Tuesday, December 11, 2007 11:18 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >Maybe, but while we use CodeSmith, we hand program around it. If we >didn't understand the concepts and how to implement them without the >tools, that wouldn't be possible. > >Charlotte Foust > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. >Stewart >Sent: Tuesday, December 11, 2007 7:06 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >For a less steep learning curve, use CodeSmith Tools and .netTiers. Give >you a great data layer. Think of it as Access on steroids as far as the >DAO layer in it is concerned. > >Robert From jwcolby at colbyconsulting.com Tue Dec 11 13:56:23 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 14:56:23 -0500 Subject: [dba-VB] Codesmith Woes In-Reply-To: <200712111943.lBBJgvbs021321@databaseadvisors.com> References: <200712111943.lBBJgvbs021321@databaseadvisors.com> Message-ID: <025101c83c2f$e87880c0$977aa8c0@M90> You may send it directly to me, attached to an email. If it is large I can create an FTP user / password for you to upload it to my web site. I went back to Codesmith's web site and asked for a THIRD password and that one works. So I am now able to log in and download the docs and stuff. As for getting my head properly placed on my anatomy, better folks than you have tried and failed. ;-) And finally as for midnight to 4... at my age I am finding it difficult to do that any more. Besides which I am back up at 7 to get the kids ready for school, and by the time I am done with that I have clients calling... Oh well. 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 Robert L. Stewart Sent: Tuesday, December 11, 2007 2:41 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Codesmith Woes Where can I send VS 2005 project so we can get John's head placed properly on his anatomy? I have a simple one for both Win forms and Web forms. That uses Codesmith with netTiers. Sorry, but you have to use both, my opinion, for Codesmith to be usable for data layer stuff. If you place code at the base level in the generated code, you will always have the problem of it replace it. There is a level above that you have to put code into. It is never, at least they say never, replaced. John, everything has a learning curve. You just need to study between midnight and 4 AM like I do to keep up with the changing technology. :-) At 12:00 PM 12/11/2007, you wrote: >Date: Tue, 11 Dec 2007 08:37:06 -0800 >From: "Charlotte Foust" >Subject: Re: [dba-VB] Does anyone have >To: >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >It's wonderful for quickly regenerating a data tier after schema >changes, but we had to tweak the template to make sure it didn't throw >away the business rules we had added to our data entity classes. It's >very handy for generating the typeddatasets and basic NUnit tests >though. > >Charlotte > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby >Sent: Tuesday, December 11, 2007 8:27 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >And that is precisely my main complaint. I watched the demo and >codesmith generated SIX PROJECTS with tens of thousands of lines of >code in HUNDREDS of modules. Now what do I do when something doesn't work? >I didn't write the modules, nor the code. > > >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: Tuesday, December 11, 2007 11:18 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >Maybe, but while we use CodeSmith, we hand program around it. If we >didn't understand the concepts and how to implement them without the >tools, that wouldn't be possible. > >Charlotte Foust > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Robert L. >Stewart >Sent: Tuesday, December 11, 2007 7:06 AM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Does anyone have > >For a less steep learning curve, use CodeSmith Tools and .netTiers. >Give you a great data layer. Think of it as Access on steroids as far >as the DAO layer in it is concerned. > >Robert _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 14:07:02 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 15:07:02 -0500 Subject: [dba-VB] Open a filtered form In-Reply-To: References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: <025201c83c31$6550fe50$977aa8c0@M90> OK, but do you understand ADO enough to do it without all of that stuff? Let me say that I am not an ADO kinda guy yet, and then let me show you what I am up against. Here is some actual "example code" for doing this stuff: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Creating connection and command sting Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb" Dim sqlStr As String = "SELECT * FROM Employees" ' Create connection object Dim conn As OleDbConnection = New OleDbConnection(conStr) ' Create data adapter object Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) ' Create a dataset object and fill with data using data adapter's Fill method Dim ds As DataSet = New DataSet da.Fill(ds, "Employees") ' Attach dataset's DefaultView to the datagrid control DataGrid1.DataSource = ds.DefaultViewManager End Sub Now let me ask some questions so that you can perhaps understand how I am confused... >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) Does this actually LOAD the data? Why pass in strSQL if not? >da.Fill(ds, "Employees") This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Intellisense says that I am providing "srcTable" which would indicate that I am asking the data adapter to go look for "Employees" in SQL Server and fill DS with that. If that is the case then why did we do a "SELECT * FROM EMPLOYEES" in the SqlStr? This example is just a mess, and I haven't really found examples where they discuss what is actually happening in any depth. 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: Tuesday, December 11, 2007 1:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From cfoust at infostatsystems.com Tue Dec 11 14:17:11 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 11 Dec 2007 12:17:11 -0800 Subject: [dba-VB] Open a filtered form In-Reply-To: <025201c83c31$6550fe50$977aa8c0@M90> References: <024b01c83c16$10ae61f0$977aa8c0@M90> <025201c83c31$6550fe50$977aa8c0@M90> Message-ID: 1. > >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) >>Does this actually LOAD the data? Why pass in strSQL if not? No it creates a new instance of an OleDbDataAdapter and sets the SQL it will use and the connection, that's all. The dataadapter is the conduit for loading the data into a dataset. 2. >>>da.Fill(ds, "Employees") >>This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Right, this is where the dataSET is filled USING the dataadapter's fill method. Employees is the name of the table in the dataadapter, which usually translates to the name of a table in the database, but not necessarily. A dataadapter can contain multiple tables, so you need to indicate which one to use. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 12:07 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form OK, but do you understand ADO enough to do it without all of that stuff? Let me say that I am not an ADO kinda guy yet, and then let me show you what I am up against. Here is some actual "example code" for doing this stuff: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Creating connection and command sting Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb" Dim sqlStr As String = "SELECT * FROM Employees" ' Create connection object Dim conn As OleDbConnection = New OleDbConnection(conStr) ' Create data adapter object Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) ' Create a dataset object and fill with data using data adapter's Fill method Dim ds As DataSet = New DataSet da.Fill(ds, "Employees") ' Attach dataset's DefaultView to the datagrid control DataGrid1.DataSource = ds.DefaultViewManager End Sub Now let me ask some questions so that you can perhaps understand how I am confused... >Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn) Does this actually LOAD the data? Why pass in strSQL if not? >da.Fill(ds, "Employees") This obviously fills the data adapter, but is "Employees" the NAME of the table internal to the data adapter? Or is it the name of the table in the database? Is it just a reference to a dataset inside of the DA? Intellisense says that I am providing "srcTable" which would indicate that I am asking the data adapter to go look for "Employees" in SQL Server and fill DS with that. If that is the case then why did we do a "SELECT * FROM EMPLOYEES" in the SqlStr? This example is just a mess, and I haven't really found examples where they discuss what is actually happening in any depth. 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: Tuesday, December 11, 2007 1:17 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form We are, but a lot of our code would make no sense outside the context of our framework. Our dataentities (classes that wrap and implement a typeddataset) return a dataset with defaults for the primary keys when appropriate. They also enforce the business rules that prevent saving a record without filling in required fields. We use a NewRecord routine in the form when we need to create a new datarow and populate those values and any other required values before adding the row to the dataset. You can hide columns in the grid without removing them from the dataset. And you can use SQL and ADO to create a recordset with only the specific fields provided for in the commandtext. Our OleDbProvider project includes the standard SQL for filling datasets as defined by the interface classes in the data project. It also includes data provider classes that implement the interfaces and actually return the filled datasets to the data entities. So, in short, code in the form sets the datasource of the grid to the dataset object, but the dataset object is filled in the OleDbProvider classes and handed back to the dataentity class bound to the form. We usually bind a grid to a dataview because it's easy to filter down to just the records you need and it gives you lots of control over the behavior. In many ways it's just like Access, especially if you have a rich data layer to program against instead of going straight against the objects exposed in Server Explorer. You can program against that with full intellisense without being attached to a database until you run the application. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 8:51 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Open a filtered form Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 15:52:18 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 16:52:18 -0500 Subject: [dba-VB] So much for codesmith Message-ID: <000001c83c40$1ac7bbd0$977aa8c0@M90> I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com From dwaters at usinternet.com Tue Dec 11 16:02:23 2007 From: dwaters at usinternet.com (Dan Waters) Date: Tue, 11 Dec 2007 16:02:23 -0600 Subject: [dba-VB] So much for codesmith In-Reply-To: <000001c83c40$1ac7bbd0$977aa8c0@M90> References: <000001c83c40$1ac7bbd0$977aa8c0@M90> Message-ID: <002101c83c41$822c20d0$0300a8c0@danwaters> Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 11 16:07:59 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 12 Dec 2007 01:07:59 +0300 Subject: [dba-VB] So much for codesmith In-Reply-To: <000001c83c40$1ac7bbd0$977aa8c0@M90> Message-ID: <000301c83c42$4a8be790$6401a8c0@nant> Hello John, The following tools look promising but I must say I didn't try them: http://www.llblgen.com/defaultgeneric.aspx http://www.codeauthor.org/ http://www.latticesoft.com/DesktopDefault.aspx?showLogin=N Have a look also at this post telling why CodeSmith (which you've just removed from your system) could be the best choice if you're not going to write your own tool like that yet wanted to have as flexible as possible (custom(-isable)) templates based code generator: http://forums.asp.net/t/757009.aspx HTH... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 12, 2007 12:52 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 16:17:22 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 17:17:22 -0500 Subject: [dba-VB] So much for codesmith In-Reply-To: <002101c83c41$822c20d0$0300a8c0@danwaters> References: <000001c83c40$1ac7bbd0$977aa8c0@M90> <002101c83c41$822c20d0$0300a8c0@danwaters> Message-ID: <000001c83c43$9b6322e0$977aa8c0@M90> LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From michael at ddisolutions.com.au Tue Dec 11 16:48:48 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 12 Dec 2007 09:48:48 +1100 Subject: [dba-VB] So much for codesmith References: <000001c83c40$1ac7bbd0$977aa8c0@M90><002101c83c41$822c20d0$0300a8c0@danwaters> <000001c83c43$9b6322e0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> Hi John, Wow! What a PITA... I gotta say though that when I eval'd it about a year ago I didn't have any problems. The nag screen came up when the tool loaded, asked you to either register or continue trial, that was it! Your not running Vista are you? It's a shame because you would have liked the netTiers stuff. My annoyance threshhold is about the same as yours these days so I would have binned it as well ;-) cheers Michael M To: dwaters at usinternet.com; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 18:24:58 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 19:24:58 -0500 Subject: [dba-VB] So much for codesmith In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> References: <000001c83c40$1ac7bbd0$977aa8c0@M90><002101c83c41$822c20d0$0300a8c0@danwaters><000001c83c43$9b6322e0$977aa8c0@M90> <59A61174B1F5B54B97FD4ADDE71E7D0128A1E1@ddi-01.DDI.local> Message-ID: <000601c83c55$6e267540$977aa8c0@M90> You know there is a shareware version (older), there is a basic version ($99) and there is an advanced version. The basic might not do what I was seeing because it does not integrate into VS 2005 at all, it is just standalone. Perhaps the nag only happens like that from inside of VS 2005? I never tried it standalone. 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 Michael Maddison Sent: Tuesday, December 11, 2007 5:49 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Hi John, Wow! What a PITA... I gotta say though that when I eval'd it about a year ago I didn't have any problems. The nag screen came up when the tool loaded, asked you to either register or continue trial, that was it! Your not running Vista are you? It's a shame because you would have liked the netTiers stuff. My annoyance threshhold is about the same as yours these days so I would have binned it as well ;-) cheers Michael M To: dwaters at usinternet.com; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith LOL, I would have to guess you are right. I can tell you that I right clicked on 5 different things and before I could look at them in the editor I had to answer the nag screen. Yep, EVERY TIME. Given how complex this thing appears to be, how much time will be spent actually doing stuff and how much time clicking OK to the nag screen? I can tell you that I will not be finding out. And yes, it was an error on their part, since (based on testimony from our fellow listers) I was willing to try and probably buy the product. But since I can't see how it works, I guess I'll look at some other product. For all of you folks thinking about using nag screens... it is just fine to pop up once when the program installs. It is OK to pop up once every time the program opens. I would have put up with it once every hour (though it would be an annoyance at that point). Popping up the nag screen every time you do anything will instantly lose you customers. I can tell you that CodeSmith 30 day trial was not installed more than 10 minutes on my machine. Of course you are welcome to the remaining 29 days 23 hours and 50 minutes of my eval time! ;-) Then again you will only get about 2 hours of useful(?) eval over that 30 days since the rest of your time you will spend cussing at a nag screen. NEXT? 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 Dan Waters Sent: Tuesday, December 11, 2007 5:02 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] So much for codesmith Come on . . . That might just have been an error on their part. I'm sure the nag screens aren't as frequent after you purchase it. ;-) Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, December 11, 2007 3:52 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] So much for codesmith I finally managed to get logged in to their site. I downloaded the 30 day evaluation and installed it. I went in to VS 2005 and WOW, there it was. I started clicking on things to see what it is. EVERY time I looked at anything a NAG SCREEN POPPED UP. Not once, not once every hour, not every 5 minutes, EVERY TIME I DID ANYTHING. No I am not exaggerating, EVERY SINGLE (*&^@$#%^)(*& TIME!!! Now how in holy hell are you supposed to evaluate something when you have to knock down a nag screen with every view of every object? Obviously I uninstalled the eval. NEXT? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 _______________________________________________ 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 From michael at ddisolutions.com.au Tue Dec 11 19:51:23 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Wed, 12 Dec 2007 12:51:23 +1100 Subject: [dba-VB] Open a filtered form References: <024b01c83c16$10ae61f0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> Hi John, Is this what you are looking for? I've done the sample as a parent child and used the absolute minimum of code. (4 lines C#) 1. Create blank project 2. Use menu to add Dataset, call it Orders. Project --> Add Class select Dataset from available items. 3. In Server Explorer add a OLEDB connection to Northwind. 4. Drag the Customers, Orders and the Order Details tables onto Orders.xsd (Dataset). If you want read only data then you can right click on the OrdersTableAdapter, Configure, Advanced, untick Generate Insert...etc 5. Save. 6. Go to form1, add DataSet from Toolbox, select Typed dataset from dialog, you should see the Dataset you just created. OK 7. Add 3 text boxes and a combo box to the form1. 8. Add a BindingSource to the form, select Orders1 as the datasource, Orders as the DataMember. 9. Add a BindingNavigator, set the BindingSource to BindingSource1. 10 Bind each of the textboxes. Select the textbox, in the properties window open the DataBindings Node. Click advanced, Binding: select bindingSource1 - OrderID Do the same for the other textboxes, notice the formatting options. 11. Add another BindingSource to form1, DataSource = orders1, DataMember = Customers 12. Binding the Combo. *Different to textbox... >From Combo properties select DataSource - bindingSource2 Go to the code view, in the Form1_Load event add... comboBox1.DataSource = this.bindingSource2; comboBox1.DisplayMember = "CompanyName"; comboBox1.ValueMember = "CustomerID"; comboBox1.DataBindings.Add( "SelectedValue", this.bindingSource1, "CustomerID" ); This completes the parent part of the form. Run the app. Child records will be shown in the DataGridView. 1. Add DataGridView to form. 2. Properties, DataSource, Drill into bindingSource1 and select order details (ordersOrderDetailsBindingSource). Done! Run the app. cheers Michael M Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Dec 11 21:56:51 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 11 Dec 2007 22:56:51 -0500 Subject: [dba-VB] Open a filtered form In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> References: <024b01c83c16$10ae61f0$977aa8c0@M90> <59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> Message-ID: <000b01c83c73$07581da0$977aa8c0@M90> Well it certainly sounds like it. 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 Michael Maddison Sent: Tuesday, December 11, 2007 8:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Open a filtered form Hi John, Is this what you are looking for? I've done the sample as a parent child and used the absolute minimum of code. (4 lines C#) 1. Create blank project 2. Use menu to add Dataset, call it Orders. Project --> Add Class select Dataset from available items. 3. In Server Explorer add a OLEDB connection to Northwind. 4. Drag the Customers, Orders and the Order Details tables onto Orders.xsd (Dataset). If you want read only data then you can right click on the OrdersTableAdapter, Configure, Advanced, untick Generate Insert...etc 5. Save. 6. Go to form1, add DataSet from Toolbox, select Typed dataset from dialog, you should see the Dataset you just created. OK 7. Add 3 text boxes and a combo box to the form1. 8. Add a BindingSource to the form, select Orders1 as the datasource, Orders as the DataMember. 9. Add a BindingNavigator, set the BindingSource to BindingSource1. 10 Bind each of the textboxes. Select the textbox, in the properties window open the DataBindings Node. Click advanced, Binding: select bindingSource1 - OrderID Do the same for the other textboxes, notice the formatting options. 11. Add another BindingSource to form1, DataSource = orders1, DataMember = Customers 12. Binding the Combo. *Different to textbox... >From Combo properties select DataSource - bindingSource2 Go to the code view, in the Form1_Load event add... comboBox1.DataSource = this.bindingSource2; comboBox1.DisplayMember = "CompanyName"; comboBox1.ValueMember = "CustomerID"; comboBox1.DataBindings.Add( "SelectedValue", this.bindingSource1, "CustomerID" ); This completes the parent part of the form. Run the app. Child records will be shown in the DataGridView. 1. Add DataGridView to form. 2. Properties, DataSource, Drill into bindingSource1 and select order details (ordersOrderDetailsBindingSource). Done! Run the app. cheers Michael M Someone here must be opening forms filtered down to a set of records? I need to select a record in a main form and then open another form filtered to records related to the main form. The equivalent of the popup filtered forms from Access. Can anyone show code to cause this to happen? Let's assume for the moment a grid control in the popup form. I assume code in the form will create a data set object and bind the grid to that. I don't want the whole table though, I only want a set of records, a WHERE. And if I enter records I need the PKID from the parent table automagically entered in the new records I am creating. And I don't want the FK field from the parent object displayed in the grid. You know, "just like Access does it", and of course "just like you would logically expect it to be done". Is anyone doing this stuff? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From michael at ddisolutions.com.au Thu Dec 13 00:33:17 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Thu, 13 Dec 2007 17:33:17 +1100 Subject: [dba-VB] C# ArcObjects? References: <024b01c83c16$10ae61f0$977aa8c0@M90><59A61174B1F5B54B97FD4ADDE71E7D0128A1E8@ddi-01.DDI.local> <000b01c83c73$07581da0$977aa8c0@M90> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1F5@ddi-01.DDI.local> Anyone worked with this stuff willing to give a point in the right direction? I need to join a external standalone datatable (Access qry) to a featureclass and export the result to a shape file. O yeah, must use the runtime engine only :-/ cheers Michael M From robert at webedb.com Thu Dec 13 12:30:33 2007 From: robert at webedb.com (Robert L. Stewart) Date: Thu, 13 Dec 2007 12:30:33 -0600 Subject: [dba-VB] C# ArcObjects? In-Reply-To: References: Message-ID: <200712131833.lBDIX4jn018207@databaseadvisors.com> I tried using them at one point and gave up. I use thinkgeo.com's Windows forms objects instead. There is more to creating the shape file than just exporting a query to one. At 12:00 PM 12/13/2007, you wrote: >Date: Thu, 13 Dec 2007 17:33:17 +1100 >From: "Michael Maddison" >Subject: [dba-VB] C# ArcObjects? >To: >Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A1F5 at ddi-01.DDI.local> >Content-Type: text/plain; charset="us-ascii" > >Anyone worked with this stuff willing to give a point in the right >direction? >I need to join a external standalone datatable (Access qry) to a >featureclass and export the result to a shape file. >O yeah, must use the runtime engine only :-/ > >cheers > >Michael M > > > >------------------------------ > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb > > >End of dba-VB Digest, Vol 50, Issue 16 >************************************** From jwcolby at colbyconsulting.com Thu Dec 13 22:48:35 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 13 Dec 2007 23:48:35 -0500 Subject: [dba-VB] Expert VB 2005 Business Objects; Lhotka - was RE: [AccessD] Access or SQL Server Express to web In-Reply-To: <001201c83e0a$80401ea0$ef706c4c@jisshowsbs.local> References: <000301c83dcc$d8155ac0$6401a8c0@nant> <001201c83e0a$80401ea0$ef706c4c@jisshowsbs.local> Message-ID: <001401c83e0c$965c4c20$977aa8c0@M90> I have to say I like this book. This is the book that explains the CSLA framework. It is READABLE, it goes into just enough depth to explain the topic at hand, it explains the pros and cons of different strategies and why he chooses the strategies he chooses. Really quite a nice read for someone at my level to be able to start getting a handle on N tier, business objects, DALs and all that. Fascinating stuff on top of all that. He discusses business objects being passed between machines, and being able to modify the implementation using config files so that you can move the layers onto dedicated machines if necessary! Pretty cool stuff. I had always heard about this stuff but had no idea how they did that. Still don't, but at least I am grasping the concepts now. Recommended. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Thursday, December 13, 2007 11:34 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access or SQL Server Express to web ...I know this will get your goat but we've had over 150 users in mdb sourced pages simultaneously without a hick-up so far ...I'm in the process of moving to SQL Server because the load will get much larger in the next few months but so far, Drew has been right, Access mdbs can take a lot of abuse on the web ...of course I'll freely admit that its read only and I cache the hell out of it ...but still :) ...the web based apps all are hosted on shared win2K3 boxes w plenty of ram and dedicated app spaces. ...the largest intranet based app never has more than ten users in it and the average is probably less than five ...the servers are all Dell PE's w/ 2GB ram and large Raid5 HDs running SBS2003 Premium R2 ...pretty vanilla but I like vanilla in servers :) ...like I said, I cater to small business owners and tend to keep it simple ...something an ignorant lout like me can stay on top of :) ...btw, the MS ajax built into 3.5 works really well compared to that added on to 2.0 ...its a very noticeable difference imnsho, especially in the gridview ...the MS sponsored open-source 3.5 ajax controls toolkit version on the other hand, still has some performance problems with some of the controls ...two steps forward, one step back. William From jwcolby at colbyconsulting.com Sat Dec 15 08:55:54 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 15 Dec 2007 09:55:54 -0500 Subject: [dba-VB] Projects and solutions Message-ID: <004d01c83f2a$983b2b50$977aa8c0@M90> I am writing this set of applications that allow me to import and export data form SQL Server. My needs are somewhat complex in that I tend to need to import directories full of files, which could be CSV or flat files. All of the files need to import into the same table, or a single table needs to be exported into many files, going out to a single directory. Again, flat file or CSV. I also need to do this repetitively, i.e. I get disks every week that need to be imported into the same table, or I need to export the same table every couple of weeks. Thus I am have built a set of four fairly simple projects. Each has a similar structure, tables that define the import or export with information such as the source or target table, the source or target directory, the max file size if an export, the chunk size to import (for timing issues) on import, log files and tables to log the progress etc. So I built these four applications, and I now need to tie them together so that I can have a single control panel to start the applications, or to edit the tables that define an import or export job. My question is, should I pull all four of these into a single project or should I leave them out in their respective projects and just run them in place? If I should leave them as separate projects, what are the mechanics behind tying them into a solution? John W. Colby Colby Consulting www.ColbyConsulting.com From shamil at users.mns.ru Sat Dec 15 14:30:16 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Sat, 15 Dec 2007 23:30:16 +0300 Subject: [dba-VB] Projects and solutions In-Reply-To: <004d01c83f2a$983b2b50$977aa8c0@M90> Message-ID: <000001c83f59$4d835130$6401a8c0@nant> John, I'd put your four projects into four classlib projects and create another (FE dispatch) project and keep all of them within one solution... You can also have dedicated thread for every of the four projects/classlibs when you call them from FE project - that could make overall elapsed time to run all four of them (considerably) less if that is needed/possible at all to run all four of them in parallel... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, December 15, 2007 5:56 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Projects and solutions I am writing this set of applications that allow me to import and export data form SQL Server. My needs are somewhat complex in that I tend to need to import directories full of files, which could be CSV or flat files. All of the files need to import into the same table, or a single table needs to be exported into many files, going out to a single directory. Again, flat file or CSV. I also need to do this repetitively, i.e. I get disks every week that need to be imported into the same table, or I need to export the same table every couple of weeks. Thus I am have built a set of four fairly simple projects. Each has a similar structure, tables that define the import or export with information such as the source or target table, the source or target directory, the max file size if an export, the chunk size to import (for timing issues) on import, log files and tables to log the progress etc. So I built these four applications, and I now need to tie them together so that I can have a single control panel to start the applications, or to edit the tables that define an import or export job. My question is, should I pull all four of these into a single project or should I leave them out in their respective projects and just run them in place? If I should leave them as separate projects, what are the mechanics behind tying them into a solution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Mon Dec 17 15:41:00 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 00:41:00 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: <001401c840f5$843fd480$6401a8c0@nant> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn?t allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From wdhindman at dejpolsystems.com Tue Dec 18 02:13:10 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 18 Dec 2007 03:13:10 -0500 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <002801c8414d$d4c8dd40$ef706c4c@jisshowsbs.local> ...if you control the server then you can install the MS limitlogin script to manage this. ...if you have to do it from asp.net I'd think setting the session username to null and then calling session abandon on logout would kill the current session data so a second login with the same username would be moot ...or not :) ...haven't had a need to do anything like this so I'm not sure what you're looking for here. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Tue Dec 18 02:23:39 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 18 Dec 2007 03:23:39 -0500 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 03:02:57 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 10:02:57 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From shamil at users.mns.ru Tue Dec 18 03:03:18 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 12:03:18 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when thisloginis in use in active session? In-Reply-To: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> Message-ID: <000001c84154$d5601000$6401a8c0@nant> Yes, William, the article you refer is the closest to what I'm hunting for... (BTW, what Google(?) search criteria did you use to find it - I missed it when looking for such information in Google) Yes, this is the closest to what I'm looking for but still it isn't what I need I think (but it looks like there is no other more close solution)... In fact I planned to implement something like proposed by this article but still at least one(?) problem exists with this solution: - if a user will close the browser and then immediately will try to login using the same FormsAuthentication credentials then he will be "kicked-out" every time until Cache object simulating Session_End expires... That's not a big issue(?) - a user will have to wait between 15 and 30 minutes to login again - usual session time-out... But I anticipate "angry users" calls if that solution implemented... I can try to use an IP of a user trying to login and compare it with IP stored with the info on cached login, which isn't yet expired - and if it's not then I can use SetAuthCookie (using session cookie stored in my session object to "catch" live session) but then here is another "use case": user has a couple of PCs on his desktop, he closes browser on one of them and thus leave his session active on server side until time out happens, and then this user tries to login using the same credentials from another PC but he will be "kicked out" because there is no expired session information simulated in custom Cache object, which will be there until this Cache object expires... Sorry for such a "hectic" e-mail but it looks like (and the article you referred approves(?) that) - it looks like this simple(?) issue doesn't have a satisfactory solution covering all of/most of the possible use cases... Going circles here... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Tuesday, December 18, 2007 11:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when thisloginis in use in active session? http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 04:30:25 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 13:30:25 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how topreven using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <000301c84161$0078f7a0$6401a8c0@nant> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 05:10:09 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 12:10:09 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil > Am I missing simple solution of the subject issue? Or maybe I am ...? The difference is that I have only made some careful thoughts about this for an upcoming application, while you are actively dealing with real code and test. In the scenario you describe, which is very likely to happen, at the second login the user would need to make a choice. If he choses to keep the new session, your app kills the first. At the third login, if he choses to keep that, the second session (and the first if still alive) would be killed by the app. On the other hand, if he cancels new a login, the previous session will not be affected while the new session will be killed (message: Login cancelled, session closed). Of course, the browser windows will not close, but if he tries to operate the first or second session, a page will be displayed telling that the session has been closed. If this is not possible, please tell. /gustav >>> shamil at users.mns.ru 18-12-2007 11:30 >>> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From Gustav at cactus.dk Tue Dec 18 05:48:04 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 12:48:04 +0100 Subject: [dba-VB] How to download full (admin) .Net 3.0 SP1 Message-ID: Hi all Had a struggle to find this out: http://go.microsoft.com/fwlink/?LinkId=98105 That was shown here: http://blogs.msdn.com/aaronru/archive/2007/12/13/creating-net-framework-3-0-sp1-redist.aspx The official page only carries the small download bootstrapper. The full package is 25.6 MB. /gustav From accessd at shaw.ca Tue Dec 18 08:29:34 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:29:34 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <001401c840f5$843fd480$6401a8c0@nant> References: <001401c840f5$843fd480$6401a8c0@nant> Message-ID: <9D3F9F3ECCFD42ABAB2DD7A8D1A94195@creativesystemdesigns.com> Hi Shamil: The login limitations are set at the server end. Everything from who can login, when they can login, how long they can login for, what can be accessed when login is obtained, the level of password complexity and even if they can login in more than once. This is all set at the Server login using roles, groups and policies. The user can be confronted at the splash or landing page to login and from the login the user ability is controlled from the server. That is the server's role and not the responsibility of the presentation section of the application whether desktop of browser. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Monday, December 17, 2007 1:41 PM To: 'Access-D - VB' Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 08:39:15 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:39:15 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when this loginis in use in active session? In-Reply-To: <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> References: <001401c840f5$843fd480$6401a8c0@nant> <000301c8414f$4bb4efb0$ef706c4c@jisshowsbs.local> Message-ID: <97764B4BA3C04701A0BA325C688FB2A0@creativesystemdesigns.com> The link is a great piece and example of code, William. The one comment I make about the code sample is that a large professional site should never use 'sa' login style; they should use user groups or windows authentication instead. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Tuesday, December 18, 2007 12:24 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to preventusingthe same login *second* time from another PC when this loginis in use in active session? http://www.eggheadcafe.com/articles/20030418.asp ...maybe this is closer to what you are after. William ----- Original Message ----- From: "Shamil Salakhetdinov" To: "'Access-D - VB'" Sent: Monday, December 17, 2007 4:41 PM Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent usingthe same login *second* time from another PC when this loginis in use in active session? Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From accessd at shaw.ca Tue Dec 18 08:57:47 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 06:57:47 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: References: Message-ID: The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 08:58:45 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 15:58:45 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Jim So how would you approach this? /gustav >>> accessd at shaw.ca 18-12-2007 15:57 >>> The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil From shamil at users.mns.ru Tue Dec 18 09:52:05 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 18:52:05 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: Message-ID: <004201c8418d$f1d15080$6401a8c0@nant> Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 09:52:05 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 18:52:05 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <004101c8418d$f17dd950$6401a8c0@nant> Hello Gustav, The subject issue sounds simple but it looks like it doesn't have a "perfect" solution: there are so many issues involved here starting from usability, scalability, stateless/stateful apps, current context,....., and ending in application access roles, membership and security - there are so many that issues that we can discuss them here endlessly - my Internet search from yesterday evening and this day gave me many sometimes contradictory "hints" that I must say I should abandon all of them and just use "common sense" here: agree with customer what way to solve the subject issue suites my customer best of all and just implement it: - we currently agreed it's not a problem for a user to wait for 15-30 minutes for an abandoned session to expire, and for testing purposes I will have "killing" functionality implemented - later on when all the other custom functionality will be ready I will try to find out is it possible to release this "killing sessions" functionality for user mode system access - if that will not look hazardous to the system consistency then I will adjust and release this "session killing" functionality... (the apps under development does have a part talking to the external Credit Card processing provider/server - and this is two/three steps process which should be better not interrupted at least when external server talks back to our app which should process this answer in one go: yes, I can program it that way but better later than now because as usual time frame to finish development and release the first public version is very strict... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 2:10 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil > Am I missing simple solution of the subject issue? Or maybe I am ...? The difference is that I have only made some careful thoughts about this for an upcoming application, while you are actively dealing with real code and test. In the scenario you describe, which is very likely to happen, at the second login the user would need to make a choice. If he choses to keep the new session, your app kills the first. At the third login, if he choses to keep that, the second session (and the first if still alive) would be killed by the app. On the other hand, if he cancels new a login, the previous session will not be affected while the new session will be killed (message: Login cancelled, session closed). Of course, the browser windows will not close, but if he tries to operate the first or second session, a page will be displayed telling that the session has been closed. If this is not possible, please tell. /gustav >>> shamil at users.mns.ru 18-12-2007 11:30 >>> Hi Gustav, I think I can't use the solution you propose: one of the reasons is that my web application has some context for every logged in user and that context should be unique, and if I implement this: "It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login." then a user will be able to start two, three,... *instances* of a browser on the same PC and if they will select "keep that session open" then they will have the same session in all these browser instances but every of these instances can have different context etc. - all in all that could/will result in a havoc... I'd think the only current workaround is to: - use solution proposed in the articles William referred in this thread; - implement special Admin functionality to "kill" the sessions and their context using User Login names (this functionality will be used by support desk for the impatient users calling them who didn't logout explicitly but who wanted to login back immediately); - (the next is in uppercase because this is how it probably should be done in User Manual) WRITE IN THE USER DOC IN UPPERCASE THAT IF THEY WILL CLOSE THEIR BROWSER WITHOUT LOGGING OUT THEN THEY WILL HAVE TO WAIT xx minutes until their session context expires on server side... Of course this solution doesn't look perfect (or even satisfactory) but it looks like the only one to prevent the havoc? Am I still missing something? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 12:03 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 10:20:54 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 17:20:54 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time fr Message-ID: Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... From shamil at users.mns.ru Tue Dec 18 11:02:13 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Tue, 18 Dec 2007 20:02:13 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr In-Reply-To: Message-ID: <004601c84197$bcb932a0$6401a8c0@nant> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Gustav at cactus.dk Tue Dec 18 11:27:12 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 18 Dec 2007 18:27:12 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Message-ID: Hi Shamil Oh, that is a nightmare. I just opened three tabs (it's me at 213.150.48.58) and the only parameter changing is Page View Count. And that counts up also if the user requests a refresh of the browser window! And it counts down as the sessions time out. Not very useful. So now what? Could a client side GUID be generated that was recorded at server side? Sadly, I have little time to work intensively with this right now - a web session on the new MySQL Falcon engine is approaching - but count me in if you need further testing - it would be really nice to find out how to deal with this issue which will pop up again and again. /gustav >>> shamil at users.mns.ru 18-12-2007 18:02 >>> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... From accessd at shaw.ca Tue Dec 18 13:31:16 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 11:31:16 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: References: Message-ID: <1A5EB2DC14054A6CBC3C398270F7597B@creativesystemdesigns.com> Hi Gustav: I think someone should either be stopped at the login or allowed to on. By setting the policies on a group of users, through the Group Policy Management Console (GPMC), added/attaching the group to the SQL Server > Security > Logins section. Within GPMC the login ability of a group can set to only one active session at a time. In effect the MS SQL server is managing rights of the user. (I have not checked to see whether this ability is extended to SQL Server Express but I am almost positive it is...) Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 6:59 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Jim So how would you approach this? /gustav >>> accessd at shaw.ca 18-12-2007 15:57 >>> The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 13:51:18 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 11:51:18 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <004201c8418d$f1d15080$6401a8c0@nant> References: <004201c8418d$f1d15080$6401a8c0@nant> Message-ID: <15EBF9201DFA4F2E823608B7104BF6B4@creativesystemdesigns.com> Hi Shamil: Looks like a good plan. If the web server is either IIS there is a default web site inactivity session timeout of between 120 and 200 seconds. That can be set to any value, like 10 minutes or 600 seconds when the "Ebable HTTP Keep-Alives" turned off (un-checked). So if there is no activity for an extended period of time the connection and session is closed. There are a number of other settings that can be set on the IIS to control duration; See: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3 1a2f39c-4d59-4cba-905c-60e7af657e49.mspx?mfr=true for details. If you tune up IIS for your application/web site that should handle most events. Do you have access to the BE server? Is this what you are looking for? Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 7:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 18 14:06:10 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 18 Dec 2007 12:06:10 -0800 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr In-Reply-To: <004601c84197$bcb932a0$6401a8c0@nant> References: <004601c84197$bcb932a0$6401a8c0@nant> Message-ID: <0B14524FF51E40968C9C3895FB534E2B@creativesystemdesigns.com> That is a good article... Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 9:02 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ 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 From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? In-Reply-To: Message-ID: <000401c841d8$ea5f88d0$6401a8c0@nant> Hi Gustav, It looks like I have found a rather generic solution - here it's: Requirements: ------------- Allow ===== - to have multiple tabs opened for a browser instance for a logged-in user: all tabs will share the same login and Session id (this login/sessionId sharing is a feature by design of browsers, ASP.NET, forms authentication, custom functionality) - a session of an abandoned browser to expire in 15-30 minutes and then another session can be started with the same login or - "optionally kill" active login's session - first informing the user trying to use login, which is currently used in an active session that his attempt will "kill" active session, which he probably abandoned (by mistake) without explicit logout ... Prevent ======= - to use the same login with another instance of a browser running on the same PC; - to use the same login on another PC, while this login is active (logged-in) somewhere else; - running (loading, rendering web page) by copying & pasting URL from one tab's window to another tab within one browser instance or to another browser instance... To implement above requirements I plan to: ------------------------------------------ Before navigating to a URL with my Web App: =========================================== - prepare context parameters to put them in the URL's QueryString to keep initial rendering state/context for a Web Page to be navigated/transferred; - generate a unique hash for the QueryString using the following values: 1) Login name; 2) login timestamp - created on login and stored in Cache using login name as a key; 3) The session navigation step Id (navid) - unique sequential number incremented for every Redirect/Transfer and kept on the Session level; 4) SessionId (the fact is that Sessionid can be the same for logins/logouts for the same/other logins when these logins are happening in one browser instance...) This hash will be added to the QueryString together with navId; - make an URL with parameters and navigate/transfer to it; On page loading/building on server side I will: =============================================== - use generated hash to create Session[...] item key on page's first load within given context (!Page.IsPostback); - if the same query string will be used (copy & paste) on another *tab of the same browser instance* then I can check that this hash was already used (by reading Session[...] item) when rendering the first page and I will cancel rendering of the second's tab page.... - if the same query string will be used (copy & paste) on another *instance* of a browser then by recreating hash I will see that it will not fit the SessionId and I will cancel rendering page on the second browser instance... - IOW this hash will be a good measure to prevent compromising the QueryString values... - the Session[....] hash value has to be cleared out/saved in db when navigating to another URL, that will not always be possible, but that should be rare occasions and therefore I expect there will be not be that much "hanging abandoned hashes"... Additionally ============ - to prevent copied & pasted URL with QueryString parameters to be used within the same browser instance when first page is navigated out I can keep hash saved in the db table and this table's data used for the check described above. This table's data will be cleared when session ends/expires or this data can be used as a navigation audit trail... Summary ====== It looks like I covered all the possible variations - still the above solution is rather simple to implement and it's scalable... Currently I will just use QueryString to keep navigation context: QueryString is known as being an insecure for compromising attempts but because of the fact that I plan to add a hash to this QueryString in (the near) future I will keep it secure: and the hash calculation/check will be done in the generic part of my code as well as mentioned above navId caluclation, as well as keeping session login timeStamp in Cache[...], as well as keeping page rendering hash in Session[...], as well as clearing Session[...] hash/saving it in DB when navigating out or when session gets expired... Final note: =========== Originally I planned to stop using QueryString because it's commonly accepted as insecure but the solution above allows me (?) to continue using it (QueryString) without that much additional efforts and having it good enough secured (I have a Web app under development, which has different user contexts depending on roles and these contexts' can be dynamically changed without logging-out/-in, and users are rather inexperienced, and this application have to communicate with external credit card processing server, and this application should have easy navigation, and this application should place consistent orders, which are generated from shopping cart(s)' items, which in turn are collected in different contexts in which e.g. a user can be an admin making an order for a customer who in turn purchases a service for another customer who should be able to see this to be purchased service as owned by his account when purchase completes but the first customer should have this service paid from his accountetc... Because of this relative complexity of the app I looked for a solution, which is presented above, which isn't contradictory (?) and which is not that a big issue to implement generic way.... Being here now I will probably even weaken the requirement stating to not let an URL with QueryString parameters to be copied & pasted and activated (corresponding page loaded/rendered) within tabs of one browser instance: I will let to do that except just one case when application redirects to an external credit cards processing service - this service should be redirected only once within check-out process and until it calls back transaction is not finished... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 8:27 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how toprevent using the same login *second* time from another PCwhen this login is in use in active session? Hi Shamil Oh, that is a nightmare. I just opened three tabs (it's me at 213.150.48.58) and the only parameter changing is Page View Count. And that counts up also if the user requests a refresh of the browser window! And it counts down as the sessions time out. Not very useful. So now what? Could a client side GUID be generated that was recorded at server side? Sadly, I have little time to work intensively with this right now - a web session on the new MySQL Falcon engine is approaching - but count me in if you need further testing - it would be really nice to find out how to deal with this issue which will pop up again and again. /gustav >>> shamil at users.mns.ru 18-12-2007 18:02 >>> Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr In-Reply-To: <0B14524FF51E40968C9C3895FB534E2B@creativesystemdesigns.com> Message-ID: <000b01c841d8$eb90b5d0$6401a8c0@nant> Yes, I agree, the author - Faisal Khan - wrote really good article and made a very useful and well running sample for it. Here I found another interesting article by the same author: http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 11:06 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr That is a good article... Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 9:02 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Hi Gustav, OK, killing session when simultaneous FormsAutentication login with the same credentials happens or wait 20 minutes this is one "programmers' nightmare" issue, and here is another one: - in IE7 (or FireFox 2.x +) you can open several tabs in one browser instance and then all these tabs' windows will share the same session... How about that "nightmare"? I have got deployed here http://shamils-4.hosting.parking.ru/Sessions a sample from this article http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 by setting session time-out for three minutes just for testing purposes to see how sessions expire and how one browser's instance tabs share the same session ID... Now imagine a Web app having context (i.e. some internal state) and a user opening several tabs in one browser instance and copying and pasting URL "to see what happens" or to maybe do several tasks with the same Web app having issues the *same* session Ids for one login, which could be working on one task when this user switches and prepares another. When FormsAuthentication added then user *will not* need to login again if he copy and paste URLs in windows of the different tabs of the same browser instance... Server side app will not be aware how many windows are opened on client side without special measures... What those measures should be to differentiate calls coming from different windows having the same URL, same session Id, same Forms Authentication cookie? I currently see the only "simple" solution to have hidden HTML field(s) with some IDs for every page returned from server to browser, and when browser posts back such page then this ID expires and is changed to another, and server side app has to keep track of these custom IDs, and when they are sent via callback remove them etc. ... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 7:21 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent using the same login *second* time fr Hi Shamil That was my thoughts and conclusion. And it does have that complication. However, at _any_ time the user can "pull the plug" - in many ways with or without intention. I think that's the programmer's nightmare all the time to consider "what happens at this point if the user session is killed?". The user may loose data typed in, but the app should not crash and stored data should not get corrupted. Further, you cannot educate users to always logout clicking a button. As the good guy I am I always try to do so, but in Hotmail you are redirected to msn.com which I hate, thus I always close a Hotmail session by clicking the close button of the window, and most users will do as well as they forget or don't understand why not to do so. Also, your client must be really nice and patient! Keeping a user logged out for about 20 minutes if something happens will not raise popularity among users. Again, users are impatient and will not understand why they can not just log in again. /gustav >>> shamil at users.mns.ru 18-12-2007 16:52 >>> ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... _______________________________________________ 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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Tue Dec 18 18:48:47 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 19 Dec 2007 03:48:47 +0300 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? In-Reply-To: <15EBF9201DFA4F2E823608B7104BF6B4@creativesystemdesigns.com> Message-ID: <001201c841d8$ec163980$6401a8c0@nant> Hi Jim, I need to find a solution independent on the fact do I have available dedicated Windows/IIS/ASP.NET server or my/my customers' web app run on a hosted windows/asp.net server, which could not have available for me options to fine tune IIS attributes/properties... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 10:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil: Looks like a good plan. If the web server is either IIS there is a default web site inactivity session timeout of between 120 and 200 seconds. That can be set to any value, like 10 minutes or 600 seconds when the "Ebable HTTP Keep-Alives" turned off (un-checked). So if there is no activity for an extended period of time the connection and session is closed. There are a number of other settings that can be set on the IIS to control duration; See: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3 1a2f39c-4d59-4cba-905c-60e7af657e49.mspx?mfr=true for details. If you tune up IIS for your application/web site that should handle most events. Do you have access to the BE server? Is this what you are looking for? Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, December 18, 2007 7:52 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hello Jim, Thank your for your comments. The ASP.NET 2.O's default time-out is 30 minutes. I can change it to 2 mins but then it may become not user-friendly because while working with Web-Forms users may have breaks and when they are back then they will have their session closed... ...this means (for me at least) that subject issue doesn't have a "perfect" solution and "workaround" solutions, which could be many, should be based on agreement with the customer of the application under development... ...I currently got into agreement with the customer that this will not be an issue to wait for 15-30 minutes for the users to login again if they quit/abandon browsers without clicking explicit logout... The solution could be also a JavaScript "talking to" server automatically within given short time intervals (1 minute?) in background from client browser using ASP.NET 2.0 callback feature (http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/ ) - then I can set my ASP.Net 2.0 app' time out to 3 minutes (not 30 as it's now) and this time-out will be a "sliding" one - IOW after each JavaScript's polling of the ASP.Net server this time-out will be reset, if user abandons browser without explicit logout then in 2 minutes their session will expire... ...on the other hand - if users will leave their browser running while leaving for lunch, weekend etc. then their session will never expire - not good from (at least) security reasons... ...and here we "go circles" again... ...then this automatic JavaScript polls/server code accepting these polls should take into account were there any real page requests from the same client/session between polls within say one-two hours (the maximum time-out one wanted to have their browser idle but without "killing" server side session) and if there were not such requests then such idle session should be aborted... ...all above is too complicated to be true... ...the most user-friendly looks like to "kill" existing session when a login with the same FormsAuthentication credentials happens - this should be a rare occasion after all and this will not force users to wait until session time-out expires... ...the only complication for the latter approach is that Web application keeping some state information should be ready to be "killed" any time - I mean when they get "killed" they shouldn't leave the system and back-end database in inconsistent state - the "killer: should be able to "catch-on" on the session it "kills"... ...yes, I know web applications should be better programmed completely stateless - trying to achieve that here but not yet there - have to convince customer to change the ways they usually work with desktop apps - I mean to not expect the same "stateful" behavior from Web apps because "it's all two blades sword" - you gain in one feature/functionality/usability issue - you loose in another... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 18, 2007 5:58 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? The length of a login session, through the browser should be controlled from the IIS server. That by default has a 120 second inactivity session time-out. It can be of course set to anything. This is usually in the default web site through the IIS manager. This can be changed per web site: properties > Web Site tab > Connection Timeout/ Enable HTTP Keep-Alives. If for some reason you bale after login you may find yourself waiting to login as the IIS server will not immediately know a connection session is no longer active. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, December 18, 2007 1:03 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication: how to prevent using the same login *second* time from another PC when this login is in use in active session? Hi Shamil To me there is no reason to block another login of the same user - the second login attempt may be perfectly legitimate - among others due to a OS crash, the user has changed machine, or the user was interrupted and forgot the first session. A better method, in my opinion, is to check at login if a session with the user credentials exists and, if so, pop a message similar to: It appears that you have already logged in. You can either keep that session open and cancel this login, or close that session and continue using this login. That should cover all scenarios and should make sense for the user. It frees you from time-out considerations and allow you - in the last case - to simply kill the old session. /gustav >>> shamil at users.mns.ru 17-12-2007 22:41 >>> Hi All, I can't find answer/solution for the subject question: - isn't it built-in in ASP.NET 2.0 Forms Authentication? - Am I missing its description somewhere in MSDN or on Web? Here is the issue I wanted to solve: - Forms Authentication is used for and ASP.Net application; - there are two (or more) test PCs; - there are two (or more) testers using these PCs; - these two (or more) testers have a set of shared test login/passwords pairs; - when a certain login/password is used by one tester then ASP.NET application shouldn't allow to use it again from another test PC (or from the same test PC but in another browser instance); - on the other hand if the session where a certain login used expires then obviously this login could be used on the second PC etc.... I'm looking and I can't find something like a simple function, which I expected should have been built-in in ASP.NET Forms Authentication (System.Web.Security.FormsAuthentication class or related classes) 1. DoesGivenLoginHasAnActiveSessionRunning() ... ASP.ET does gave an event which fires when Session expires - this is [Global.asax].Session_End(...) but it fires on time-out only, which is usually about 20 minutes... Now imagine that a certain login was used, and the browser in which this login was used exited but ASP.NET application on server "doesn't know" yet that the browser exited and this ASP.NET application has to keep continues to keep application state related to login and until Session_End(...) fires this state will be kept, and ASP.Net application will not let to login using the same login, which actually has a "dead session" hanging on server... I can implement "session hijacking & killing" IOW when the same login/password is used while there is a live session running on server side then this second login "kills" first session. That solution looks rather simple to implement but is that the only option? Am I missing simple solution of the subject issue? Thank you. -- Shamil _______________________________________________ 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 _______________________________________________ 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 From Gustav at cactus.dk Wed Dec 19 05:21:01 2007 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 19 Dec 2007 12:21:01 +0100 Subject: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent usingthe same login *second* time fr Message-ID: Hi Shamil Thanks for that link - looks extremely On Topic, and for your comprehensive thoughts in the other mail. I'll have to study them carefully at some later after-office hours ... /gustav >>> shamil at users.mns.ru 19-12-2007 01:48 >>> Yes, I agree, the author - Faisal Khan - wrote really good article and made a very useful and well running sample for it. Here I found another interesting article by the same author: http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 -- Shamil From wdhindman at dejpolsystems.com Wed Dec 19 11:07:45 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Wed, 19 Dec 2007 12:07:45 -0500 Subject: [dba-VB] ASP.NEt 2.0: FormsAuthentication:how to prevent usingthe same login *second* time fr References: <000b01c841d8$eb90b5d0$6401a8c0@nant> Message-ID: <001601c84261$ad4b3ff0$ef706c4c@jisshowsbs.local> ...that's a very useful resource site ...tks William ----- Original Message ----- From: "Shamil Salakhetdinov" To: Sent: Tuesday, December 18, 2007 7:48 PM Subject: Re: [dba-VB] ASP.NEt 2.0: FormsAuthentication:how to prevent usingthe same login *second* time fr > Yes, I agree, the author - Faisal Khan - wrote really good article and > made > a very useful and well running sample for it. > > Here I found another interesting article by the same author: > http://www.stardeveloper.com/articles/display.html?article=2007040101&page=1 > > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Tuesday, December 18, 2007 11:06 PM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > usingthe same login *second* time fr > > That is a good article... Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil > Salakhetdinov > Sent: Tuesday, December 18, 2007 9:02 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > usingthe same login *second* time fr > > Hi Gustav, > > OK, killing session when simultaneous FormsAutentication login with the > same > credentials happens or wait 20 minutes this is one "programmers' > nightmare" > issue, and here is another one: > > - in IE7 (or FireFox 2.x +) you can open several tabs in one browser > instance and then all these tabs' windows will share the same session... > > How about that "nightmare"? > > I have got deployed here > > http://shamils-4.hosting.parking.ru/Sessions > > a sample from this article > > http://www.stardeveloper.com/articles/display.html?article=2002102501&page=1 > > > by setting session time-out for three minutes > > mode="InProc" > cookieless="AutoDetect" > timeout="3" /> > > just for testing purposes to see how sessions expire and how one browser's > instance tabs share the same session ID... > > Now imagine a Web app having context (i.e. some internal state) and a user > opening several tabs in one browser instance and copying and pasting URL > "to > see what happens" or to maybe do several tasks with the same Web app > having > issues the *same* session Ids for one login, which could be working on one > task when this user switches and prepares another. When > FormsAuthentication > added then user *will not* need to login again if he copy and paste URLs > in > windows of the different tabs of the same browser instance... > > Server side app will not be aware how many windows are opened on client > side > without special measures... > > What those measures should be to differentiate calls coming from different > windows having the same URL, same session Id, same Forms Authentication > cookie? > > I currently see the only "simple" solution to have hidden HTML field(s) > with > some IDs for every page returned from server to browser, and when browser > posts back such page then this ID expires and is changed to another, and > server side app has to keep track of these custom IDs, and when they are > sent via callback remove them etc. > > ... > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, December 18, 2007 7:21 PM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] ASP.NEt 2.0: Forms Authentication:how to prevent > using > the same login *second* time fr > > Hi Shamil > > That was my thoughts and conclusion. > And it does have that complication. However, at _any_ time the user can > "pull the plug" - in many ways with or without intention. I think that's > the > programmer's nightmare all the time to consider "what happens at this > point > if the user session is killed?". The user may loose data typed in, but the > app should not crash and stored data should not get corrupted. > > Further, you cannot educate users to always logout clicking a button. As > the > good guy I am I always try to do so, but in Hotmail you are redirected to > msn.com which I hate, thus I always close a Hotmail session by clicking > the > close button of the window, and most users will do as well as they forget > or > don't understand why not to do so. > > Also, your client must be really nice and patient! Keeping a user logged > out > for about 20 minutes if something happens will not raise popularity among > users. Again, users are impatient and will not understand why they can not > just log in again. > > /gustav > >>>> shamil at users.mns.ru 18-12-2007 16:52 >>> > > > > ...the most user-friendly looks like to "kill" existing session when a > login > with the same FormsAuthentication credentials happens - this should be a > rare occasion after all and this will not force users to wait until > session > time-out expires... > > ...the only complication for the latter approach is that Web application > keeping some state information should be ready to be "killed" any time - I > mean when they get "killed" they shouldn't leave the system and back-end > database in inconsistent state - the "killer: should be able to "catch-on" > on the session it "kills"... > > ...yes, I know web applications should be better programmed completely > stateless - trying to achieve that here but not yet there - have to > convince > customer to change the ways they usually work with desktop apps - I mean > to > not expect the same "stateful" behavior from Web apps because "it's all > two > blades sword" - you gain in one feature/functionality/usability issue - > you > loose in another... > > > > > _______________________________________________ > 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 > > _______________________________________________ > 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 > From newsgrps at dalyn.co.nz Thu Dec 20 20:27:15 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 15:27:15 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <200712071829.lB7ISxDd021422@databaseadvisors.com> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> Message-ID: <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Group, I couldn't work out how this could be done so I am trying the group again. I am using VB.net in Visual Studio 2005. This is a web application. I have code that gets the path and name of a pdf file located on a server. What I want to do within the code is have a file download box open which gives the user an option of opening or saving the PDF file. The Process class doesn't deem to help because it tries to open the file on the web server (and not the user's). My.Computer.Network.DownloadFile Method seems to require a destination path and filename, but I don't want it to automatically be saved. Regards David Emerson Dalyn Software Ltd Wellington, New Zealand From michael at ddisolutions.com.au Thu Dec 20 20:42:31 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 21 Dec 2007 13:42:31 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> Hi David, I guess the links I sent you didn't do the job then... How about 2 links on the page, 1 to the pdf that will open it in the browser. The other to a zip of the pdf that can be downloaded. Too simple? ;-) cheers Michael M -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Friday, 21 December 2007 1:27 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Group, I couldn't work out how this could be done so I am trying the group again. I am using VB.net in Visual Studio 2005. This is a web application. I have code that gets the path and name of a pdf file located on a server. What I want to do within the code is have a file download box open which gives the user an option of opening or saving the PDF file. The Process class doesn't deem to help because it tries to open the file on the web server (and not the user's). My.Computer.Network.DownloadFile Method seems to require a destination path and filename, but I don't want it to automatically be saved. Regards David Emerson Dalyn Software Ltd Wellington, New Zealand _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 20 20:56:52 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 15:56:52 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> Message-ID: <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Michael, I looked at the two links. The first got me in the right direction but didn't provide a direct solution. The second one was an addon for Firefox which most of the users don't have. However, I have found a couple of links that might solve the problem: http://www.west-wind.com/WebLog/posts/76293.aspx http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_Dialog David At 21/12/2007, you wrote: >Hi David, > >I guess the links I sent you didn't do the job then... > >How about 2 links on the page, 1 to the pdf that will open it in the >browser. >The other to a zip of the pdf that can be downloaded. > >Too simple? ;-) > >cheers > >Michael M > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:27 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Group, > >I couldn't work out how this could be done so I am trying the group >again. > >I am using VB.net in Visual Studio 2005. This is a web application. I >have code that gets the path and name of a pdf file located on a server. >What I want to do within the code is have a file download box open which >gives the user an option of opening or saving the PDF file. > >The Process class doesn't deem to help because it tries to open the file >on the web server (and not the user's). > >My.Computer.Network.DownloadFile Method seems to require a destination >path and filename, but I don't want it to automatically be saved. > > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > >_______________________________________________ >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 From michael at ddisolutions.com.au Thu Dec 20 22:23:12 2007 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 21 Dec 2007 15:23:12 +1100 Subject: [dba-VB] Launch and monitor external programs from .NET References: <200712071829.lB7ISxDd021422@databaseadvisors.com><20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> Looking through the comments from http://www.west-wind.com/WebLog/posts/76293.aspx it appears that Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") ); will fail in some circumstances... one of the many reasons I prefer working with desktop apps. good luck! Michael M From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Friday, 21 December 2007 1:57 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Launch and monitor external programs from .NET Michael, I looked at the two links. The first got me in the right direction but didn't provide a direct solution. The second one was an addon for Firefox which most of the users don't have. However, I have found a couple of links that might solve the problem: http://www.west-wind.com/WebLog/posts/76293.aspx http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_ Dialog David At 21/12/2007, you wrote: >Hi David, > >I guess the links I sent you didn't do the job then... > >How about 2 links on the page, 1 to the pdf that will open it in the >browser. >The other to a zip of the pdf that can be downloaded. > >Too simple? ;-) > >cheers > >Michael M > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:27 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Group, > >I couldn't work out how this could be done so I am trying the group >again. > >I am using VB.net in Visual Studio 2005. This is a web application. I >have code that gets the path and name of a pdf file located on a server. >What I want to do within the code is have a file download box open >which gives the user an option of opening or saving the PDF file. > >The Process class doesn't deem to help because it tries to open the >file on the web server (and not the user's). > >My.Computer.Network.DownloadFile Method seems to require a destination >path and filename, but I don't want it to automatically be saved. > > >Regards > >David Emerson >Dalyn Software Ltd >Wellington, New Zealand > >_______________________________________________ >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 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Thu Dec 20 23:03:34 2007 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 21 Dec 2007 18:03:34 +1300 Subject: [dba-VB] Launch and monitor external programs from .NET In-Reply-To: <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> Message-ID: <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> I looked and couldn't see the problems you were referring to. My app seems to work ok (fingers crossed). The only problem I have now is that if I want two different PDF's downloaded they can't be done. The reason seems to be that Respond.End() ends the scripting of the page. Here is my code (simplified): boolRPXReport = False Dim split As String() = strReportNoList.Split(New [Char]() {"|"c}) Dim strReportNo As String For Each strReportNo In split 'Code here gets values for strReportType intReport = CInt(strReportNo) If strReportType <> "pdf" Then 'Code here gets ActiveReport and adds it to rptCombined.Document boolRPXReport = True Else 'If the report is already a PDF then it should be downloaded separately Response.ContentType = "Application/pdf" Response.AppendHeader("Content-Disposition", "attachment; filename=" + strReportFile + ".pdf") Response.TransmitFile("D:\PDFFiles\" + strReportFile + ".pdf") Response.End() End If Next strReportNo If boolRPXReport = True Then 'Download the combined report PDF If Me.PdfExport1 Is Nothing Then Me.PdfExport1 = New DataDynamics.ActiveReports.Export.Pdf.PdfExport End If Me.PdfExport1.Export(rptCombined.Document, m_stream) m_stream.Position = 0 Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment; filename=PVPBlankReports.pdf") Response.BinaryWrite(m_stream.ToArray()) Response.End() End If Is there any way for the code to continue processing each strReportNo even after one PDF has been downloaded? David At 21/12/2007, you wrote: >Looking through the comments from >http://www.west-wind.com/WebLog/posts/76293.aspx it appears that >Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") ); >will fail in some circumstances... one of the many reasons I prefer >working with desktop apps. > >good luck! > >Michael M > >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Friday, 21 December 2007 1:57 PM >To: dba-vb at databaseadvisors.com >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > >Michael, > >I looked at the two links. The first got me in the right direction but >didn't provide a direct solution. The second one was an addon for >Firefox which most of the users don't have. > >However, I have found a couple of links that might solve the problem: > >http://www.west-wind.com/WebLog/posts/76293.aspx > >http://aspalliance.com/259_Downloading_Files__Forcing_the_File_Download_ >Dialog > >David > > > >At 21/12/2007, you wrote: > >Hi David, > > > >I guess the links I sent you didn't do the job then... > > > >How about 2 links on the page, 1 to the pdf that will open it in the > >browser. > >The other to a zip of the pdf that can be downloaded. > > > >Too simple? ;-) > > > >cheers > > > >Michael M > > > >-----Original Message----- > >From: dba-vb-bounces at databaseadvisors.com > >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson > >Sent: Friday, 21 December 2007 1:27 PM > >To: dba-vb at databaseadvisors.com > >Subject: Re: [dba-VB] Launch and monitor external programs from .NET > > > >Group, > > > >I couldn't work out how this could be done so I am trying the group > >again. > > > >I am using VB.net in Visual Studio 2005. This is a web application. I > > >have code that gets the path and name of a pdf file located on a >server. > >What I want to do within the code is have a file download box open > >which gives the user an option of opening or saving the PDF file. > > > >The Process class doesn't deem to help because it tries to open the > >file on the web server (and not the user's). > > > >My.Computer.Network.DownloadFile Method seems to require a destination > >path and filename, but I don't want it to automatically be saved. > > > > > >Regards > > > >David Emerson > >Dalyn Software Ltd > >Wellington, New Zealand From accessd at shaw.ca Mon Dec 24 11:21:38 2007 From: accessd at shaw.ca (Jim Lawrence) Date: Mon, 24 Dec 2007 09:21:38 -0800 Subject: [dba-VB] Ot Christmas In-Reply-To: <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: Hi All: At the risk of being politically incorrect: Merry Christmas and a Happy New Year to the best list on the Internet... :-) Best Regards Jim From wdhindman at dejpolsystems.com Mon Dec 24 11:43:25 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 24 Dec 2007 12:43:25 -0500 Subject: [dba-VB] Ot Christmas References: <200712071829.lB7ISxDd021422@databaseadvisors.com><20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local><20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz><59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local><20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: <001901c84654$7ccbfe40$ef706c4c@jisshowsbs.local> ...and a very pc holiday season to you and yours :) William ----- Original Message ----- From: "Jim Lawrence" To: Sent: Monday, December 24, 2007 12:21 PM Subject: [dba-VB] Ot Christmas > Hi All: > > At the risk of being politically incorrect: > > Merry Christmas and a Happy New Year to the best list on the Internet... > :-) > > Best Regards > Jim > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > From ridermark at gmail.com Mon Dec 24 14:55:07 2007 From: ridermark at gmail.com (Mark Rider) Date: Mon, 24 Dec 2007 14:55:07 -0600 Subject: [dba-VB] Ot Christmas In-Reply-To: References: <200712071829.lB7ISxDd021422@databaseadvisors.com> <20071221023253.RWFU17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A236@ddi-01.DDI.local> <20071221025249.QUVR9910.fep05.xtra.co.nz@Dalyn.dalyn.co.nz> <59A61174B1F5B54B97FD4ADDE71E7D0128A238@ddi-01.DDI.local> <20071221045926.YUAZ17371.fep04.xtra.co.nz@Dalyn.dalyn.co.nz> Message-ID: I thought the only PC part of this list was the machines we use to program! Merry Christmas! -- Mark Rider http://commonsensesecurity.info Try to learn something about everything and everything about something. - Thomas H. Huxley From jwcolby at colbyconsulting.com Wed Dec 26 10:04:48 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 26 Dec 2007 11:04:48 -0500 Subject: [dba-VB] VB.Net "proxy" progress indicator Message-ID: <000901c847d9$0b076b10$977aa8c0@M90> I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com From max.wanadoo at gmail.com Wed Dec 26 10:27:44 2007 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 26 Dec 2007 16:27:44 -0000 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <002901c847dc$3ec7ae30$8119fea9@LTVM> John, My EATBloat shows progess of import/export of Access object (Forms, Queries, etc) (A3k). I am sure that you could adapt that to your files. You can get to it from here if it is of any use: www.peoplelinks.co.uk/msaccess Max -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 4:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Wed Dec 26 11:08:17 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 26 Dec 2007 20:08:17 +0300 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <000901c847e1$e8c8da30$6501a8c0@nant> Hello John, If you're sure your main code export/import will never be used in multi-threading scenarios then you can just use so called Delegates... But I'd propose you to try to implement multi-threading and use BackGroundWorker class - they both could help you to solve your task effectively and have your tasks completed quicker because of multi-threading - have a look at this article/book excerpt: http://www.albahari.com/threading/part3.html#_BackgroundWorker -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Wed Dec 26 11:08:48 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 26 Dec 2007 09:08:48 -0800 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> References: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: John, I'm not sure I followed all of that, but you might be able to simplify your life with a "ProxyHelper" class and separate classes for import and export. We tend to use objects like that to handle repetitive code for performing similar actions. We simply pass the appropriate objects into the helper class, which handles all the UI stuff like progress meters, message boxes, etc. For example, we have a TransferHelper class which calls into TranferImport, TransferExport, TransferByEmail, etc. We declare an instance of that class in the helper and use a structure to retrieve the results from the specific class, and we use those results to log the event, notify the user, etc. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 8:05 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at users.mns.ru Wed Dec 26 11:17:40 2007 From: shamil at users.mns.ru (Shamil Salakhetdinov) Date: Wed, 26 Dec 2007 20:17:40 +0300 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847d9$0b076b10$977aa8c0@M90> Message-ID: <000001c847e3$3843e0e0$6501a8c0@nant> Hi John, I addition to my previous posting here is delegates sample: using System; public delegate void LogHandler(string s); public class Process { public void Run(LogHandler lh) { lh("Start process"); //... lh("Stop process"); } } public class Tracer { public void Trace(string s) { System.Console.WriteLine("Tracer: {0}", s); } } public class Test { public static void Log(string s) { System.Console.WriteLine("static Log: {0}", s); } public static int Main(string[] args) { Process p = new Process(); Tracer t = new Tracer(); LogHandler lh = null; lh += new LogHandler(Log); lh += new LogHandler(t.Trace); p.Run(lh); return 0; } } And here is events sample (events is a subset of delegates in .NET Framework) using System; public delegate void LogHandler(string s); public class Process { public event LogHandler LogEvent = null; public void Run() { if (LogEvent != null) LogEvent("Start process"); //... if (LogEvent != null) LogEvent("Stop process"); } } public class Tracer { public void Trace(string s) { System.Console.WriteLine("Tracer: {0}", s); } } public class Test { public static void Log(string s) { System.Console.WriteLine("static Log: {0}", s); } public static int Main(string[] args) { Process p = new Process(); Tracer t = new Tracer(); p.LogEvent += new LogHandler(Log); p.LogEvent += new LogHandler(t.Trace); p.Run(); return 0; } } The samples above are from this page: http://www.math.msu.su/~vvb/2course/Borisenko/AddEdu/CSharp/CSharp.html but its "meat" text is in Russia therefore I copied and pasted code samples here... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Wed Dec 26 11:45:38 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 26 Dec 2007 12:45:38 -0500 Subject: [dba-VB] VB.Net "proxy" progress indicator In-Reply-To: <000901c847e1$e8c8da30$6501a8c0@nant> References: <000901c847d9$0b076b10$977aa8c0@M90> <000901c847e1$e8c8da30$6501a8c0@nant> Message-ID: <001d01c847e7$20cb21e0$977aa8c0@M90> Yes, I want to use backgroundworker. The in some cases the process will really be: 1) The CSVExport process will export a table of tens of millions of records to a directory on an Address Validation Server (AVS), the AVS Input directory. 2) The Address Validation Server has a set of directories that it watches. As files appear in the watched directories the AVS starts to perform the address validation process on those files. 3) The AVS places address validation processed files into a set of matching output directories (one input / output pair), the AVS Output directory. 4) The CSVImport process will watch the AVS Output directory for that CSV process. As files appear in that directory it will import those files back in to SQL Server. So the entire process is an Out / AVS / In cycle. This cycle can be performed on many different tables. Each table needing AVS processing has a Spec record for the CSV OUT and a spec record for the CSV IN. I currently have five different tables of addresses needing validation, and the validation can occur on a timetable, perhaps once every three weeks etc, but the point is that it will eventually be totally automatic. A supervisor spawns a table AVS process that starts exporting data to the AVS, the AVS processes the data, and the results are imported back in again. Thus I really need (or should use) worked threads to handle the CSV export and import processes, for potentially N tables at a time, potentially "simultaneously". 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 Shamil Salakhetdinov Sent: Wednesday, December 26, 2007 12:08 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] VB.Net "proxy" progress indicator Hello John, If you're sure your main code export/import will never be used in multi-threading scenarios then you can just use so called Delegates... But I'd propose you to try to implement multi-threading and use BackGroundWorker class - they both could help you to solve your task effectively and have your tasks completed quicker because of multi-threading - have a look at this article/book excerpt: http://www.albahari.com/threading/part3.html#_BackgroundWorker -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, December 26, 2007 7:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VB.Net "proxy" progress indicator I am trying to figure out how to do something that is probably simple if I knew what I was doing. I have a bunch of processes that do similar things. They need to visually report the same data. For example I import CSV or flat files from a directory of files. Thus I need to report: 1) The directory being processed 2) The current file name 3) File N of M being processed 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running I also EXPORT CSV files from a table out to a directory. I need to report: 1) The directory being exported to 2) The current file name 3) File N of M being exported 4) A "progress bar" showing that something is happening in the current file 5) The NAME of the process currently running As you can see, though the direction is different, and the class that performs the process is different, they both need to report the same kind of things. So what I want to do is create a progress form that has controls and labels for the controls to display this information. I would like to make the form not required for the process itself to run, i.e. I can display the progress if I so desire or not show the progress. All progress is also being logged to tables and text files thus the display is a "nice to have" feature. My concept of how to do that is with events, i.e. the class that performs the process raises a series of events, and if there is a listener, then the listener displays the information. For example The process raises a "Process Name" event and passes out the name of the process it is running. It then determines how many files will be required and raises a "Total Files" event passing out the N (number of files) value. It has a counter by which it tracks which file it is currently processing and raises an M (current file number) event every time it starts a file. It raises a "Current File name" event as it generates the file name it is about to process. And so forth. Then a "proxy" progress indicator form can be opened. This is where my knowledge breaks down. Somehow I have to pass in a "something" that can have its events processed. The problem is that the "something" changes. One time it is a CSVExport class, the next it is a CSVImport class, the next time it is a FlatFileExport class, the next it is a FlatFileImport class. Now given my weak knowledge of VB.Net, my first thought is to create a "clsProxySource" as a base class. This class has properties for holding these pieces of data (process name, M, N, FileName etc) and methods which raise events and pass out these variables. I then inherit this clsProxySource" in each of my process classes so that each of those process classes has the properties and the ability to raise this event. Next in the proxy display form I dimension a variable mclsProxySource of type clsProxySource. I define the event sinks for the events that the clsProxySource sources. In the New() I pass in the process class instance that needs to display a status. In the new it is coerced back into a clsProxySource and stored in the mclsProxySource. Now the process class can raise events and the form (if it exists) sinks those events and displays the values in the controls on the form. So... Is that how it is done, and if not how do I go about doing this? If it is how it is done, the one piece I know for sure that I am missing id the syntax for coercing the process class back into the clsProxySource. If anyone could help me with this stuff I would be most appreciative. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ 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 From jwcolby at colbyconsulting.com Mon Dec 31 16:00:19 2007 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 31 Dec 2007 17:00:19 -0500 Subject: [dba-VB] inheriting events Message-ID: <001c01c84bf8$89521650$657aa8c0@M90> I designed a base class which has events: Public Class clsProxyProgress Public Event evProcessName(ByVal strProcessName As String) Public Event evDirectory(ByVal strDirectory As String) Public Event evCurrentFile(ByVal strCurrentFile As String) Public Event evFilesCompleted(ByVal intFilesCompleted As Integer) Public Event evFileCnt(ByVal intFileCnt As Integer) Public Event evRowsCopied(ByVal intRowsCopied As Long) Public Event evStatus(ByVal strStatus As String) I then inherit that class in a child class. Public Class clsCSVDataExportSpec Inherits clsProxyProgress The child class clsCSVDataExportSpec cannot "see" the events in the parent, i.e. it cannot do: RaiseEvent evStatus(mstrStatus) even though its parent class has that event. If I try to do this in the child class I get a compile error. In order to get around this I created functions in the parent class clsProxyProgress Public Sub mStatus(ByVal strStatus As String, ByVal blnStatusReset As Boolean, ByVal blnStatusTimeStamp As Boolean) If blnStatusReset Then mstrStatus = "" If blnStatusTimeStamp Then mstrStatus = mstrStatus & vbCrLf & Now() End If If Len(mstrStatus) > 0 Then mstrStatus = mstrStatus & vbCrLf & strStatus Else mstrStatus = strStatus End If RaiseEvent evStatus(mstrStatus) End Sub NOTICE that in the last line of the sub I raise the evStatus. I then call this sub from the child clsCSVDataExportSpec so that the parent class clsProxyProgress raises the event for the child class. I do this simply because if I try to raise the event up in the parent class directly I get a compile error. The whole point of this stuff is to allow a form to sink events and display data in text boxes on the form. In a form class I dimension a variable for this child class: Private WithEvents fclsCSVDataExport As clsCSVDataExportSpec further down I "sink" the events for this class: Private Sub fclsCSVDataExport_evStatus(ByVal strStatus As String) Handles fclsCSVDataExport.evStatus txtStatus.Text = strStatus Application.DoEvents() End Sub In the "Handles ..." the evStatus is a choice in the intellisense dropdown, IOW this form's module "sees" the event that the child class fclsCSVDataExport inherits from its parent class clsProxyProgress. However the sub fclsCSVDataExport_evStatus() never receives control when the Raisevent is executed. I SUSPECT that the issue is that the "Handles ..." needs to be "Handles fclsProxyProgress", i.e. it needs to "handle" the parent of fclsCSVDataExport, not fclsCSVDataExport itself. fclsCSVDataExport is the actual class that performs the data export for me. clsProxyProgress only exists to allow several different such import / export classes inherit common events and code, and I do that so that I can (eventually) have a generic form that dimensions a clsProxyProgress rather than having a specific import or export class such as clsCSVDataExport or clsCSVDataImport. If anyone is following what I am doing and can point me to how to make this work it would be appreciated. Thanks, John W. Colby Colby Consulting www.ColbyConsulting.com