From my.lists at verizon.net Sat Mar 1 21:30:17 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sat, 1 Mar 2003 19:30:17 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821D3@main2.marlow.com> Message-ID: <009c01c2e06c$0c074cd0$0eb62904@amd2k> ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 Sat Mar 1 22:09:00 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Sat, 1 Mar 2003 22:09:00 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DC@main2.marlow.com> Inet protocol? Do you mean the Winsock control? Just an FYI, there is a known memory leak issue with the Winsock control in VB 6. It occurs when you unload an instance of the control. (To prevent the leak, never 'unload' instances of the control, just reuse them. When you are done using them, unload the entire form....it's a nasty memory leak too.) Drew -----Original Message----- From: Francisco Tapia To: dba-vb at databaseadvisors.com Sent: 3/1/03 9:30 PM Subject: Re: [dba-VB] Closing an application ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 Jdemarco at hshhp.org Sun Mar 2 11:25:50 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Sun, 2 Mar 2003 12:25:50 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8528D@TTNEXCHSRV1.hshhp.com> Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). Jim DeMarco -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Saturday, March 01, 2003 11:09 PM To: 'dba-vb at databaseadvisors.com ' Subject: RE: [dba-VB] Closing an application Inet protocol? Do you mean the Winsock control? Just an FYI, there is a known memory leak issue with the Winsock control in VB 6. It occurs when you unload an instance of the control. (To prevent the leak, never 'unload' instances of the control, just reuse them. When you are done using them, unload the entire form....it's a nasty memory leak too.) Drew -----Original Message----- From: Francisco Tapia To: dba-vb at databaseadvisors.com Sent: 3/1/03 9:30 PM Subject: Re: [dba-VB] Closing an application ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Sun Mar 2 19:51:01 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sun, 2 Mar 2003 17:51:01 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821DC@main2.marlow.com> Message-ID: <006501c2e127$5b154550$0eb62904@amd2k> hm, wininet.dll, I dim a control as Inet (or rather the original author did). I then "Unload ME" for the form.... The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user clicking a button, but does provide feedback to show what the heck it is doing... once done it launches the app and unloads itself, but it must be this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose this problem is still not fixed... as I mentioned i'm unloading the FORM, not the contorl and all I want to do is kill the app once it is done.. but of course I would not want it to harvest any memory from the OS once gone... it will currently run on win2K but eventually XP, and even ME... so I would like to take care of any potential memory leaks... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Saturday, March 01, 2003 8:09 PM Subject: RE: [dba-VB] Closing an application : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 my.lists at verizon.net Sun Mar 2 19:52:40 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sun, 2 Mar 2003 17:52:40 -0800 Subject: [dba-VB] Closing an application References: <22F1CCD5171D17419CB37FEEE09D5F99D8528D@TTNEXCHSRV1.hshhp.com> Message-ID: <007b01c2e127$938227f0$0eb62904@amd2k> :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com : From Jdemarco at hshhp.org Mon Mar 3 06:56:08 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 07:56:08 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85296@TTNEXCHSRV1.hshhp.com> I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 08:34:04 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 08:34:04 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DE@main2.marlow.com> Isn't the Inet control for internet stuff? I don't think that is the same as the Winsock control, which is for the lower level TCP/IP communications. The leak with the Winsock control is documented in the knowledge base though, so maybe you should search there about the Inet control. Drew -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 7:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application hm, wininet.dll, I dim a control as Inet (or rather the original author did). I then "Unload ME" for the form.... The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user clicking a button, but does provide feedback to show what the heck it is doing... once done it launches the app and unloads itself, but it must be this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose this problem is still not fixed... as I mentioned i'm unloading the FORM, not the contorl and all I want to do is kill the app once it is done.. but of course I would not want it to harvest any memory from the OS once gone... it will currently run on win2K but eventually XP, and even ME... so I would like to take care of any potential memory leaks... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Saturday, March 01, 2003 8:09 PM Subject: RE: [dba-VB] Closing an application : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : _______________________________________________ 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 Mon Mar 3 08:36:21 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 08:36:21 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DF@main2.marlow.com> I use the API URLDownloadToFile. Works pretty well, but I don't know what versions it works on. Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 6:56 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Closing an application I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hshhp.org Mon Mar 3 08:43:41 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 09:43:41 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8529F@TTNEXCHSRV1.hshhp.com> I used that or something just like it (it uses wininet.dll). I can't remember the problem but it either hosed windows or the app. I just know it was the NT version of the dll and it did not like being on Win98. Jim -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 9:36 AM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] Closing an application I use the API URLDownloadToFile. Works pretty well, but I don't know what versions it works on. Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 6:56 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Closing an application I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 11:23:22 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 11:23:22 -0600 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821F2@main2.marlow.com> Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz From Jdemarco at hshhp.org Mon Mar 3 11:54:30 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 12:54:30 -0500 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54AE5@TTNEXCHSRV1.hshhp.com> Drew Do you really need to write an app to register a DLL? You can add an item to the Windows Send To menu that's a shortcut to regsvr32.exe (right click a DLL, choose Send To | Register a DLL, or whatever you named the shortcut). Unless there's some functionality I'm missing here. Hadyn's request is actually timely as I've been working on a demo/tutorial/mini-training session for our developers to acclimate them to ASP via straight ASP, VB, and finally .NET. It will probably be complete by the end of the week (or early next week) and if anyone would like to see it I'd be glad to entertain off-line requests. Basically I wrote a few simple pages in ASP, duplicate them in VB and VB.NET just to show the method. It's really a simple tutorial that shows how to look up and display data, and do data entry via the web. Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 12:23 PM To: 'Hadyn Morgan' Cc: dba-vb at databaseadvisors.com Subject: [dba-VB] RE: Web Activex DLL's Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 13:56:38 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 13:56:38 -0600 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821F5@main2.marlow.com> It only took a few minutes to write that .exe, so it wasn't exactly a 'huge' project. It boils down to requiring the same amount of work in the end. My co-worker just lives for using regsvr32.exe, and I just out of habit run my .exe. 6 here, half dozen there. ;) Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 11:55 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] RE: Web Activex DLL's Drew Do you really need to write an app to register a DLL? You can add an item to the Windows Send To menu that's a shortcut to regsvr32.exe (right click a DLL, choose Send To | Register a DLL, or whatever you named the shortcut). Unless there's some functionality I'm missing here. Hadyn's request is actually timely as I've been working on a demo/tutorial/mini-training session for our developers to acclimate them to ASP via straight ASP, VB, and finally .NET. It will probably be complete by the end of the week (or early next week) and if anyone would like to see it I'd be glad to entertain off-line requests. Basically I wrote a few simple pages in ASP, duplicate them in VB and VB.NET just to show the method. It's really a simple tutorial that shows how to look up and display data, and do data entry via the web. Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 12:23 PM To: 'Hadyn Morgan' Cc: dba-vb at databaseadvisors.com Subject: [dba-VB] RE: Web Activex DLL's Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From my.lists at verizon.net Mon Mar 3 15:23:24 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Mon, 3 Mar 2003 13:23:24 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821DE@main2.marlow.com> Message-ID: <000d01c2e1cb$20720830$b615010a@FHTAPIA> Just spoke to the author, he mentioned that there seems to be some bulky handling with this inet control, (on the MS side :S) anyways if you guys wanted to check out which source I meant here is the full link... http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=13413&ln gWId=1 The control is called "Microsoft Internet Transfer Control, Version 6.0 (SP4)" btw, I tried END... and it still does not help out... :( -Francisco http://rcm.netfirms.com ----- Original Message ----- From: "Drew Wutka" To: Sent: Monday, March 03, 2003 6:34 AM Subject: RE: [dba-VB] Closing an application : Isn't the Inet control for internet stuff? I don't think that is the same : as the Winsock control, which is for the lower level TCP/IP communications. : The leak with the Winsock control is documented in the knowledge base : though, so maybe you should search there about the Inet control. : : Drew : : -----Original Message----- : From: Francisco Tapia [mailto:my.lists at verizon.net] : Sent: Sunday, March 02, 2003 7:51 PM : To: dba-vb at databaseadvisors.com : Subject: Re: [dba-VB] Closing an application : : : hm, wininet.dll, I dim a control as Inet (or rather the original author : did). I then "Unload ME" for the form.... : The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user : clicking a button, but does provide feedback to show what the heck it is : doing... once done it launches the app and unloads itself, but it must be : this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose : this problem is still not fixed... as I mentioned i'm unloading the FORM, : not the contorl and all I want to do is kill the app once it is done.. but : of course I would not want it to harvest any memory from the OS once gone... : it will currently run on win2K but eventually XP, and even ME... so I would : like to take care of any potential memory leaks... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Saturday, March 01, 2003 8:09 PM : Subject: RE: [dba-VB] Closing an application : : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : : known memory leak issue with the Winsock control in VB 6. It occurs when : : you unload an instance of the control. (To prevent the leak, never : 'unload' : : instances of the control, just reuse them. When you are done using them, : : unload the entire form....it's a nasty memory leak too.) : : : : Drew : : : : -----Original Message----- : : From: Francisco Tapia : : To: dba-vb at databaseadvisors.com : : Sent: 3/1/03 9:30 PM : : Subject: Re: [dba-VB] Closing an application : : : : ah ha!, so END is acceptable in a VB environment... and would kill any : : lingering processes in my called module then right... I'm using the inet : : protocol but for some reason it seems to hang every once in a while.... : : : : -Francisco : : http://rcm.netfirms.com/ : : ----- Original Message ----- : : From: "Drew Wutka" : : To: : : Sent: Friday, February 28, 2003 5:15 PM : : Subject: RE: [dba-VB] Closing an application : : : : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : : form, : : : and nothing loaded in the background, you can just unload the form (or : : give : : : the user the 'x') but End stops the execution of your VB .exe, thus : : : unloading everything. : : : : : : Drew : : : : : : -----Original Message----- : : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : : Sent: Friday, February 28, 2003 6:24 PM : : : To: dba-vb at databaseadvisors.com : : : Subject: RE: [dba-VB] Closing an application : : : : : : : : : I have heard this in the past - and I must admit to being guilty of : : : using End, but I've never really know the difference, other than End : : : exits your app no matter where it is, and unload requires you to call : : : each form individually. : : : : : : What makes End such a No-no? : : : : : : Greg : : : : : : : : : -----Original Message----- : : : From: dba-vb-admin at databaseadvisors.com : : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : : Manning : : : Sent: Friday, February 28, 2003 3:40 PM : : : To: dba-vb at databaseadvisors.com : : : Subject: RE: [dba-VB] Closing an application : : : : : : "Unload Me" hides the form and removes it from memory so you are : : : definitely : : : doing the right thing. As with Access, "END" is a no-no. : : : : : : Doris Manning : : : Database Administrator : : : Hargrove Inc. : : : www.hargroveinc.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 : : : : : _______________________________________________ : 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 subs at solution-providers.ie Wed Mar 5 07:17:39 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Wed, 5 Mar 2003 13:17:39 -0000 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 References: Message-ID: <000701c2e319$992fcf10$356da8c0@IEW001> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, From subs at solution-providers.ie Wed Mar 5 07:18:51 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Wed, 5 Mar 2003 13:18:51 -0000 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: <001001c2e319$c4162b70$356da8c0@IEW001> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, Best Regards Mark L. Breen Solution Providers Ltd Ireland From Bryan_Carbonnell at cbc.ca Wed Mar 5 07:45:04 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Wed, 05 Mar 2003 08:45:04 -0500 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: I have been recently bitten by something like this. What VB does is store copies (well actually most of the binary data for a form) in the .frx file in the same directory as the .frm Once compiled into a DLL or exe, the icons are inside of the compiled file. So if you are creating a new form from a template, I would suspect that the template either doesn't have a corresponding frx, or it doesn't get copied over correctly to your project directory. Not really an answers or advice, but information that was new to me about a month ago so it may not be entirely accurate., but the jist should be right. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> subs at solution-providers.ie 05-Mar-03 8:17:39 AM >>> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, From Jdemarco at hshhp.org Wed Mar 5 09:27:23 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 5 Mar 2003 10:27:23 -0500 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8530B@TTNEXCHSRV1.hshhp.com> I usually ship the icons with the app. You could change their extensions if you don't want anyone to see them. I believe you can store them in a resource file as well. This way you don't have to ship the icons they become a part of the resource file. Haven't used this method even though I've considered it a time or two. HTH, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Mark L. Breen [mailto:subs at solution-providers.ie] Sent: Wednesday, March 05, 2003 8:19 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, Best Regards Mark L. Breen Solution Providers Ltd Ireland _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From R.Griffiths at bury.gov.uk Thu Mar 6 12:09:15 2003 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Thu, 6 Mar 2003 18:09:15 -0000 Subject: [dba-VB] Access and Crystal Reports Message-ID: <52339DF8DCA2A544AF660C8217EB7DCD0227F109@mailgate.bury.gov.uk> Hi using code how do you run a Crystal Report when the Access Db has 1) a password and/or 2) uses a system mdw Many thanks Richard -------------------------------------------------------------------------------------------------------------------- This e-mail, together with any files transmitted with it, is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited without liability on our part. If you have received this e-mail in error please notify the sender. From paul.hartland at fsmail.net Tue Mar 11 05:40:19 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Tue, 11 Mar 2003 11:40:19 +0000 Subject: [dba-VB] Opening Outlook from VB6 Message-ID: <20030311114019.VSDR3409.fep06-svc.ttys.com@localhost> To all, This may sound like a very stupid question, but I think I have gone totally brain dead, could someone please tell me the best way to open an external program, something like MS Outlook using Visual Basic 6 Thanks in advance Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From R.Griffiths at bury.gov.uk Tue Mar 11 05:51:02 2003 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Mar 2003 11:51:02 -0000 Subject: [dba-VB] Opening Outlook from VB6 Message-ID: <52339DF8DCA2A544AF660C8217EB7DCD0227F110@mailgate.bury.gov.uk> Shell? > -----Original Message----- > From: paul.hartland at fsmail.net [SMTP:paul.hartland at fsmail.net] > Sent: 11 March 2003 11:40 > To: accessd at databaseadvisors.com; dba-vb at databaseadvisors.com > Subject: [dba-VB] Opening Outlook from VB6 > > To all, > > This may sound like a very stupid question, but I think I have gone > totally brain dead, could someone please tell me the best way to open an > external program, something like MS Outlook using Visual Basic 6 > > Thanks in advance > > Paul Hartland > > __________________________________________________________________________ > Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for > your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month > after that. > > For more information visit http://www.freeserve.com/time/ or call free on > 0800 970 8890 > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > -------------------------------------------------------------------------------------------------------------------- This e-mail, together with any files transmitted with it, is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited without liability on our part. By responding to this e-mail it is accepted that your response may be the subject of recording/monitoring to ensure compliance with the Council?s ICT Security Policy If you have received this e-mail in error please notify the sender. From paul.hartland at fsmail.net Tue Mar 11 08:22:14 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Tue, 11 Mar 2003 14:22:14 +0000 Subject: [dba-VB] Opening Outlook if closed code not working Message-ID: <20030311142214.BYRO3194.fep12-svc.ttys.com@localhost> To all, Can anyone see why the following code (VB6) would open Outlook even if it is already open, I want a module that when I run my application, it checks to see if Outlook is open if not open it...... Function OpenOutlook() Dim objOut As Object On Error Resume Next Set objOut = GetObject("Outlook.Application") If (Err <> 0) Then Dim strOpenOutlook strOpenOutlook = Shell("D:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\OUTLOOK.EXE", vbMinimizedNoFocus) End If End Function Thanks in advance. Paul __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From ghazzard at aelfen.net Wed Mar 12 07:16:39 2003 From: ghazzard at aelfen.net (Gregory K. Hazzard) Date: Wed, 12 Mar 2003 07:16:39 -0600 Subject: [dba-VB] Opening Outlook if closed code not working In-Reply-To: <20030311142214.BYRO3194.fep12-svc.ttys.com@localhost> Message-ID: <00db01c2e899$9ecc1390$0200a8c0@greg> Having never done this, I'm guessing, but I'd say you need your comma. According to what I have read on this, since what you're really using is the second argument, you need to have the comma in the line, indicating that this is not the first argument. Here's the example I got from the MSDN: Set MyXL = Getobject( , "Excel.Application") Good luck. Greg -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Tuesday, March 11, 2003 8:22 AM To: accessd at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Opening Outlook if closed code not working To all, Can anyone see why the following code (VB6) would open Outlook even if it is already open, I want a module that when I run my application, it checks to see if Outlook is open if not open it...... Function OpenOutlook() Dim objOut As Object On Error Resume Next Set objOut = GetObject("Outlook.Application") If (Err <> 0) Then Dim strOpenOutlook strOpenOutlook = Shell("D:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\OUTLOOK.EXE", vbMinimizedNoFocus) End If End Function Thanks in advance. Paul ________________________________________________________________________ __ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From paul.hartland at fsmail.net Fri Mar 14 03:42:12 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 14 Mar 2003 9:42:12 +0000 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: <20030314094212.EMGX5263.fep04-svc.ttys.com@localhost> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From GRAY at utah.gov Fri Mar 14 08:56:29 2003 From: GRAY at utah.gov (Gary Ray) Date: Fri, 14 Mar 2003 07:56:29 -0700 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: This is some code I am using in an Active Reports designer that works for me. It is based on the code in Chapter 6 of the manual "Unbound Reporting and Grouping" Private Sub ActiveReport_DataInitialize() Set mRS = New ADODB.Recordset '---This report gets its recordset from a custom Activex control's property Set mRS = frmMain.ActiveControl.GetSummaryRS mRS.MoveFirst With Fields .Add "Category" .Add "Boundaries" .Add "Obs" .Add "Percent" End With End Sub Private Sub ActiveReport_FetchData(EOF As Boolean) 'If mRS.EOF = True Then Exit Sub If Not mRS.EOF Then '---Sets ActiveReports fields collection values to mRS values Fields("Category").Value = mRS!Category Fields("Boundaries").Value = mRS!Boundaries Fields("Obs").Value = mRS!Obs Fields("Percent").Value = mRS!Percent End If If Not mRS.EOF Then '---If not at the EOF then set FetchData's EOF value to false EOF = False '---Advance the RS mRS.MoveNext End If End Sub Gary Ray - Application Developer Workforce Information Systems R & D E-Mail gray at utah.gov >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From GRAY at utah.gov Fri Mar 14 09:26:49 2003 From: GRAY at utah.gov (Gary Ray) Date: Fri, 14 Mar 2003 08:26:49 -0700 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: Paul, One other thing. As you work in VB and ADO you will have to "unlearn" some Access stuff. One of those things may be the brackets in your SQL statements. I don't know if they are the problem, but they are not required. >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.hartland at fsmail.net Fri Mar 14 09:48:00 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 14 Mar 2003 15:48:00 +0000 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: <20030314154800.CVPA4985.fep08-svc.ttys.com@localhost> Thanks for the response but I forgot to post that I had solved it by simply changing .RecordSet to .Source i.e. Original line : repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" New Line : repPersonnelByOffice.dcRptData.Source = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" Then show the report to screen...... Thanks for all the other info anyway.......... Paul From: "Gary Ray" Date: Fri 14/Mar/2003 15:26 GMT To: Subject: Re: [dba-VB] Active Reports for Visual Basic 6 Paul, One other thing. As you work in VB and ADO you will have to "unlearn" some Access stuff. One of those things may be the brackets in your SQL statements. I don't know if they are the problem, but they are not required. >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From jcolby at colbyconsulting.com Fri Mar 14 19:41:13 2003 From: jcolby at colbyconsulting.com (John W. Colby) Date: Fri, 14 Mar 2003 20:41:13 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com From accessd at shaw.ca Sat Mar 15 01:23:28 2003 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Fri, 14 Mar 2003 23:23:28 -0800 Subject: [dba-VB] VB.Net stuff In-Reply-To: Message-ID: Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jcolby at colbyconsulting.com Sat Mar 15 08:23:32 2003 From: jcolby at colbyconsulting.com (John W. Colby) Date: Sat, 15 Mar 2003 09:23:32 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: Message-ID: Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 6328 bytes Desc: not available URL: From JRojas at tnco-inc.com Mon Mar 17 12:22:58 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Mon, 17 Mar 2003 13:22:58 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <806536912C472E4A9D6515DF2E57261E0C5921@mercury.tnco-inc.com> John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From Jdemarco at hshhp.org Mon Mar 17 12:30:23 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 17 Mar 2003 13:30:23 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85490@TTNEXCHSRV1.hshhp.com> Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From jcolby at ColbyConsulting.com Mon Mar 17 14:35:54 2003 From: jcolby at ColbyConsulting.com (John W. Colby) Date: Mon, 17 Mar 2003 15:35:54 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99D85490@TTNEXCHSRV1.hshhp.com> Message-ID: Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 9352 bytes Desc: not available URL: From JRojas at tnco-inc.com Mon Mar 17 15:37:13 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Mon, 17 Mar 2003 16:37:13 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <806536912C472E4A9D6515DF2E57261E0C5922@mercury.tnco-inc.com> In Java you don't have to instantiate a class in order to use it's methods. Do you get this functionality in VB.Net? For example, the Character class in Java does not have to be instantiated in order to use it methods. Instead of this: Character myChar = new Character("a"); myChar.isDigit("a"); You could just do: Character.isDigit("a"); -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Monday, March 17, 2003 3:36 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From jcolby at ColbyConsulting.com Mon Mar 17 16:10:08 2003 From: jcolby at ColbyConsulting.com (John W. Colby) Date: Mon, 17 Mar 2003 17:10:08 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: <806536912C472E4A9D6515DF2E57261E0C5922@mercury.tnco-inc.com> Message-ID: Yes, the method has to be declared static, and then it doesn't have to be instantiated. I'm stretching on this however since I am very new to this. However I have seen this mentioned in my book. So you can't just use any and all methods apparently, even with the framework classes. Some are static some aren't. It appears that some simply don't make sense to use without instantiation, for example if it's a variable class, and you are going to call the method that formats that variable to a string, it makes no sense unless the variable has some value. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Joe Rojas Sent: Monday, March 17, 2003 4:37 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff In Java you don't have to instantiate a class in order to use it's methods. Do you get this functionality in VB.Net? For example, the Character class in Java does not have to be instantiated in order to use it methods. Instead of this: Character myChar = new Character("a"); myChar.isDigit("a"); You could just do: Character.isDigit("a"); -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Monday, March 17, 2003 3:36 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 10792 bytes Desc: not available URL: From paul.hartland at fsmail.net Thu Mar 20 05:31:52 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 20 Mar 2003 11:31:52 +0000 Subject: [dba-VB] Move from Windows NT to XP Message-ID: <20030320113152.GJNK3144.fep08-svc.ttys.com@localhost> To all, I have a VB6 FE connected to a SQL Server 7.0 BE, on the employee records when someone changes a payroll number myself and the HR Department would receive an email stating the changes. Under Windows NT the email got sent automatically without a problem, BUT we have just gone to Windows XP and before it sends an email the following happens : 1. The user gets asked for his/her Outlook profile name. 2. The user receive's a message saying a program is automatically trying to send an email, and asks for confirmation that Outlook should send the email.... Has anyone else come across this ?. If so, is there anyway around this problem as sometimes it will ask me to confirm the email to each individual recipient (sometimes upto 15 people), and this can be very irritating.... Thanks for any help in advance...... Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From paul.hartland at fsmail.net Fri Mar 21 04:37:35 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 21 Mar 2003 10:37:35 +0000 Subject: [dba-VB] OT - XP Taskbar Help Required Message-ID: <20030321103735.ZHY5916.fep10-svc.ttys.com@localhost> To all, We have recently (2 days ago) upgraded to XP (not a very big fan at all), and there is one thing thats absolutely driving me mad. I have an Access Application and as usual when you run it, a button appears in the taskbar.....BUT, when you select an option from the switchboard opening another form another button appears and so on. Is there any way to stop XP creating a button for each form you have open.... Thanks in advance. Yours going absolutely raving mental...... Paul __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?13.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From martyconnelly at shaw.ca Sat Mar 22 18:11:26 2003 From: martyconnelly at shaw.ca (MartyConnelly) Date: Sat, 22 Mar 2003 16:11:26 -0800 Subject: [dba-VB] OT - XP Taskbar Help Required References: <20030321103735.ZHY5916.fep10-svc.ttys.com@localhost> Message-ID: <3E7CFBAE.1010505@shaw.ca> The way to turn off this annoying (added) feature they started with Access 2000, go to Tools | Options | View tab | Uncheck "Windows in Taskbar". You could do this by adding the following line into your "startup forms" (i.e. main menu, switchboard, etc.)'s OnLoad event: Call Application.SetOption("ShowWindowsInTaskbar", False) Or you could right click the taskbar and place them in a stack as happens with IE paul.hartland at fsmail.net wrote: >To all, > >We have recently (2 days ago) upgraded to XP (not a very big fan at all), and there is one thing thats absolutely driving me mad. I have an Access Application and as usual when you run it, a button appears in the taskbar.....BUT, when you select an option from the switchboard opening another form another button appears and so on. Is there any way to stop XP creating a button for each form you have open.... > >Thanks in advance. > >Yours going absolutely raving mental...... > >Paul > >__________________________________________________________________________ >Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for >your first 3 months, that's HALF PRICE! And then it's just ?13.99 a month >after that. > >For more information visit http://www.freeserve.com/time/ or call free on >0800 970 8890 > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > > From info at oop.nl Sat Mar 22 18:14:59 2003 From: info at oop.nl (Oop! Software & Computers) Date: Sun, 23 Mar 2003 01:14:59 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303230114.AA02024@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From Jdemarco at hshhp.org Wed Mar 26 13:31:14 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 14:31:14 -0500 Subject: [dba-VB] MSDE and replication Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8567F@TTNEXCHSRV1.hshhp.com> Cross posted: AccessD & dba-VB Does anyone know if I can replicate a MSDE BE when using VB as FE or is it limited to Access ADPs? Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From info at oop.nl Wed Mar 26 13:34:03 2003 From: info at oop.nl (Oop! Software & Computers) Date: Wed, 26 Mar 2003 20:34:03 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303262034.AA01980@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From Jdemarco at hshhp.org Wed Mar 26 14:02:48 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 15:02:48 -0500 Subject: [dba-VB] OT: oh no (list moderators please) Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> Cross posted: accessd, dba-VB Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! Jim DeMarco *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From info at oop.nl Wed Mar 26 14:05:34 2003 From: info at oop.nl (Oop! Software & Computers) Date: Wed, 26 Mar 2003 21:05:34 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303262105.AA01792@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From sgsax at ksu.edu Wed Mar 26 15:38:35 2003 From: sgsax at ksu.edu (Seth Galitzer) Date: 26 Mar 2003 15:38:35 -0600 Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> References: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> Message-ID: <1048714716.7326.42.camel@sgsax-th4022c> It's been taken care of. Seth On Wed, 2003-03-26 at 14:02, Jim DeMarco wrote: > Cross posted: accessd, dba-VB > > Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! > > Jim DeMarco -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From Jdemarco at hshhp.org Wed Mar 26 16:04:51 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 17:04:51 -0500 Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8568E@TTNEXCHSRV1.hshhp.com> Thanks, Jim -----Original Message----- From: Seth Galitzer [mailto:sgsax at ksu.edu] Sent: Wednesday, March 26, 2003 4:39 PM To: accessd Cc: AccessD (E-mail); VB List (E-mail) Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) It's been taken care of. Seth On Wed, 2003-03-26 at 14:02, Jim DeMarco wrote: > Cross posted: accessd, dba-VB > > Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! > > Jim DeMarco -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Fri Mar 28 02:29:56 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Fri, 28 Mar 2003 00:29:56 -0800 Subject: [dba-VB] Class Tips Message-ID: <00ab01c2f504$3d5685b0$0eb62904@amd2k> So beyond adding a property.. how would you do this: I have a class and want to give each property some additional methods such as the Oldvalue property, am I thinking this right? or will I need to build it another way for example, todo the following my class has this: CC.CCID = 1234 Private mvarCCID As Long Public Property Let CCID(ByVal vData As Long) mvarCCID = vData End Property I should be able to figure out how to do this but I have not found any good tutorials on the web Debug.print CC.CCID.OldValue How would I do the above? Thanks, -Francisco From carbonnb at sympatico.ca Fri Mar 28 04:50:48 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 05:50:48 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <00ab01c2f504$3d5685b0$0eb62904@amd2k> Message-ID: <3E83E2B8.4828.24492D@localhost> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. From Bryan_Carbonnell at cbc.ca Fri Mar 28 08:11:23 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 09:11:23 -0500 Subject: [dba-VB] Class Tips Message-ID: I did a quick and dirty demo of what I was talking about on the way in to work this morning. Let me know if you would like me to send it to you. It's a whole 3K zipped. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hshhp.org Fri Mar 28 08:24:12 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Fri, 28 Mar 2003 09:24:12 -0500 Subject: [dba-VB] Class Tips Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54F56@TTNEXCHSRV1.hshhp.com> Basically you faked inheritance in VB6 right? If you ever get a chance to check it out one of the neat improvements in VB.NET is better inheritance implentation. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Bryan Carbonnell [mailto:Bryan_Carbonnell at cbc.ca] Sent: Friday, March 28, 2003 9:11 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Class Tips I did a quick and dirty demo of what I was talking about on the way in to work this morning. Let me know if you would like me to send it to you. It's a whole 3K zipped. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. _______________________________________________ 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From Bryan_Carbonnell at cbc.ca Fri Mar 28 08:29:47 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 09:29:47 -0500 Subject: [dba-VB] Class Tips Message-ID: I don't know, 'cause I'm not sure I know what inheritance is. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> Jdemarco at hshhp.org 28-Mar-03 9:24:12 AM >>> Basically you faked inheritance in VB6 right? If you ever get a chance to check it out one of the neat improvements in VB.NET is better inheritance implentation. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan From my.lists at verizon.net Fri Mar 28 09:11:28 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Fri, 28 Mar 2003 07:11:28 -0800 Subject: [dba-VB] Class Tips References: Message-ID: <003301c2f53c$4ed4ffa0$0eb62904@amd2k> Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) -Francisco http://rcm.netfirms.com/ On Friday, March 28, 2003 6:11 AM [GMT -8], Bryan Carbonnell wrote: : I did a quick and dirty demo of what I was talking about on the way : in to work this morning. : : Let me know if you would like me to send it to you. It's a whole 3K : zipped. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> : On 28 Mar 2003 at 0:29, Francisco Tapia wrote: : :: I have a class and want to give each property some additional methods :: such as the Oldvalue property, am I thinking this right? or will I :: need to build it another way for example, todo the following my class :: has this: :: :: CC.CCID = 1234 :: Private mvarCCID As Long :: Public Property Let CCID(ByVal vData As Long) :: mvarCCID = vData :: End Property :: :: I should be able to figure out how to do this but I have not found :: any :: good tutorials on the web Debug.print CC.CCID.OldValue :: :: How would I do the above? : : : I think you will need to create a CCID class with a Value and : OldValue properties. : : Then in your CC Class, CCID would return the pointer to your new : CCID class and if you have set Value as the Default property, you : should still be able to just use Debug.Print CC.CCID to get the : value of CCID. From Bryan_Carbonnell at cbc.ca Fri Mar 28 09:19:08 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 10:19:08 -0500 Subject: [dba-VB] Class Tips Message-ID: THe only way that I know of to have a current value and an OldValue for a property is to create a separate class that holds the Properties value and old value. SO for each property you wanted to hold the value and OldValue for tou would need speateate classes. The sample has been sent off line. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) From Jdemarco at hshhp.org Fri Mar 28 11:44:26 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Fri, 28 Mar 2003 12:44:26 -0500 Subject: [dba-VB] Class Tips Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54F5F@TTNEXCHSRV1.hshhp.com> There's another method that involves using the PropertyBag property. If you set the class Persistable property to: 1 - Persistable you can save and retrieve the values. Here's a link I found on codehound.com. http://www.vbwm.com/art_1999/whatsnew/persist.asp HTH, Jim DeMarco -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Friday, March 28, 2003 10:11 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Class Tips Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) -Francisco http://rcm.netfirms.com/ On Friday, March 28, 2003 6:11 AM [GMT -8], Bryan Carbonnell wrote: : I did a quick and dirty demo of what I was talking about on the way : in to work this morning. : : Let me know if you would like me to send it to you. It's a whole 3K : zipped. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> : On 28 Mar 2003 at 0:29, Francisco Tapia wrote: : :: I have a class and want to give each property some additional methods :: such as the Oldvalue property, am I thinking this right? or will I :: need to build it another way for example, todo the following my class :: has this: :: :: CC.CCID = 1234 :: Private mvarCCID As Long :: Public Property Let CCID(ByVal vData As Long) :: mvarCCID = vData :: End Property :: :: I should be able to figure out how to do this but I have not found :: any :: good tutorials on the web Debug.print CC.CCID.OldValue :: :: How would I do the above? : : : I think you will need to create a CCID class with a Value and : OldValue properties. : : Then in your CC Class, CCID would return the pointer to your new : CCID class and if you have set Value as the Default property, you : should still be able to just use Debug.Print CC.CCID to get the : value of CCID. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Fri Mar 28 12:04:49 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 10:04:49 -0800 Subject: [dba-VB] Class Tips References: <657FB70438B7D311AF320090279C180103C5E4B3@EXCHMAIL> Message-ID: <002101c2f554$8683fc90$b615010a@FHTAPIA> Thanks Bryan, I'm thinking I can set this class (CCID) as a generic variant variable type to be able to reuse. Any reason that may be a problematic? -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 7:16 AM [GMT-8], Bryan Carbonnell wrote: : Here you go. My MainClass is equivalent to your clsCustomerConcern I : think. : : Ask if anything isn't clear. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> : Thanks Bryan, : : Please do send me that example so I can see what you mean.. :) : : I was placing all the property attributes of a CC into a class named : clsCustomerConcern and then just populate them at form load time : (unbound : form). so the load event would have the following ID's set : : CC.CCID = 1234 : CC.AssignedID = {Some Guid} : CC.Notes = "The customer wants some brochures" : : but then I'd like to also call an OldValue to each of these : properties, I : suppose it's just not possible right? I know I can do it all with a : disconnected ADO recordset where each field has an OldValue, but then : that's : not as fun as whacking my head on my desk ;o) : : : -Francisco : http://rcm.netfirms.com/ : : On Friday, March 28, 2003 6:11 AM [GMT -8], : Bryan Carbonnell wrote: : :: I did a quick and dirty demo of what I was talking about on the way :: in to work this morning. :: :: Let me know if you would like me to send it to you. It's a whole 3K :: zipped. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> :: On 28 Mar 2003 at 0:29, Francisco Tapia wrote: :: ::: I have a class and want to give each property some additional ::: methods such as the Oldvalue property, am I thinking this right? or ::: will I need to build it another way for example, todo the following ::: my class has this: ::: ::: CC.CCID = 1234 ::: Private mvarCCID As Long ::: Public Property Let CCID(ByVal vData As Long) ::: mvarCCID = vData ::: End Property ::: ::: I should be able to figure out how to do this but I have not found ::: any ::: good tutorials on the web Debug.print CC.CCID.OldValue ::: ::: How would I do the above? :: :: :: I think you will need to create a CCID class with a Value and :: OldValue properties. :: :: Then in your CC Class, CCID would return the pointer to your new :: CCID class and if you have set Value as the Default property, you :: should still be able to just use Debug.Print CC.CCID to get the :: value of CCID. : : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com From Bryan_Carbonnell at cbc.ca Fri Mar 28 12:09:51 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 13:09:51 -0500 Subject: [dba-VB] Class Tips Message-ID: None that I can see or think of off the top of my head. I say, go for it. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> my.lists at verizon.net 28-Mar-03 1:04:49 PM >>> Thanks Bryan, I'm thinking I can set this class (CCID) as a generic variant variable type to be able to reuse. Any reason that may be a problematic? -Francisco http://rcm.netfirms.com From my.lists at verizon.net Fri Mar 28 12:25:53 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 10:25:53 -0800 Subject: [dba-VB] Class Tips References: <657FB70438B7D311AF320090279C180103C5E4B3@EXCHMAIL> <002101c2f554$8683fc90$b615010a@FHTAPIA> Message-ID: <002f01c2f557$77c03400$b615010a@FHTAPIA> nevermind, I see why that's a problem... hmm I have a IsDirty property but once you dimension the properties as CCID or their respecitve class you can't use the let or set in the main class anymore, So it seems that I'm stuck w/o a dirty property. I'm sorry for the newbie q's if you can point me to some literature I'm more than happy to search, but I seem to not be keying in the right keywords to return these type of examples... Thanks, -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 10:04 AM [GMT-8], Francisco H Tapia wrote: : Thanks Bryan, : I'm thinking I can set this class (CCID) as a generic variant : variable type to be able to reuse. Any reason that may be a : problematic? : : -Francisco : http://rcm.netfirms.com : : On Friday, March 28, 2003 7:16 AM [GMT-8], : Bryan Carbonnell wrote: : :: Here you go. My MainClass is equivalent to your clsCustomerConcern I :: think. :: :: Ask if anything isn't clear. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> :: Thanks Bryan, :: :: Please do send me that example so I can see what you mean.. :) :: :: I was placing all the property attributes of a CC into a class named :: clsCustomerConcern and then just populate them at form load time :: (unbound :: form). so the load event would have the following ID's set :: :: CC.CCID = 1234 :: CC.AssignedID = {Some Guid} :: CC.Notes = "The customer wants some brochures" :: :: but then I'd like to also call an OldValue to each of these :: properties, I :: suppose it's just not possible right? I know I can do it all with a :: disconnected ADO recordset where each field has an OldValue, but then :: that's :: not as fun as whacking my head on my desk ;o) :: :: :: -Francisco :: http://rcm.netfirms.com/ :: :: On Friday, March 28, 2003 6:11 AM [GMT -8], :: Bryan Carbonnell wrote: :: ::: I did a quick and dirty demo of what I was talking about on the way ::: in to work this morning. ::: ::: Let me know if you would like me to send it to you. It's a whole 3K ::: zipped. ::: ::: Bryan Carbonnell ::: bryan_carbonnell at cbc.ca ::: :::::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> ::: On 28 Mar 2003 at 0:29, Francisco Tapia wrote: ::: :::: I have a class and want to give each property some additional :::: methods such as the Oldvalue property, am I thinking this right? or :::: will I need to build it another way for example, todo the following :::: my class has this: :::: :::: CC.CCID = 1234 :::: Private mvarCCID As Long :::: Public Property Let CCID(ByVal vData As Long) :::: mvarCCID = vData :::: End Property :::: :::: I should be able to figure out how to do this but I have not found :::: any :::: good tutorials on the web Debug.print CC.CCID.OldValue :::: :::: How would I do the above? ::: ::: ::: I think you will need to create a CCID class with a Value and ::: OldValue properties. ::: ::: Then in your CC Class, CCID would return the pointer to your new ::: CCID class and if you have set Value as the Default property, you ::: should still be able to just use Debug.Print CC.CCID to get the ::: value of CCID. :: :: :: _______________________________________________ :: 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 subs at solution-providers.ie Fri Mar 28 13:29:43 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Fri, 28 Mar 2003 19:29:43 -0000 Subject: [dba-VB] Serial Communications - Cross Posted VB and Access Message-ID: <007301c2f560$6315bdf0$219f7dc2@D8TZHN0J> Hello All, I have to receive serial communications from a scanner and compare it to the data that was just printed. I have downloaded a few different bits of software from www.planet-source-code.com that all work to a lesser or greater extent. Basically, at this stage I can receive data from the serial port. However, the client is happy to purchase an OCX or some other such tools to enhance the reliability of this project. There are a few utilities out there for between Euro 100 and Euro 500. The purpose of this email is to ask you guys have you used any such tools or utilities and if so, would you care to pass on the details? To state my question again, I can listen to the serial port now, but I just wondered was there some brialliant piece of software that I simply should not ignore. As usual, thanks in advance for your time and attention, Mark Breen Solution Providers Ireland -------------- next part -------------- An HTML attachment was scrubbed... URL: From my.lists at verizon.net Fri Mar 28 16:41:01 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 14:41:01 -0800 Subject: [dba-VB] Class Tips References: Message-ID: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> I must not be doing something right, I keep getting an error and I don't see why.. it's the error 91 object not set, I can shoot it off to you and you can tell me what I'm doing wrong if that's ok... Thanks, -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 7:19 AM [GMT-8], Bryan Carbonnell wrote: : THe only way that I know of to have a current value and an OldValue : for a property is to create a separate class that holds the : Properties value and old value. : : SO for each property you wanted to hold the value and OldValue for : tou would need speateate classes. : : The sample has been sent off line. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> : Thanks Bryan, : : Please do send me that example so I can see what you mean.. :) : : I was placing all the property attributes of a CC into a class named : clsCustomerConcern and then just populate them at form load time : (unbound : form). so the load event would have the following ID's set : : CC.CCID = 1234 : CC.AssignedID = {Some Guid} : CC.Notes = "The customer wants some brochures" : : but then I'd like to also call an OldValue to each of these : properties, I : suppose it's just not possible right? I know I can do it all with a : disconnected ADO recordset where each field has an OldValue, but then : that's : not as fun as whacking my head on my desk ;o) : : : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com From my.lists at verizon.net Fri Mar 28 17:08:04 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 15:08:04 -0800 Subject: [dba-VB] Class Tips References: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> Message-ID: <006701c2f57e$e369c780$b615010a@FHTAPIA> :-$ hehehe learning new things certainly can make you humble, I restepped through your example and it seems I had some variables misnamed :D, half working... any idea on how to enable an IsDirty property of the CCID so that if I dim a variable Dim CC as cMain and I modify the data from 1 value to another for the IsDirty property to be se to true? Can't see how that would be done... -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 2:41 PM [GMT-8], Francisco H Tapia wrote: : I must not be doing something right, I keep getting an error and I : don't see why.. it's the error 91 object not set, I can shoot it off : to you and you can tell me what I'm doing wrong if that's ok... : : Thanks, : -Francisco : http://rcm.netfirms.com : : On Friday, March 28, 2003 7:19 AM [GMT-8], : Bryan Carbonnell wrote: : :: THe only way that I know of to have a current value and an OldValue :: for a property is to create a separate class that holds the :: Properties value and old value. :: :: SO for each property you wanted to hold the value and OldValue for :: tou would need speateate classes. :: :: The sample has been sent off line. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> :: Thanks Bryan, :: :: Please do send me that example so I can see what you mean.. :) :: :: I was placing all the property attributes of a CC into a class named :: clsCustomerConcern and then just populate them at form load time :: (unbound :: form). so the load event would have the following ID's set :: :: CC.CCID = 1234 :: CC.AssignedID = {Some Guid} :: CC.Notes = "The customer wants some brochures" :: :: but then I'd like to also call an OldValue to each of these :: properties, I :: suppose it's just not possible right? I know I can do it all with a :: disconnected ADO recordset where each field has an OldValue, but then :: that's :: not as fun as whacking my head on my desk ;o) :: :: :: :: _______________________________________________ :: 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 carbonnb at sympatico.ca Fri Mar 28 18:54:56 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 19:54:56 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> Message-ID: <3E84A890.29558.1406E7E@localhost> On 28 Mar 2003 at 14:41, Francisco H Tapia wrote: > I must not be doing something right, I keep getting an error and I > don't see why.. it's the error 91 object not set, I can shoot it off > to you and you can tell me what I'm doing wrong if that's ok... Sure. Send it to my home accout, carbonnb at sympatico.ca -- Bryan Carbonnell - carbonnb at sympatico.ca Change is inevitable; progress is optional. From carbonnb at sympatico.ca Fri Mar 28 19:07:49 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 20:07:49 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <006701c2f57e$e369c780$b615010a@FHTAPIA> Message-ID: <3E84AB95.12205.14C39C1@localhost> On 28 Mar 2003 at 15:08, Francisco H Tapia wrote: > :-$ hehehe learning new things certainly can make you humble, I > restepped through your example and it seems I had some variables > misnamed :D, half working... any idea on how to enable an IsDirty > property of the CCID so that if I dim a variable > > Dim CC as cMain > > and I modify the data from 1 value to another for the IsDirty property > to be se to true? Can't see how that would be done... Well, the first thing that pops into my head is to create a .Parent Property in the CCID class. The only problem with that is that you actually have to "tear down" the classes before you set them = nothing. To see how to do that, go to my site http://www3.sympatico.ca/carbonnb/bryan/xapp/listvbavars.html and download the COM Add-In and look at the source code for it to see how to implement a Parent Property. That being said, It just occurred to me while sticking my daughters in the bath, you can raise an event in the CCID class and in your main class handle the raised event. In you Main Class use Dim WithEvents mobjCCID as CCID In your CCID Class in the general Declarations section Public Event Change() Then in the Set Value Procedure, after you save the old value and set the new value, you would use RaiseEvents Change Now back to your main class, and handle the CCID_CHange event. In here is where you can set your IsDirty module level variable to true. Make sense? If not let me know and I'll "enhance" the demo I did this morning. -- Bryan Carbonnell - carbonnb at sympatico.ca Experience is a wonderful thing. It enables you to recognize a mistake when you make it again. From my.lists at verizon.net Sat Mar 1 21:30:17 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sat, 1 Mar 2003 19:30:17 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821D3@main2.marlow.com> Message-ID: <009c01c2e06c$0c074cd0$0eb62904@amd2k> ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 Sat Mar 1 22:09:00 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Sat, 1 Mar 2003 22:09:00 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DC@main2.marlow.com> Inet protocol? Do you mean the Winsock control? Just an FYI, there is a known memory leak issue with the Winsock control in VB 6. It occurs when you unload an instance of the control. (To prevent the leak, never 'unload' instances of the control, just reuse them. When you are done using them, unload the entire form....it's a nasty memory leak too.) Drew -----Original Message----- From: Francisco Tapia To: dba-vb at databaseadvisors.com Sent: 3/1/03 9:30 PM Subject: Re: [dba-VB] Closing an application ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 Jdemarco at hshhp.org Sun Mar 2 11:25:50 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Sun, 2 Mar 2003 12:25:50 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8528D@TTNEXCHSRV1.hshhp.com> Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). Jim DeMarco -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Saturday, March 01, 2003 11:09 PM To: 'dba-vb at databaseadvisors.com ' Subject: RE: [dba-VB] Closing an application Inet protocol? Do you mean the Winsock control? Just an FYI, there is a known memory leak issue with the Winsock control in VB 6. It occurs when you unload an instance of the control. (To prevent the leak, never 'unload' instances of the control, just reuse them. When you are done using them, unload the entire form....it's a nasty memory leak too.) Drew -----Original Message----- From: Francisco Tapia To: dba-vb at databaseadvisors.com Sent: 3/1/03 9:30 PM Subject: Re: [dba-VB] Closing an application ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Sun Mar 2 19:51:01 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sun, 2 Mar 2003 17:51:01 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821DC@main2.marlow.com> Message-ID: <006501c2e127$5b154550$0eb62904@amd2k> hm, wininet.dll, I dim a control as Inet (or rather the original author did). I then "Unload ME" for the form.... The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user clicking a button, but does provide feedback to show what the heck it is doing... once done it launches the app and unloads itself, but it must be this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose this problem is still not fixed... as I mentioned i'm unloading the FORM, not the contorl and all I want to do is kill the app once it is done.. but of course I would not want it to harvest any memory from the OS once gone... it will currently run on win2K but eventually XP, and even ME... so I would like to take care of any potential memory leaks... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Saturday, March 01, 2003 8:09 PM Subject: RE: [dba-VB] Closing an application : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 my.lists at verizon.net Sun Mar 2 19:52:40 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sun, 2 Mar 2003 17:52:40 -0800 Subject: [dba-VB] Closing an application References: <22F1CCD5171D17419CB37FEEE09D5F99D8528D@TTNEXCHSRV1.hshhp.com> Message-ID: <007b01c2e127$938227f0$0eb62904@amd2k> :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com : From Jdemarco at hshhp.org Mon Mar 3 06:56:08 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 07:56:08 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85296@TTNEXCHSRV1.hshhp.com> I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 08:34:04 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 08:34:04 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DE@main2.marlow.com> Isn't the Inet control for internet stuff? I don't think that is the same as the Winsock control, which is for the lower level TCP/IP communications. The leak with the Winsock control is documented in the knowledge base though, so maybe you should search there about the Inet control. Drew -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 7:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application hm, wininet.dll, I dim a control as Inet (or rather the original author did). I then "Unload ME" for the form.... The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user clicking a button, but does provide feedback to show what the heck it is doing... once done it launches the app and unloads itself, but it must be this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose this problem is still not fixed... as I mentioned i'm unloading the FORM, not the contorl and all I want to do is kill the app once it is done.. but of course I would not want it to harvest any memory from the OS once gone... it will currently run on win2K but eventually XP, and even ME... so I would like to take care of any potential memory leaks... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Saturday, March 01, 2003 8:09 PM Subject: RE: [dba-VB] Closing an application : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : _______________________________________________ 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 Mon Mar 3 08:36:21 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 08:36:21 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DF@main2.marlow.com> I use the API URLDownloadToFile. Works pretty well, but I don't know what versions it works on. Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 6:56 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Closing an application I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hshhp.org Mon Mar 3 08:43:41 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 09:43:41 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8529F@TTNEXCHSRV1.hshhp.com> I used that or something just like it (it uses wininet.dll). I can't remember the problem but it either hosed windows or the app. I just know it was the NT version of the dll and it did not like being on Win98. Jim -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 9:36 AM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] Closing an application I use the API URLDownloadToFile. Works pretty well, but I don't know what versions it works on. Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 6:56 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Closing an application I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 11:23:22 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 11:23:22 -0600 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821F2@main2.marlow.com> Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz From Jdemarco at hshhp.org Mon Mar 3 11:54:30 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 12:54:30 -0500 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54AE5@TTNEXCHSRV1.hshhp.com> Drew Do you really need to write an app to register a DLL? You can add an item to the Windows Send To menu that's a shortcut to regsvr32.exe (right click a DLL, choose Send To | Register a DLL, or whatever you named the shortcut). Unless there's some functionality I'm missing here. Hadyn's request is actually timely as I've been working on a demo/tutorial/mini-training session for our developers to acclimate them to ASP via straight ASP, VB, and finally .NET. It will probably be complete by the end of the week (or early next week) and if anyone would like to see it I'd be glad to entertain off-line requests. Basically I wrote a few simple pages in ASP, duplicate them in VB and VB.NET just to show the method. It's really a simple tutorial that shows how to look up and display data, and do data entry via the web. Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 12:23 PM To: 'Hadyn Morgan' Cc: dba-vb at databaseadvisors.com Subject: [dba-VB] RE: Web Activex DLL's Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 13:56:38 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 13:56:38 -0600 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821F5@main2.marlow.com> It only took a few minutes to write that .exe, so it wasn't exactly a 'huge' project. It boils down to requiring the same amount of work in the end. My co-worker just lives for using regsvr32.exe, and I just out of habit run my .exe. 6 here, half dozen there. ;) Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 11:55 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] RE: Web Activex DLL's Drew Do you really need to write an app to register a DLL? You can add an item to the Windows Send To menu that's a shortcut to regsvr32.exe (right click a DLL, choose Send To | Register a DLL, or whatever you named the shortcut). Unless there's some functionality I'm missing here. Hadyn's request is actually timely as I've been working on a demo/tutorial/mini-training session for our developers to acclimate them to ASP via straight ASP, VB, and finally .NET. It will probably be complete by the end of the week (or early next week) and if anyone would like to see it I'd be glad to entertain off-line requests. Basically I wrote a few simple pages in ASP, duplicate them in VB and VB.NET just to show the method. It's really a simple tutorial that shows how to look up and display data, and do data entry via the web. Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 12:23 PM To: 'Hadyn Morgan' Cc: dba-vb at databaseadvisors.com Subject: [dba-VB] RE: Web Activex DLL's Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From my.lists at verizon.net Mon Mar 3 15:23:24 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Mon, 3 Mar 2003 13:23:24 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821DE@main2.marlow.com> Message-ID: <000d01c2e1cb$20720830$b615010a@FHTAPIA> Just spoke to the author, he mentioned that there seems to be some bulky handling with this inet control, (on the MS side :S) anyways if you guys wanted to check out which source I meant here is the full link... http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=13413&ln gWId=1 The control is called "Microsoft Internet Transfer Control, Version 6.0 (SP4)" btw, I tried END... and it still does not help out... :( -Francisco http://rcm.netfirms.com ----- Original Message ----- From: "Drew Wutka" To: Sent: Monday, March 03, 2003 6:34 AM Subject: RE: [dba-VB] Closing an application : Isn't the Inet control for internet stuff? I don't think that is the same : as the Winsock control, which is for the lower level TCP/IP communications. : The leak with the Winsock control is documented in the knowledge base : though, so maybe you should search there about the Inet control. : : Drew : : -----Original Message----- : From: Francisco Tapia [mailto:my.lists at verizon.net] : Sent: Sunday, March 02, 2003 7:51 PM : To: dba-vb at databaseadvisors.com : Subject: Re: [dba-VB] Closing an application : : : hm, wininet.dll, I dim a control as Inet (or rather the original author : did). I then "Unload ME" for the form.... : The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user : clicking a button, but does provide feedback to show what the heck it is : doing... once done it launches the app and unloads itself, but it must be : this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose : this problem is still not fixed... as I mentioned i'm unloading the FORM, : not the contorl and all I want to do is kill the app once it is done.. but : of course I would not want it to harvest any memory from the OS once gone... : it will currently run on win2K but eventually XP, and even ME... so I would : like to take care of any potential memory leaks... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Saturday, March 01, 2003 8:09 PM : Subject: RE: [dba-VB] Closing an application : : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : : known memory leak issue with the Winsock control in VB 6. It occurs when : : you unload an instance of the control. (To prevent the leak, never : 'unload' : : instances of the control, just reuse them. When you are done using them, : : unload the entire form....it's a nasty memory leak too.) : : : : Drew : : : : -----Original Message----- : : From: Francisco Tapia : : To: dba-vb at databaseadvisors.com : : Sent: 3/1/03 9:30 PM : : Subject: Re: [dba-VB] Closing an application : : : : ah ha!, so END is acceptable in a VB environment... and would kill any : : lingering processes in my called module then right... I'm using the inet : : protocol but for some reason it seems to hang every once in a while.... : : : : -Francisco : : http://rcm.netfirms.com/ : : ----- Original Message ----- : : From: "Drew Wutka" : : To: : : Sent: Friday, February 28, 2003 5:15 PM : : Subject: RE: [dba-VB] Closing an application : : : : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : : form, : : : and nothing loaded in the background, you can just unload the form (or : : give : : : the user the 'x') but End stops the execution of your VB .exe, thus : : : unloading everything. : : : : : : Drew : : : : : : -----Original Message----- : : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : : Sent: Friday, February 28, 2003 6:24 PM : : : To: dba-vb at databaseadvisors.com : : : Subject: RE: [dba-VB] Closing an application : : : : : : : : : I have heard this in the past - and I must admit to being guilty of : : : using End, but I've never really know the difference, other than End : : : exits your app no matter where it is, and unload requires you to call : : : each form individually. : : : : : : What makes End such a No-no? : : : : : : Greg : : : : : : : : : -----Original Message----- : : : From: dba-vb-admin at databaseadvisors.com : : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : : Manning : : : Sent: Friday, February 28, 2003 3:40 PM : : : To: dba-vb at databaseadvisors.com : : : Subject: RE: [dba-VB] Closing an application : : : : : : "Unload Me" hides the form and removes it from memory so you are : : : definitely : : : doing the right thing. As with Access, "END" is a no-no. : : : : : : Doris Manning : : : Database Administrator : : : Hargrove Inc. : : : www.hargroveinc.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 : : : : : _______________________________________________ : 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 subs at solution-providers.ie Wed Mar 5 07:17:39 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Wed, 5 Mar 2003 13:17:39 -0000 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 References: Message-ID: <000701c2e319$992fcf10$356da8c0@IEW001> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, From subs at solution-providers.ie Wed Mar 5 07:18:51 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Wed, 5 Mar 2003 13:18:51 -0000 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: <001001c2e319$c4162b70$356da8c0@IEW001> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, Best Regards Mark L. Breen Solution Providers Ltd Ireland From Bryan_Carbonnell at cbc.ca Wed Mar 5 07:45:04 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Wed, 05 Mar 2003 08:45:04 -0500 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: I have been recently bitten by something like this. What VB does is store copies (well actually most of the binary data for a form) in the .frx file in the same directory as the .frm Once compiled into a DLL or exe, the icons are inside of the compiled file. So if you are creating a new form from a template, I would suspect that the template either doesn't have a corresponding frx, or it doesn't get copied over correctly to your project directory. Not really an answers or advice, but information that was new to me about a month ago so it may not be entirely accurate., but the jist should be right. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> subs at solution-providers.ie 05-Mar-03 8:17:39 AM >>> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, From Jdemarco at hshhp.org Wed Mar 5 09:27:23 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 5 Mar 2003 10:27:23 -0500 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8530B@TTNEXCHSRV1.hshhp.com> I usually ship the icons with the app. You could change their extensions if you don't want anyone to see them. I believe you can store them in a resource file as well. This way you don't have to ship the icons they become a part of the resource file. Haven't used this method even though I've considered it a time or two. HTH, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Mark L. Breen [mailto:subs at solution-providers.ie] Sent: Wednesday, March 05, 2003 8:19 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, Best Regards Mark L. Breen Solution Providers Ltd Ireland _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From R.Griffiths at bury.gov.uk Thu Mar 6 12:09:15 2003 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Thu, 6 Mar 2003 18:09:15 -0000 Subject: [dba-VB] Access and Crystal Reports Message-ID: <52339DF8DCA2A544AF660C8217EB7DCD0227F109@mailgate.bury.gov.uk> Hi using code how do you run a Crystal Report when the Access Db has 1) a password and/or 2) uses a system mdw Many thanks Richard -------------------------------------------------------------------------------------------------------------------- This e-mail, together with any files transmitted with it, is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited without liability on our part. If you have received this e-mail in error please notify the sender. From paul.hartland at fsmail.net Tue Mar 11 05:40:19 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Tue, 11 Mar 2003 11:40:19 +0000 Subject: [dba-VB] Opening Outlook from VB6 Message-ID: <20030311114019.VSDR3409.fep06-svc.ttys.com@localhost> To all, This may sound like a very stupid question, but I think I have gone totally brain dead, could someone please tell me the best way to open an external program, something like MS Outlook using Visual Basic 6 Thanks in advance Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From R.Griffiths at bury.gov.uk Tue Mar 11 05:51:02 2003 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Mar 2003 11:51:02 -0000 Subject: [dba-VB] Opening Outlook from VB6 Message-ID: <52339DF8DCA2A544AF660C8217EB7DCD0227F110@mailgate.bury.gov.uk> Shell? > -----Original Message----- > From: paul.hartland at fsmail.net [SMTP:paul.hartland at fsmail.net] > Sent: 11 March 2003 11:40 > To: accessd at databaseadvisors.com; dba-vb at databaseadvisors.com > Subject: [dba-VB] Opening Outlook from VB6 > > To all, > > This may sound like a very stupid question, but I think I have gone > totally brain dead, could someone please tell me the best way to open an > external program, something like MS Outlook using Visual Basic 6 > > Thanks in advance > > Paul Hartland > > __________________________________________________________________________ > Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for > your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month > after that. > > For more information visit http://www.freeserve.com/time/ or call free on > 0800 970 8890 > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > -------------------------------------------------------------------------------------------------------------------- This e-mail, together with any files transmitted with it, is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited without liability on our part. By responding to this e-mail it is accepted that your response may be the subject of recording/monitoring to ensure compliance with the Council?s ICT Security Policy If you have received this e-mail in error please notify the sender. From paul.hartland at fsmail.net Tue Mar 11 08:22:14 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Tue, 11 Mar 2003 14:22:14 +0000 Subject: [dba-VB] Opening Outlook if closed code not working Message-ID: <20030311142214.BYRO3194.fep12-svc.ttys.com@localhost> To all, Can anyone see why the following code (VB6) would open Outlook even if it is already open, I want a module that when I run my application, it checks to see if Outlook is open if not open it...... Function OpenOutlook() Dim objOut As Object On Error Resume Next Set objOut = GetObject("Outlook.Application") If (Err <> 0) Then Dim strOpenOutlook strOpenOutlook = Shell("D:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\OUTLOOK.EXE", vbMinimizedNoFocus) End If End Function Thanks in advance. Paul __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From ghazzard at aelfen.net Wed Mar 12 07:16:39 2003 From: ghazzard at aelfen.net (Gregory K. Hazzard) Date: Wed, 12 Mar 2003 07:16:39 -0600 Subject: [dba-VB] Opening Outlook if closed code not working In-Reply-To: <20030311142214.BYRO3194.fep12-svc.ttys.com@localhost> Message-ID: <00db01c2e899$9ecc1390$0200a8c0@greg> Having never done this, I'm guessing, but I'd say you need your comma. According to what I have read on this, since what you're really using is the second argument, you need to have the comma in the line, indicating that this is not the first argument. Here's the example I got from the MSDN: Set MyXL = Getobject( , "Excel.Application") Good luck. Greg -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Tuesday, March 11, 2003 8:22 AM To: accessd at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Opening Outlook if closed code not working To all, Can anyone see why the following code (VB6) would open Outlook even if it is already open, I want a module that when I run my application, it checks to see if Outlook is open if not open it...... Function OpenOutlook() Dim objOut As Object On Error Resume Next Set objOut = GetObject("Outlook.Application") If (Err <> 0) Then Dim strOpenOutlook strOpenOutlook = Shell("D:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\OUTLOOK.EXE", vbMinimizedNoFocus) End If End Function Thanks in advance. Paul ________________________________________________________________________ __ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From paul.hartland at fsmail.net Fri Mar 14 03:42:12 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 14 Mar 2003 9:42:12 +0000 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: <20030314094212.EMGX5263.fep04-svc.ttys.com@localhost> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From GRAY at utah.gov Fri Mar 14 08:56:29 2003 From: GRAY at utah.gov (Gary Ray) Date: Fri, 14 Mar 2003 07:56:29 -0700 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: This is some code I am using in an Active Reports designer that works for me. It is based on the code in Chapter 6 of the manual "Unbound Reporting and Grouping" Private Sub ActiveReport_DataInitialize() Set mRS = New ADODB.Recordset '---This report gets its recordset from a custom Activex control's property Set mRS = frmMain.ActiveControl.GetSummaryRS mRS.MoveFirst With Fields .Add "Category" .Add "Boundaries" .Add "Obs" .Add "Percent" End With End Sub Private Sub ActiveReport_FetchData(EOF As Boolean) 'If mRS.EOF = True Then Exit Sub If Not mRS.EOF Then '---Sets ActiveReports fields collection values to mRS values Fields("Category").Value = mRS!Category Fields("Boundaries").Value = mRS!Boundaries Fields("Obs").Value = mRS!Obs Fields("Percent").Value = mRS!Percent End If If Not mRS.EOF Then '---If not at the EOF then set FetchData's EOF value to false EOF = False '---Advance the RS mRS.MoveNext End If End Sub Gary Ray - Application Developer Workforce Information Systems R & D E-Mail gray at utah.gov >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From GRAY at utah.gov Fri Mar 14 09:26:49 2003 From: GRAY at utah.gov (Gary Ray) Date: Fri, 14 Mar 2003 08:26:49 -0700 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: Paul, One other thing. As you work in VB and ADO you will have to "unlearn" some Access stuff. One of those things may be the brackets in your SQL statements. I don't know if they are the problem, but they are not required. >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.hartland at fsmail.net Fri Mar 14 09:48:00 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 14 Mar 2003 15:48:00 +0000 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: <20030314154800.CVPA4985.fep08-svc.ttys.com@localhost> Thanks for the response but I forgot to post that I had solved it by simply changing .RecordSet to .Source i.e. Original line : repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" New Line : repPersonnelByOffice.dcRptData.Source = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" Then show the report to screen...... Thanks for all the other info anyway.......... Paul From: "Gary Ray" Date: Fri 14/Mar/2003 15:26 GMT To: Subject: Re: [dba-VB] Active Reports for Visual Basic 6 Paul, One other thing. As you work in VB and ADO you will have to "unlearn" some Access stuff. One of those things may be the brackets in your SQL statements. I don't know if they are the problem, but they are not required. >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From jcolby at colbyconsulting.com Fri Mar 14 19:41:13 2003 From: jcolby at colbyconsulting.com (John W. Colby) Date: Fri, 14 Mar 2003 20:41:13 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com From accessd at shaw.ca Sat Mar 15 01:23:28 2003 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Fri, 14 Mar 2003 23:23:28 -0800 Subject: [dba-VB] VB.Net stuff In-Reply-To: Message-ID: Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jcolby at colbyconsulting.com Sat Mar 15 08:23:32 2003 From: jcolby at colbyconsulting.com (John W. Colby) Date: Sat, 15 Mar 2003 09:23:32 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: Message-ID: Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 6328 bytes Desc: not available URL: From JRojas at tnco-inc.com Mon Mar 17 12:22:58 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Mon, 17 Mar 2003 13:22:58 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <806536912C472E4A9D6515DF2E57261E0C5921@mercury.tnco-inc.com> John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From Jdemarco at hshhp.org Mon Mar 17 12:30:23 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 17 Mar 2003 13:30:23 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85490@TTNEXCHSRV1.hshhp.com> Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From jcolby at ColbyConsulting.com Mon Mar 17 14:35:54 2003 From: jcolby at ColbyConsulting.com (John W. Colby) Date: Mon, 17 Mar 2003 15:35:54 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99D85490@TTNEXCHSRV1.hshhp.com> Message-ID: Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 9352 bytes Desc: not available URL: From JRojas at tnco-inc.com Mon Mar 17 15:37:13 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Mon, 17 Mar 2003 16:37:13 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <806536912C472E4A9D6515DF2E57261E0C5922@mercury.tnco-inc.com> In Java you don't have to instantiate a class in order to use it's methods. Do you get this functionality in VB.Net? For example, the Character class in Java does not have to be instantiated in order to use it methods. Instead of this: Character myChar = new Character("a"); myChar.isDigit("a"); You could just do: Character.isDigit("a"); -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Monday, March 17, 2003 3:36 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From jcolby at ColbyConsulting.com Mon Mar 17 16:10:08 2003 From: jcolby at ColbyConsulting.com (John W. Colby) Date: Mon, 17 Mar 2003 17:10:08 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: <806536912C472E4A9D6515DF2E57261E0C5922@mercury.tnco-inc.com> Message-ID: Yes, the method has to be declared static, and then it doesn't have to be instantiated. I'm stretching on this however since I am very new to this. However I have seen this mentioned in my book. So you can't just use any and all methods apparently, even with the framework classes. Some are static some aren't. It appears that some simply don't make sense to use without instantiation, for example if it's a variable class, and you are going to call the method that formats that variable to a string, it makes no sense unless the variable has some value. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Joe Rojas Sent: Monday, March 17, 2003 4:37 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff In Java you don't have to instantiate a class in order to use it's methods. Do you get this functionality in VB.Net? For example, the Character class in Java does not have to be instantiated in order to use it methods. Instead of this: Character myChar = new Character("a"); myChar.isDigit("a"); You could just do: Character.isDigit("a"); -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Monday, March 17, 2003 3:36 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 10792 bytes Desc: not available URL: From paul.hartland at fsmail.net Thu Mar 20 05:31:52 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 20 Mar 2003 11:31:52 +0000 Subject: [dba-VB] Move from Windows NT to XP Message-ID: <20030320113152.GJNK3144.fep08-svc.ttys.com@localhost> To all, I have a VB6 FE connected to a SQL Server 7.0 BE, on the employee records when someone changes a payroll number myself and the HR Department would receive an email stating the changes. Under Windows NT the email got sent automatically without a problem, BUT we have just gone to Windows XP and before it sends an email the following happens : 1. The user gets asked for his/her Outlook profile name. 2. The user receive's a message saying a program is automatically trying to send an email, and asks for confirmation that Outlook should send the email.... Has anyone else come across this ?. If so, is there anyway around this problem as sometimes it will ask me to confirm the email to each individual recipient (sometimes upto 15 people), and this can be very irritating.... Thanks for any help in advance...... Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From paul.hartland at fsmail.net Fri Mar 21 04:37:35 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 21 Mar 2003 10:37:35 +0000 Subject: [dba-VB] OT - XP Taskbar Help Required Message-ID: <20030321103735.ZHY5916.fep10-svc.ttys.com@localhost> To all, We have recently (2 days ago) upgraded to XP (not a very big fan at all), and there is one thing thats absolutely driving me mad. I have an Access Application and as usual when you run it, a button appears in the taskbar.....BUT, when you select an option from the switchboard opening another form another button appears and so on. Is there any way to stop XP creating a button for each form you have open.... Thanks in advance. Yours going absolutely raving mental...... Paul __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?13.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From martyconnelly at shaw.ca Sat Mar 22 18:11:26 2003 From: martyconnelly at shaw.ca (MartyConnelly) Date: Sat, 22 Mar 2003 16:11:26 -0800 Subject: [dba-VB] OT - XP Taskbar Help Required References: <20030321103735.ZHY5916.fep10-svc.ttys.com@localhost> Message-ID: <3E7CFBAE.1010505@shaw.ca> The way to turn off this annoying (added) feature they started with Access 2000, go to Tools | Options | View tab | Uncheck "Windows in Taskbar". You could do this by adding the following line into your "startup forms" (i.e. main menu, switchboard, etc.)'s OnLoad event: Call Application.SetOption("ShowWindowsInTaskbar", False) Or you could right click the taskbar and place them in a stack as happens with IE paul.hartland at fsmail.net wrote: >To all, > >We have recently (2 days ago) upgraded to XP (not a very big fan at all), and there is one thing thats absolutely driving me mad. I have an Access Application and as usual when you run it, a button appears in the taskbar.....BUT, when you select an option from the switchboard opening another form another button appears and so on. Is there any way to stop XP creating a button for each form you have open.... > >Thanks in advance. > >Yours going absolutely raving mental...... > >Paul > >__________________________________________________________________________ >Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for >your first 3 months, that's HALF PRICE! And then it's just ?13.99 a month >after that. > >For more information visit http://www.freeserve.com/time/ or call free on >0800 970 8890 > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > > From info at oop.nl Sat Mar 22 18:14:59 2003 From: info at oop.nl (Oop! Software & Computers) Date: Sun, 23 Mar 2003 01:14:59 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303230114.AA02024@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From Jdemarco at hshhp.org Wed Mar 26 13:31:14 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 14:31:14 -0500 Subject: [dba-VB] MSDE and replication Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8567F@TTNEXCHSRV1.hshhp.com> Cross posted: AccessD & dba-VB Does anyone know if I can replicate a MSDE BE when using VB as FE or is it limited to Access ADPs? Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From info at oop.nl Wed Mar 26 13:34:03 2003 From: info at oop.nl (Oop! Software & Computers) Date: Wed, 26 Mar 2003 20:34:03 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303262034.AA01980@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From Jdemarco at hshhp.org Wed Mar 26 14:02:48 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 15:02:48 -0500 Subject: [dba-VB] OT: oh no (list moderators please) Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> Cross posted: accessd, dba-VB Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! Jim DeMarco *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From info at oop.nl Wed Mar 26 14:05:34 2003 From: info at oop.nl (Oop! Software & Computers) Date: Wed, 26 Mar 2003 21:05:34 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303262105.AA01792@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From sgsax at ksu.edu Wed Mar 26 15:38:35 2003 From: sgsax at ksu.edu (Seth Galitzer) Date: 26 Mar 2003 15:38:35 -0600 Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> References: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> Message-ID: <1048714716.7326.42.camel@sgsax-th4022c> It's been taken care of. Seth On Wed, 2003-03-26 at 14:02, Jim DeMarco wrote: > Cross posted: accessd, dba-VB > > Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! > > Jim DeMarco -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From Jdemarco at hshhp.org Wed Mar 26 16:04:51 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 17:04:51 -0500 Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8568E@TTNEXCHSRV1.hshhp.com> Thanks, Jim -----Original Message----- From: Seth Galitzer [mailto:sgsax at ksu.edu] Sent: Wednesday, March 26, 2003 4:39 PM To: accessd Cc: AccessD (E-mail); VB List (E-mail) Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) It's been taken care of. Seth On Wed, 2003-03-26 at 14:02, Jim DeMarco wrote: > Cross posted: accessd, dba-VB > > Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! > > Jim DeMarco -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Fri Mar 28 02:29:56 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Fri, 28 Mar 2003 00:29:56 -0800 Subject: [dba-VB] Class Tips Message-ID: <00ab01c2f504$3d5685b0$0eb62904@amd2k> So beyond adding a property.. how would you do this: I have a class and want to give each property some additional methods such as the Oldvalue property, am I thinking this right? or will I need to build it another way for example, todo the following my class has this: CC.CCID = 1234 Private mvarCCID As Long Public Property Let CCID(ByVal vData As Long) mvarCCID = vData End Property I should be able to figure out how to do this but I have not found any good tutorials on the web Debug.print CC.CCID.OldValue How would I do the above? Thanks, -Francisco From carbonnb at sympatico.ca Fri Mar 28 04:50:48 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 05:50:48 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <00ab01c2f504$3d5685b0$0eb62904@amd2k> Message-ID: <3E83E2B8.4828.24492D@localhost> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. From Bryan_Carbonnell at cbc.ca Fri Mar 28 08:11:23 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 09:11:23 -0500 Subject: [dba-VB] Class Tips Message-ID: I did a quick and dirty demo of what I was talking about on the way in to work this morning. Let me know if you would like me to send it to you. It's a whole 3K zipped. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hshhp.org Fri Mar 28 08:24:12 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Fri, 28 Mar 2003 09:24:12 -0500 Subject: [dba-VB] Class Tips Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54F56@TTNEXCHSRV1.hshhp.com> Basically you faked inheritance in VB6 right? If you ever get a chance to check it out one of the neat improvements in VB.NET is better inheritance implentation. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Bryan Carbonnell [mailto:Bryan_Carbonnell at cbc.ca] Sent: Friday, March 28, 2003 9:11 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Class Tips I did a quick and dirty demo of what I was talking about on the way in to work this morning. Let me know if you would like me to send it to you. It's a whole 3K zipped. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. _______________________________________________ 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From Bryan_Carbonnell at cbc.ca Fri Mar 28 08:29:47 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 09:29:47 -0500 Subject: [dba-VB] Class Tips Message-ID: I don't know, 'cause I'm not sure I know what inheritance is. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> Jdemarco at hshhp.org 28-Mar-03 9:24:12 AM >>> Basically you faked inheritance in VB6 right? If you ever get a chance to check it out one of the neat improvements in VB.NET is better inheritance implentation. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan From my.lists at verizon.net Fri Mar 28 09:11:28 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Fri, 28 Mar 2003 07:11:28 -0800 Subject: [dba-VB] Class Tips References: Message-ID: <003301c2f53c$4ed4ffa0$0eb62904@amd2k> Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) -Francisco http://rcm.netfirms.com/ On Friday, March 28, 2003 6:11 AM [GMT -8], Bryan Carbonnell wrote: : I did a quick and dirty demo of what I was talking about on the way : in to work this morning. : : Let me know if you would like me to send it to you. It's a whole 3K : zipped. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> : On 28 Mar 2003 at 0:29, Francisco Tapia wrote: : :: I have a class and want to give each property some additional methods :: such as the Oldvalue property, am I thinking this right? or will I :: need to build it another way for example, todo the following my class :: has this: :: :: CC.CCID = 1234 :: Private mvarCCID As Long :: Public Property Let CCID(ByVal vData As Long) :: mvarCCID = vData :: End Property :: :: I should be able to figure out how to do this but I have not found :: any :: good tutorials on the web Debug.print CC.CCID.OldValue :: :: How would I do the above? : : : I think you will need to create a CCID class with a Value and : OldValue properties. : : Then in your CC Class, CCID would return the pointer to your new : CCID class and if you have set Value as the Default property, you : should still be able to just use Debug.Print CC.CCID to get the : value of CCID. From Bryan_Carbonnell at cbc.ca Fri Mar 28 09:19:08 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 10:19:08 -0500 Subject: [dba-VB] Class Tips Message-ID: THe only way that I know of to have a current value and an OldValue for a property is to create a separate class that holds the Properties value and old value. SO for each property you wanted to hold the value and OldValue for tou would need speateate classes. The sample has been sent off line. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) From Jdemarco at hshhp.org Fri Mar 28 11:44:26 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Fri, 28 Mar 2003 12:44:26 -0500 Subject: [dba-VB] Class Tips Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54F5F@TTNEXCHSRV1.hshhp.com> There's another method that involves using the PropertyBag property. If you set the class Persistable property to: 1 - Persistable you can save and retrieve the values. Here's a link I found on codehound.com. http://www.vbwm.com/art_1999/whatsnew/persist.asp HTH, Jim DeMarco -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Friday, March 28, 2003 10:11 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Class Tips Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) -Francisco http://rcm.netfirms.com/ On Friday, March 28, 2003 6:11 AM [GMT -8], Bryan Carbonnell wrote: : I did a quick and dirty demo of what I was talking about on the way : in to work this morning. : : Let me know if you would like me to send it to you. It's a whole 3K : zipped. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> : On 28 Mar 2003 at 0:29, Francisco Tapia wrote: : :: I have a class and want to give each property some additional methods :: such as the Oldvalue property, am I thinking this right? or will I :: need to build it another way for example, todo the following my class :: has this: :: :: CC.CCID = 1234 :: Private mvarCCID As Long :: Public Property Let CCID(ByVal vData As Long) :: mvarCCID = vData :: End Property :: :: I should be able to figure out how to do this but I have not found :: any :: good tutorials on the web Debug.print CC.CCID.OldValue :: :: How would I do the above? : : : I think you will need to create a CCID class with a Value and : OldValue properties. : : Then in your CC Class, CCID would return the pointer to your new : CCID class and if you have set Value as the Default property, you : should still be able to just use Debug.Print CC.CCID to get the : value of CCID. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Fri Mar 28 12:04:49 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 10:04:49 -0800 Subject: [dba-VB] Class Tips References: <657FB70438B7D311AF320090279C180103C5E4B3@EXCHMAIL> Message-ID: <002101c2f554$8683fc90$b615010a@FHTAPIA> Thanks Bryan, I'm thinking I can set this class (CCID) as a generic variant variable type to be able to reuse. Any reason that may be a problematic? -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 7:16 AM [GMT-8], Bryan Carbonnell wrote: : Here you go. My MainClass is equivalent to your clsCustomerConcern I : think. : : Ask if anything isn't clear. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> : Thanks Bryan, : : Please do send me that example so I can see what you mean.. :) : : I was placing all the property attributes of a CC into a class named : clsCustomerConcern and then just populate them at form load time : (unbound : form). so the load event would have the following ID's set : : CC.CCID = 1234 : CC.AssignedID = {Some Guid} : CC.Notes = "The customer wants some brochures" : : but then I'd like to also call an OldValue to each of these : properties, I : suppose it's just not possible right? I know I can do it all with a : disconnected ADO recordset where each field has an OldValue, but then : that's : not as fun as whacking my head on my desk ;o) : : : -Francisco : http://rcm.netfirms.com/ : : On Friday, March 28, 2003 6:11 AM [GMT -8], : Bryan Carbonnell wrote: : :: I did a quick and dirty demo of what I was talking about on the way :: in to work this morning. :: :: Let me know if you would like me to send it to you. It's a whole 3K :: zipped. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> :: On 28 Mar 2003 at 0:29, Francisco Tapia wrote: :: ::: I have a class and want to give each property some additional ::: methods such as the Oldvalue property, am I thinking this right? or ::: will I need to build it another way for example, todo the following ::: my class has this: ::: ::: CC.CCID = 1234 ::: Private mvarCCID As Long ::: Public Property Let CCID(ByVal vData As Long) ::: mvarCCID = vData ::: End Property ::: ::: I should be able to figure out how to do this but I have not found ::: any ::: good tutorials on the web Debug.print CC.CCID.OldValue ::: ::: How would I do the above? :: :: :: I think you will need to create a CCID class with a Value and :: OldValue properties. :: :: Then in your CC Class, CCID would return the pointer to your new :: CCID class and if you have set Value as the Default property, you :: should still be able to just use Debug.Print CC.CCID to get the :: value of CCID. : : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com From Bryan_Carbonnell at cbc.ca Fri Mar 28 12:09:51 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 13:09:51 -0500 Subject: [dba-VB] Class Tips Message-ID: None that I can see or think of off the top of my head. I say, go for it. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> my.lists at verizon.net 28-Mar-03 1:04:49 PM >>> Thanks Bryan, I'm thinking I can set this class (CCID) as a generic variant variable type to be able to reuse. Any reason that may be a problematic? -Francisco http://rcm.netfirms.com From my.lists at verizon.net Fri Mar 28 12:25:53 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 10:25:53 -0800 Subject: [dba-VB] Class Tips References: <657FB70438B7D311AF320090279C180103C5E4B3@EXCHMAIL> <002101c2f554$8683fc90$b615010a@FHTAPIA> Message-ID: <002f01c2f557$77c03400$b615010a@FHTAPIA> nevermind, I see why that's a problem... hmm I have a IsDirty property but once you dimension the properties as CCID or their respecitve class you can't use the let or set in the main class anymore, So it seems that I'm stuck w/o a dirty property. I'm sorry for the newbie q's if you can point me to some literature I'm more than happy to search, but I seem to not be keying in the right keywords to return these type of examples... Thanks, -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 10:04 AM [GMT-8], Francisco H Tapia wrote: : Thanks Bryan, : I'm thinking I can set this class (CCID) as a generic variant : variable type to be able to reuse. Any reason that may be a : problematic? : : -Francisco : http://rcm.netfirms.com : : On Friday, March 28, 2003 7:16 AM [GMT-8], : Bryan Carbonnell wrote: : :: Here you go. My MainClass is equivalent to your clsCustomerConcern I :: think. :: :: Ask if anything isn't clear. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> :: Thanks Bryan, :: :: Please do send me that example so I can see what you mean.. :) :: :: I was placing all the property attributes of a CC into a class named :: clsCustomerConcern and then just populate them at form load time :: (unbound :: form). so the load event would have the following ID's set :: :: CC.CCID = 1234 :: CC.AssignedID = {Some Guid} :: CC.Notes = "The customer wants some brochures" :: :: but then I'd like to also call an OldValue to each of these :: properties, I :: suppose it's just not possible right? I know I can do it all with a :: disconnected ADO recordset where each field has an OldValue, but then :: that's :: not as fun as whacking my head on my desk ;o) :: :: :: -Francisco :: http://rcm.netfirms.com/ :: :: On Friday, March 28, 2003 6:11 AM [GMT -8], :: Bryan Carbonnell wrote: :: ::: I did a quick and dirty demo of what I was talking about on the way ::: in to work this morning. ::: ::: Let me know if you would like me to send it to you. It's a whole 3K ::: zipped. ::: ::: Bryan Carbonnell ::: bryan_carbonnell at cbc.ca ::: :::::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> ::: On 28 Mar 2003 at 0:29, Francisco Tapia wrote: ::: :::: I have a class and want to give each property some additional :::: methods such as the Oldvalue property, am I thinking this right? or :::: will I need to build it another way for example, todo the following :::: my class has this: :::: :::: CC.CCID = 1234 :::: Private mvarCCID As Long :::: Public Property Let CCID(ByVal vData As Long) :::: mvarCCID = vData :::: End Property :::: :::: I should be able to figure out how to do this but I have not found :::: any :::: good tutorials on the web Debug.print CC.CCID.OldValue :::: :::: How would I do the above? ::: ::: ::: I think you will need to create a CCID class with a Value and ::: OldValue properties. ::: ::: Then in your CC Class, CCID would return the pointer to your new ::: CCID class and if you have set Value as the Default property, you ::: should still be able to just use Debug.Print CC.CCID to get the ::: value of CCID. :: :: :: _______________________________________________ :: 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 subs at solution-providers.ie Fri Mar 28 13:29:43 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Fri, 28 Mar 2003 19:29:43 -0000 Subject: [dba-VB] Serial Communications - Cross Posted VB and Access Message-ID: <007301c2f560$6315bdf0$219f7dc2@D8TZHN0J> Hello All, I have to receive serial communications from a scanner and compare it to the data that was just printed. I have downloaded a few different bits of software from www.planet-source-code.com that all work to a lesser or greater extent. Basically, at this stage I can receive data from the serial port. However, the client is happy to purchase an OCX or some other such tools to enhance the reliability of this project. There are a few utilities out there for between Euro 100 and Euro 500. The purpose of this email is to ask you guys have you used any such tools or utilities and if so, would you care to pass on the details? To state my question again, I can listen to the serial port now, but I just wondered was there some brialliant piece of software that I simply should not ignore. As usual, thanks in advance for your time and attention, Mark Breen Solution Providers Ireland -------------- next part -------------- An HTML attachment was scrubbed... URL: From my.lists at verizon.net Fri Mar 28 16:41:01 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 14:41:01 -0800 Subject: [dba-VB] Class Tips References: Message-ID: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> I must not be doing something right, I keep getting an error and I don't see why.. it's the error 91 object not set, I can shoot it off to you and you can tell me what I'm doing wrong if that's ok... Thanks, -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 7:19 AM [GMT-8], Bryan Carbonnell wrote: : THe only way that I know of to have a current value and an OldValue : for a property is to create a separate class that holds the : Properties value and old value. : : SO for each property you wanted to hold the value and OldValue for : tou would need speateate classes. : : The sample has been sent off line. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> : Thanks Bryan, : : Please do send me that example so I can see what you mean.. :) : : I was placing all the property attributes of a CC into a class named : clsCustomerConcern and then just populate them at form load time : (unbound : form). so the load event would have the following ID's set : : CC.CCID = 1234 : CC.AssignedID = {Some Guid} : CC.Notes = "The customer wants some brochures" : : but then I'd like to also call an OldValue to each of these : properties, I : suppose it's just not possible right? I know I can do it all with a : disconnected ADO recordset where each field has an OldValue, but then : that's : not as fun as whacking my head on my desk ;o) : : : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com From my.lists at verizon.net Fri Mar 28 17:08:04 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 15:08:04 -0800 Subject: [dba-VB] Class Tips References: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> Message-ID: <006701c2f57e$e369c780$b615010a@FHTAPIA> :-$ hehehe learning new things certainly can make you humble, I restepped through your example and it seems I had some variables misnamed :D, half working... any idea on how to enable an IsDirty property of the CCID so that if I dim a variable Dim CC as cMain and I modify the data from 1 value to another for the IsDirty property to be se to true? Can't see how that would be done... -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 2:41 PM [GMT-8], Francisco H Tapia wrote: : I must not be doing something right, I keep getting an error and I : don't see why.. it's the error 91 object not set, I can shoot it off : to you and you can tell me what I'm doing wrong if that's ok... : : Thanks, : -Francisco : http://rcm.netfirms.com : : On Friday, March 28, 2003 7:19 AM [GMT-8], : Bryan Carbonnell wrote: : :: THe only way that I know of to have a current value and an OldValue :: for a property is to create a separate class that holds the :: Properties value and old value. :: :: SO for each property you wanted to hold the value and OldValue for :: tou would need speateate classes. :: :: The sample has been sent off line. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> :: Thanks Bryan, :: :: Please do send me that example so I can see what you mean.. :) :: :: I was placing all the property attributes of a CC into a class named :: clsCustomerConcern and then just populate them at form load time :: (unbound :: form). so the load event would have the following ID's set :: :: CC.CCID = 1234 :: CC.AssignedID = {Some Guid} :: CC.Notes = "The customer wants some brochures" :: :: but then I'd like to also call an OldValue to each of these :: properties, I :: suppose it's just not possible right? I know I can do it all with a :: disconnected ADO recordset where each field has an OldValue, but then :: that's :: not as fun as whacking my head on my desk ;o) :: :: :: :: _______________________________________________ :: 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 carbonnb at sympatico.ca Fri Mar 28 18:54:56 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 19:54:56 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> Message-ID: <3E84A890.29558.1406E7E@localhost> On 28 Mar 2003 at 14:41, Francisco H Tapia wrote: > I must not be doing something right, I keep getting an error and I > don't see why.. it's the error 91 object not set, I can shoot it off > to you and you can tell me what I'm doing wrong if that's ok... Sure. Send it to my home accout, carbonnb at sympatico.ca -- Bryan Carbonnell - carbonnb at sympatico.ca Change is inevitable; progress is optional. From carbonnb at sympatico.ca Fri Mar 28 19:07:49 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 20:07:49 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <006701c2f57e$e369c780$b615010a@FHTAPIA> Message-ID: <3E84AB95.12205.14C39C1@localhost> On 28 Mar 2003 at 15:08, Francisco H Tapia wrote: > :-$ hehehe learning new things certainly can make you humble, I > restepped through your example and it seems I had some variables > misnamed :D, half working... any idea on how to enable an IsDirty > property of the CCID so that if I dim a variable > > Dim CC as cMain > > and I modify the data from 1 value to another for the IsDirty property > to be se to true? Can't see how that would be done... Well, the first thing that pops into my head is to create a .Parent Property in the CCID class. The only problem with that is that you actually have to "tear down" the classes before you set them = nothing. To see how to do that, go to my site http://www3.sympatico.ca/carbonnb/bryan/xapp/listvbavars.html and download the COM Add-In and look at the source code for it to see how to implement a Parent Property. That being said, It just occurred to me while sticking my daughters in the bath, you can raise an event in the CCID class and in your main class handle the raised event. In you Main Class use Dim WithEvents mobjCCID as CCID In your CCID Class in the general Declarations section Public Event Change() Then in the Set Value Procedure, after you save the old value and set the new value, you would use RaiseEvents Change Now back to your main class, and handle the CCID_CHange event. In here is where you can set your IsDirty module level variable to true. Make sense? If not let me know and I'll "enhance" the demo I did this morning. -- Bryan Carbonnell - carbonnb at sympatico.ca Experience is a wonderful thing. It enables you to recognize a mistake when you make it again. From my.lists at verizon.net Sat Mar 1 21:30:17 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sat, 1 Mar 2003 19:30:17 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821D3@main2.marlow.com> Message-ID: <009c01c2e06c$0c074cd0$0eb62904@amd2k> ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 Sat Mar 1 22:09:00 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Sat, 1 Mar 2003 22:09:00 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DC@main2.marlow.com> Inet protocol? Do you mean the Winsock control? Just an FYI, there is a known memory leak issue with the Winsock control in VB 6. It occurs when you unload an instance of the control. (To prevent the leak, never 'unload' instances of the control, just reuse them. When you are done using them, unload the entire form....it's a nasty memory leak too.) Drew -----Original Message----- From: Francisco Tapia To: dba-vb at databaseadvisors.com Sent: 3/1/03 9:30 PM Subject: Re: [dba-VB] Closing an application ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 Jdemarco at hshhp.org Sun Mar 2 11:25:50 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Sun, 2 Mar 2003 12:25:50 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8528D@TTNEXCHSRV1.hshhp.com> Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). Jim DeMarco -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Saturday, March 01, 2003 11:09 PM To: 'dba-vb at databaseadvisors.com ' Subject: RE: [dba-VB] Closing an application Inet protocol? Do you mean the Winsock control? Just an FYI, there is a known memory leak issue with the Winsock control in VB 6. It occurs when you unload an instance of the control. (To prevent the leak, never 'unload' instances of the control, just reuse them. When you are done using them, unload the entire form....it's a nasty memory leak too.) Drew -----Original Message----- From: Francisco Tapia To: dba-vb at databaseadvisors.com Sent: 3/1/03 9:30 PM Subject: Re: [dba-VB] Closing an application ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Sun Mar 2 19:51:01 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sun, 2 Mar 2003 17:51:01 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821DC@main2.marlow.com> Message-ID: <006501c2e127$5b154550$0eb62904@amd2k> hm, wininet.dll, I dim a control as Inet (or rather the original author did). I then "Unload ME" for the form.... The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user clicking a button, but does provide feedback to show what the heck it is doing... once done it launches the app and unloads itself, but it must be this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose this problem is still not fixed... as I mentioned i'm unloading the FORM, not the contorl and all I want to do is kill the app once it is done.. but of course I would not want it to harvest any memory from the OS once gone... it will currently run on win2K but eventually XP, and even ME... so I would like to take care of any potential memory leaks... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Saturday, March 01, 2003 8:09 PM Subject: RE: [dba-VB] Closing an application : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 my.lists at verizon.net Sun Mar 2 19:52:40 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sun, 2 Mar 2003 17:52:40 -0800 Subject: [dba-VB] Closing an application References: <22F1CCD5171D17419CB37FEEE09D5F99D8528D@TTNEXCHSRV1.hshhp.com> Message-ID: <007b01c2e127$938227f0$0eb62904@amd2k> :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com : From Jdemarco at hshhp.org Mon Mar 3 06:56:08 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 07:56:08 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85296@TTNEXCHSRV1.hshhp.com> I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 08:34:04 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 08:34:04 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DE@main2.marlow.com> Isn't the Inet control for internet stuff? I don't think that is the same as the Winsock control, which is for the lower level TCP/IP communications. The leak with the Winsock control is documented in the knowledge base though, so maybe you should search there about the Inet control. Drew -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 7:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application hm, wininet.dll, I dim a control as Inet (or rather the original author did). I then "Unload ME" for the form.... The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user clicking a button, but does provide feedback to show what the heck it is doing... once done it launches the app and unloads itself, but it must be this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose this problem is still not fixed... as I mentioned i'm unloading the FORM, not the contorl and all I want to do is kill the app once it is done.. but of course I would not want it to harvest any memory from the OS once gone... it will currently run on win2K but eventually XP, and even ME... so I would like to take care of any potential memory leaks... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Saturday, March 01, 2003 8:09 PM Subject: RE: [dba-VB] Closing an application : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : _______________________________________________ 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 Mon Mar 3 08:36:21 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 08:36:21 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DF@main2.marlow.com> I use the API URLDownloadToFile. Works pretty well, but I don't know what versions it works on. Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 6:56 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Closing an application I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hshhp.org Mon Mar 3 08:43:41 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 09:43:41 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8529F@TTNEXCHSRV1.hshhp.com> I used that or something just like it (it uses wininet.dll). I can't remember the problem but it either hosed windows or the app. I just know it was the NT version of the dll and it did not like being on Win98. Jim -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 9:36 AM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] Closing an application I use the API URLDownloadToFile. Works pretty well, but I don't know what versions it works on. Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 6:56 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Closing an application I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 11:23:22 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 11:23:22 -0600 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821F2@main2.marlow.com> Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz From Jdemarco at hshhp.org Mon Mar 3 11:54:30 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 12:54:30 -0500 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54AE5@TTNEXCHSRV1.hshhp.com> Drew Do you really need to write an app to register a DLL? You can add an item to the Windows Send To menu that's a shortcut to regsvr32.exe (right click a DLL, choose Send To | Register a DLL, or whatever you named the shortcut). Unless there's some functionality I'm missing here. Hadyn's request is actually timely as I've been working on a demo/tutorial/mini-training session for our developers to acclimate them to ASP via straight ASP, VB, and finally .NET. It will probably be complete by the end of the week (or early next week) and if anyone would like to see it I'd be glad to entertain off-line requests. Basically I wrote a few simple pages in ASP, duplicate them in VB and VB.NET just to show the method. It's really a simple tutorial that shows how to look up and display data, and do data entry via the web. Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 12:23 PM To: 'Hadyn Morgan' Cc: dba-vb at databaseadvisors.com Subject: [dba-VB] RE: Web Activex DLL's Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 13:56:38 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 13:56:38 -0600 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821F5@main2.marlow.com> It only took a few minutes to write that .exe, so it wasn't exactly a 'huge' project. It boils down to requiring the same amount of work in the end. My co-worker just lives for using regsvr32.exe, and I just out of habit run my .exe. 6 here, half dozen there. ;) Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 11:55 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] RE: Web Activex DLL's Drew Do you really need to write an app to register a DLL? You can add an item to the Windows Send To menu that's a shortcut to regsvr32.exe (right click a DLL, choose Send To | Register a DLL, or whatever you named the shortcut). Unless there's some functionality I'm missing here. Hadyn's request is actually timely as I've been working on a demo/tutorial/mini-training session for our developers to acclimate them to ASP via straight ASP, VB, and finally .NET. It will probably be complete by the end of the week (or early next week) and if anyone would like to see it I'd be glad to entertain off-line requests. Basically I wrote a few simple pages in ASP, duplicate them in VB and VB.NET just to show the method. It's really a simple tutorial that shows how to look up and display data, and do data entry via the web. Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 12:23 PM To: 'Hadyn Morgan' Cc: dba-vb at databaseadvisors.com Subject: [dba-VB] RE: Web Activex DLL's Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From my.lists at verizon.net Mon Mar 3 15:23:24 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Mon, 3 Mar 2003 13:23:24 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821DE@main2.marlow.com> Message-ID: <000d01c2e1cb$20720830$b615010a@FHTAPIA> Just spoke to the author, he mentioned that there seems to be some bulky handling with this inet control, (on the MS side :S) anyways if you guys wanted to check out which source I meant here is the full link... http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=13413&ln gWId=1 The control is called "Microsoft Internet Transfer Control, Version 6.0 (SP4)" btw, I tried END... and it still does not help out... :( -Francisco http://rcm.netfirms.com ----- Original Message ----- From: "Drew Wutka" To: Sent: Monday, March 03, 2003 6:34 AM Subject: RE: [dba-VB] Closing an application : Isn't the Inet control for internet stuff? I don't think that is the same : as the Winsock control, which is for the lower level TCP/IP communications. : The leak with the Winsock control is documented in the knowledge base : though, so maybe you should search there about the Inet control. : : Drew : : -----Original Message----- : From: Francisco Tapia [mailto:my.lists at verizon.net] : Sent: Sunday, March 02, 2003 7:51 PM : To: dba-vb at databaseadvisors.com : Subject: Re: [dba-VB] Closing an application : : : hm, wininet.dll, I dim a control as Inet (or rather the original author : did). I then "Unload ME" for the form.... : The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user : clicking a button, but does provide feedback to show what the heck it is : doing... once done it launches the app and unloads itself, but it must be : this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose : this problem is still not fixed... as I mentioned i'm unloading the FORM, : not the contorl and all I want to do is kill the app once it is done.. but : of course I would not want it to harvest any memory from the OS once gone... : it will currently run on win2K but eventually XP, and even ME... so I would : like to take care of any potential memory leaks... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Saturday, March 01, 2003 8:09 PM : Subject: RE: [dba-VB] Closing an application : : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : : known memory leak issue with the Winsock control in VB 6. It occurs when : : you unload an instance of the control. (To prevent the leak, never : 'unload' : : instances of the control, just reuse them. When you are done using them, : : unload the entire form....it's a nasty memory leak too.) : : : : Drew : : : : -----Original Message----- : : From: Francisco Tapia : : To: dba-vb at databaseadvisors.com : : Sent: 3/1/03 9:30 PM : : Subject: Re: [dba-VB] Closing an application : : : : ah ha!, so END is acceptable in a VB environment... and would kill any : : lingering processes in my called module then right... I'm using the inet : : protocol but for some reason it seems to hang every once in a while.... : : : : -Francisco : : http://rcm.netfirms.com/ : : ----- Original Message ----- : : From: "Drew Wutka" : : To: : : Sent: Friday, February 28, 2003 5:15 PM : : Subject: RE: [dba-VB] Closing an application : : : : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : : form, : : : and nothing loaded in the background, you can just unload the form (or : : give : : : the user the 'x') but End stops the execution of your VB .exe, thus : : : unloading everything. : : : : : : Drew : : : : : : -----Original Message----- : : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : : Sent: Friday, February 28, 2003 6:24 PM : : : To: dba-vb at databaseadvisors.com : : : Subject: RE: [dba-VB] Closing an application : : : : : : : : : I have heard this in the past - and I must admit to being guilty of : : : using End, but I've never really know the difference, other than End : : : exits your app no matter where it is, and unload requires you to call : : : each form individually. : : : : : : What makes End such a No-no? : : : : : : Greg : : : : : : : : : -----Original Message----- : : : From: dba-vb-admin at databaseadvisors.com : : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : : Manning : : : Sent: Friday, February 28, 2003 3:40 PM : : : To: dba-vb at databaseadvisors.com : : : Subject: RE: [dba-VB] Closing an application : : : : : : "Unload Me" hides the form and removes it from memory so you are : : : definitely : : : doing the right thing. As with Access, "END" is a no-no. : : : : : : Doris Manning : : : Database Administrator : : : Hargrove Inc. : : : www.hargroveinc.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 : : : : : _______________________________________________ : 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 subs at solution-providers.ie Wed Mar 5 07:17:39 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Wed, 5 Mar 2003 13:17:39 -0000 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 References: Message-ID: <000701c2e319$992fcf10$356da8c0@IEW001> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, From subs at solution-providers.ie Wed Mar 5 07:18:51 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Wed, 5 Mar 2003 13:18:51 -0000 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: <001001c2e319$c4162b70$356da8c0@IEW001> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, Best Regards Mark L. Breen Solution Providers Ltd Ireland From Bryan_Carbonnell at cbc.ca Wed Mar 5 07:45:04 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Wed, 05 Mar 2003 08:45:04 -0500 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: I have been recently bitten by something like this. What VB does is store copies (well actually most of the binary data for a form) in the .frx file in the same directory as the .frm Once compiled into a DLL or exe, the icons are inside of the compiled file. So if you are creating a new form from a template, I would suspect that the template either doesn't have a corresponding frx, or it doesn't get copied over correctly to your project directory. Not really an answers or advice, but information that was new to me about a month ago so it may not be entirely accurate., but the jist should be right. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> subs at solution-providers.ie 05-Mar-03 8:17:39 AM >>> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, From Jdemarco at hshhp.org Wed Mar 5 09:27:23 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 5 Mar 2003 10:27:23 -0500 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8530B@TTNEXCHSRV1.hshhp.com> I usually ship the icons with the app. You could change their extensions if you don't want anyone to see them. I believe you can store them in a resource file as well. This way you don't have to ship the icons they become a part of the resource file. Haven't used this method even though I've considered it a time or two. HTH, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Mark L. Breen [mailto:subs at solution-providers.ie] Sent: Wednesday, March 05, 2003 8:19 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, Best Regards Mark L. Breen Solution Providers Ltd Ireland _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From R.Griffiths at bury.gov.uk Thu Mar 6 12:09:15 2003 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Thu, 6 Mar 2003 18:09:15 -0000 Subject: [dba-VB] Access and Crystal Reports Message-ID: <52339DF8DCA2A544AF660C8217EB7DCD0227F109@mailgate.bury.gov.uk> Hi using code how do you run a Crystal Report when the Access Db has 1) a password and/or 2) uses a system mdw Many thanks Richard -------------------------------------------------------------------------------------------------------------------- This e-mail, together with any files transmitted with it, is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited without liability on our part. If you have received this e-mail in error please notify the sender. From paul.hartland at fsmail.net Tue Mar 11 05:40:19 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Tue, 11 Mar 2003 11:40:19 +0000 Subject: [dba-VB] Opening Outlook from VB6 Message-ID: <20030311114019.VSDR3409.fep06-svc.ttys.com@localhost> To all, This may sound like a very stupid question, but I think I have gone totally brain dead, could someone please tell me the best way to open an external program, something like MS Outlook using Visual Basic 6 Thanks in advance Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From R.Griffiths at bury.gov.uk Tue Mar 11 05:51:02 2003 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Mar 2003 11:51:02 -0000 Subject: [dba-VB] Opening Outlook from VB6 Message-ID: <52339DF8DCA2A544AF660C8217EB7DCD0227F110@mailgate.bury.gov.uk> Shell? > -----Original Message----- > From: paul.hartland at fsmail.net [SMTP:paul.hartland at fsmail.net] > Sent: 11 March 2003 11:40 > To: accessd at databaseadvisors.com; dba-vb at databaseadvisors.com > Subject: [dba-VB] Opening Outlook from VB6 > > To all, > > This may sound like a very stupid question, but I think I have gone > totally brain dead, could someone please tell me the best way to open an > external program, something like MS Outlook using Visual Basic 6 > > Thanks in advance > > Paul Hartland > > __________________________________________________________________________ > Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for > your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month > after that. > > For more information visit http://www.freeserve.com/time/ or call free on > 0800 970 8890 > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > -------------------------------------------------------------------------------------------------------------------- This e-mail, together with any files transmitted with it, is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited without liability on our part. By responding to this e-mail it is accepted that your response may be the subject of recording/monitoring to ensure compliance with the Council?s ICT Security Policy If you have received this e-mail in error please notify the sender. From paul.hartland at fsmail.net Tue Mar 11 08:22:14 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Tue, 11 Mar 2003 14:22:14 +0000 Subject: [dba-VB] Opening Outlook if closed code not working Message-ID: <20030311142214.BYRO3194.fep12-svc.ttys.com@localhost> To all, Can anyone see why the following code (VB6) would open Outlook even if it is already open, I want a module that when I run my application, it checks to see if Outlook is open if not open it...... Function OpenOutlook() Dim objOut As Object On Error Resume Next Set objOut = GetObject("Outlook.Application") If (Err <> 0) Then Dim strOpenOutlook strOpenOutlook = Shell("D:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\OUTLOOK.EXE", vbMinimizedNoFocus) End If End Function Thanks in advance. Paul __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From ghazzard at aelfen.net Wed Mar 12 07:16:39 2003 From: ghazzard at aelfen.net (Gregory K. Hazzard) Date: Wed, 12 Mar 2003 07:16:39 -0600 Subject: [dba-VB] Opening Outlook if closed code not working In-Reply-To: <20030311142214.BYRO3194.fep12-svc.ttys.com@localhost> Message-ID: <00db01c2e899$9ecc1390$0200a8c0@greg> Having never done this, I'm guessing, but I'd say you need your comma. According to what I have read on this, since what you're really using is the second argument, you need to have the comma in the line, indicating that this is not the first argument. Here's the example I got from the MSDN: Set MyXL = Getobject( , "Excel.Application") Good luck. Greg -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Tuesday, March 11, 2003 8:22 AM To: accessd at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Opening Outlook if closed code not working To all, Can anyone see why the following code (VB6) would open Outlook even if it is already open, I want a module that when I run my application, it checks to see if Outlook is open if not open it...... Function OpenOutlook() Dim objOut As Object On Error Resume Next Set objOut = GetObject("Outlook.Application") If (Err <> 0) Then Dim strOpenOutlook strOpenOutlook = Shell("D:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\OUTLOOK.EXE", vbMinimizedNoFocus) End If End Function Thanks in advance. Paul ________________________________________________________________________ __ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From paul.hartland at fsmail.net Fri Mar 14 03:42:12 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 14 Mar 2003 9:42:12 +0000 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: <20030314094212.EMGX5263.fep04-svc.ttys.com@localhost> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From GRAY at utah.gov Fri Mar 14 08:56:29 2003 From: GRAY at utah.gov (Gary Ray) Date: Fri, 14 Mar 2003 07:56:29 -0700 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: This is some code I am using in an Active Reports designer that works for me. It is based on the code in Chapter 6 of the manual "Unbound Reporting and Grouping" Private Sub ActiveReport_DataInitialize() Set mRS = New ADODB.Recordset '---This report gets its recordset from a custom Activex control's property Set mRS = frmMain.ActiveControl.GetSummaryRS mRS.MoveFirst With Fields .Add "Category" .Add "Boundaries" .Add "Obs" .Add "Percent" End With End Sub Private Sub ActiveReport_FetchData(EOF As Boolean) 'If mRS.EOF = True Then Exit Sub If Not mRS.EOF Then '---Sets ActiveReports fields collection values to mRS values Fields("Category").Value = mRS!Category Fields("Boundaries").Value = mRS!Boundaries Fields("Obs").Value = mRS!Obs Fields("Percent").Value = mRS!Percent End If If Not mRS.EOF Then '---If not at the EOF then set FetchData's EOF value to false EOF = False '---Advance the RS mRS.MoveNext End If End Sub Gary Ray - Application Developer Workforce Information Systems R & D E-Mail gray at utah.gov >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From GRAY at utah.gov Fri Mar 14 09:26:49 2003 From: GRAY at utah.gov (Gary Ray) Date: Fri, 14 Mar 2003 08:26:49 -0700 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: Paul, One other thing. As you work in VB and ADO you will have to "unlearn" some Access stuff. One of those things may be the brackets in your SQL statements. I don't know if they are the problem, but they are not required. >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.hartland at fsmail.net Fri Mar 14 09:48:00 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 14 Mar 2003 15:48:00 +0000 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: <20030314154800.CVPA4985.fep08-svc.ttys.com@localhost> Thanks for the response but I forgot to post that I had solved it by simply changing .RecordSet to .Source i.e. Original line : repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" New Line : repPersonnelByOffice.dcRptData.Source = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" Then show the report to screen...... Thanks for all the other info anyway.......... Paul From: "Gary Ray" Date: Fri 14/Mar/2003 15:26 GMT To: Subject: Re: [dba-VB] Active Reports for Visual Basic 6 Paul, One other thing. As you work in VB and ADO you will have to "unlearn" some Access stuff. One of those things may be the brackets in your SQL statements. I don't know if they are the problem, but they are not required. >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From jcolby at colbyconsulting.com Fri Mar 14 19:41:13 2003 From: jcolby at colbyconsulting.com (John W. Colby) Date: Fri, 14 Mar 2003 20:41:13 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com From accessd at shaw.ca Sat Mar 15 01:23:28 2003 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Fri, 14 Mar 2003 23:23:28 -0800 Subject: [dba-VB] VB.Net stuff In-Reply-To: Message-ID: Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jcolby at colbyconsulting.com Sat Mar 15 08:23:32 2003 From: jcolby at colbyconsulting.com (John W. Colby) Date: Sat, 15 Mar 2003 09:23:32 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: Message-ID: Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 6328 bytes Desc: not available URL: From JRojas at tnco-inc.com Mon Mar 17 12:22:58 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Mon, 17 Mar 2003 13:22:58 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <806536912C472E4A9D6515DF2E57261E0C5921@mercury.tnco-inc.com> John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From Jdemarco at hshhp.org Mon Mar 17 12:30:23 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 17 Mar 2003 13:30:23 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85490@TTNEXCHSRV1.hshhp.com> Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From jcolby at ColbyConsulting.com Mon Mar 17 14:35:54 2003 From: jcolby at ColbyConsulting.com (John W. Colby) Date: Mon, 17 Mar 2003 15:35:54 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99D85490@TTNEXCHSRV1.hshhp.com> Message-ID: Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 9352 bytes Desc: not available URL: From JRojas at tnco-inc.com Mon Mar 17 15:37:13 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Mon, 17 Mar 2003 16:37:13 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <806536912C472E4A9D6515DF2E57261E0C5922@mercury.tnco-inc.com> In Java you don't have to instantiate a class in order to use it's methods. Do you get this functionality in VB.Net? For example, the Character class in Java does not have to be instantiated in order to use it methods. Instead of this: Character myChar = new Character("a"); myChar.isDigit("a"); You could just do: Character.isDigit("a"); -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Monday, March 17, 2003 3:36 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From jcolby at ColbyConsulting.com Mon Mar 17 16:10:08 2003 From: jcolby at ColbyConsulting.com (John W. Colby) Date: Mon, 17 Mar 2003 17:10:08 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: <806536912C472E4A9D6515DF2E57261E0C5922@mercury.tnco-inc.com> Message-ID: Yes, the method has to be declared static, and then it doesn't have to be instantiated. I'm stretching on this however since I am very new to this. However I have seen this mentioned in my book. So you can't just use any and all methods apparently, even with the framework classes. Some are static some aren't. It appears that some simply don't make sense to use without instantiation, for example if it's a variable class, and you are going to call the method that formats that variable to a string, it makes no sense unless the variable has some value. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Joe Rojas Sent: Monday, March 17, 2003 4:37 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff In Java you don't have to instantiate a class in order to use it's methods. Do you get this functionality in VB.Net? For example, the Character class in Java does not have to be instantiated in order to use it methods. Instead of this: Character myChar = new Character("a"); myChar.isDigit("a"); You could just do: Character.isDigit("a"); -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Monday, March 17, 2003 3:36 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 10792 bytes Desc: not available URL: From paul.hartland at fsmail.net Thu Mar 20 05:31:52 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 20 Mar 2003 11:31:52 +0000 Subject: [dba-VB] Move from Windows NT to XP Message-ID: <20030320113152.GJNK3144.fep08-svc.ttys.com@localhost> To all, I have a VB6 FE connected to a SQL Server 7.0 BE, on the employee records when someone changes a payroll number myself and the HR Department would receive an email stating the changes. Under Windows NT the email got sent automatically without a problem, BUT we have just gone to Windows XP and before it sends an email the following happens : 1. The user gets asked for his/her Outlook profile name. 2. The user receive's a message saying a program is automatically trying to send an email, and asks for confirmation that Outlook should send the email.... Has anyone else come across this ?. If so, is there anyway around this problem as sometimes it will ask me to confirm the email to each individual recipient (sometimes upto 15 people), and this can be very irritating.... Thanks for any help in advance...... Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From paul.hartland at fsmail.net Fri Mar 21 04:37:35 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 21 Mar 2003 10:37:35 +0000 Subject: [dba-VB] OT - XP Taskbar Help Required Message-ID: <20030321103735.ZHY5916.fep10-svc.ttys.com@localhost> To all, We have recently (2 days ago) upgraded to XP (not a very big fan at all), and there is one thing thats absolutely driving me mad. I have an Access Application and as usual when you run it, a button appears in the taskbar.....BUT, when you select an option from the switchboard opening another form another button appears and so on. Is there any way to stop XP creating a button for each form you have open.... Thanks in advance. Yours going absolutely raving mental...... Paul __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?13.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From martyconnelly at shaw.ca Sat Mar 22 18:11:26 2003 From: martyconnelly at shaw.ca (MartyConnelly) Date: Sat, 22 Mar 2003 16:11:26 -0800 Subject: [dba-VB] OT - XP Taskbar Help Required References: <20030321103735.ZHY5916.fep10-svc.ttys.com@localhost> Message-ID: <3E7CFBAE.1010505@shaw.ca> The way to turn off this annoying (added) feature they started with Access 2000, go to Tools | Options | View tab | Uncheck "Windows in Taskbar". You could do this by adding the following line into your "startup forms" (i.e. main menu, switchboard, etc.)'s OnLoad event: Call Application.SetOption("ShowWindowsInTaskbar", False) Or you could right click the taskbar and place them in a stack as happens with IE paul.hartland at fsmail.net wrote: >To all, > >We have recently (2 days ago) upgraded to XP (not a very big fan at all), and there is one thing thats absolutely driving me mad. I have an Access Application and as usual when you run it, a button appears in the taskbar.....BUT, when you select an option from the switchboard opening another form another button appears and so on. Is there any way to stop XP creating a button for each form you have open.... > >Thanks in advance. > >Yours going absolutely raving mental...... > >Paul > >__________________________________________________________________________ >Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for >your first 3 months, that's HALF PRICE! And then it's just ?13.99 a month >after that. > >For more information visit http://www.freeserve.com/time/ or call free on >0800 970 8890 > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > > From info at oop.nl Sat Mar 22 18:14:59 2003 From: info at oop.nl (Oop! Software & Computers) Date: Sun, 23 Mar 2003 01:14:59 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303230114.AA02024@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From Jdemarco at hshhp.org Wed Mar 26 13:31:14 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 14:31:14 -0500 Subject: [dba-VB] MSDE and replication Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8567F@TTNEXCHSRV1.hshhp.com> Cross posted: AccessD & dba-VB Does anyone know if I can replicate a MSDE BE when using VB as FE or is it limited to Access ADPs? Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From info at oop.nl Wed Mar 26 13:34:03 2003 From: info at oop.nl (Oop! Software & Computers) Date: Wed, 26 Mar 2003 20:34:03 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303262034.AA01980@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From Jdemarco at hshhp.org Wed Mar 26 14:02:48 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 15:02:48 -0500 Subject: [dba-VB] OT: oh no (list moderators please) Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> Cross posted: accessd, dba-VB Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! Jim DeMarco *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From info at oop.nl Wed Mar 26 14:05:34 2003 From: info at oop.nl (Oop! Software & Computers) Date: Wed, 26 Mar 2003 21:05:34 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303262105.AA01792@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From sgsax at ksu.edu Wed Mar 26 15:38:35 2003 From: sgsax at ksu.edu (Seth Galitzer) Date: 26 Mar 2003 15:38:35 -0600 Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> References: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> Message-ID: <1048714716.7326.42.camel@sgsax-th4022c> It's been taken care of. Seth On Wed, 2003-03-26 at 14:02, Jim DeMarco wrote: > Cross posted: accessd, dba-VB > > Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! > > Jim DeMarco -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From Jdemarco at hshhp.org Wed Mar 26 16:04:51 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 17:04:51 -0500 Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8568E@TTNEXCHSRV1.hshhp.com> Thanks, Jim -----Original Message----- From: Seth Galitzer [mailto:sgsax at ksu.edu] Sent: Wednesday, March 26, 2003 4:39 PM To: accessd Cc: AccessD (E-mail); VB List (E-mail) Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) It's been taken care of. Seth On Wed, 2003-03-26 at 14:02, Jim DeMarco wrote: > Cross posted: accessd, dba-VB > > Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! > > Jim DeMarco -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Fri Mar 28 02:29:56 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Fri, 28 Mar 2003 00:29:56 -0800 Subject: [dba-VB] Class Tips Message-ID: <00ab01c2f504$3d5685b0$0eb62904@amd2k> So beyond adding a property.. how would you do this: I have a class and want to give each property some additional methods such as the Oldvalue property, am I thinking this right? or will I need to build it another way for example, todo the following my class has this: CC.CCID = 1234 Private mvarCCID As Long Public Property Let CCID(ByVal vData As Long) mvarCCID = vData End Property I should be able to figure out how to do this but I have not found any good tutorials on the web Debug.print CC.CCID.OldValue How would I do the above? Thanks, -Francisco From carbonnb at sympatico.ca Fri Mar 28 04:50:48 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 05:50:48 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <00ab01c2f504$3d5685b0$0eb62904@amd2k> Message-ID: <3E83E2B8.4828.24492D@localhost> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. From Bryan_Carbonnell at cbc.ca Fri Mar 28 08:11:23 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 09:11:23 -0500 Subject: [dba-VB] Class Tips Message-ID: I did a quick and dirty demo of what I was talking about on the way in to work this morning. Let me know if you would like me to send it to you. It's a whole 3K zipped. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hshhp.org Fri Mar 28 08:24:12 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Fri, 28 Mar 2003 09:24:12 -0500 Subject: [dba-VB] Class Tips Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54F56@TTNEXCHSRV1.hshhp.com> Basically you faked inheritance in VB6 right? If you ever get a chance to check it out one of the neat improvements in VB.NET is better inheritance implentation. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Bryan Carbonnell [mailto:Bryan_Carbonnell at cbc.ca] Sent: Friday, March 28, 2003 9:11 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Class Tips I did a quick and dirty demo of what I was talking about on the way in to work this morning. Let me know if you would like me to send it to you. It's a whole 3K zipped. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. _______________________________________________ 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From Bryan_Carbonnell at cbc.ca Fri Mar 28 08:29:47 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 09:29:47 -0500 Subject: [dba-VB] Class Tips Message-ID: I don't know, 'cause I'm not sure I know what inheritance is. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> Jdemarco at hshhp.org 28-Mar-03 9:24:12 AM >>> Basically you faked inheritance in VB6 right? If you ever get a chance to check it out one of the neat improvements in VB.NET is better inheritance implentation. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan From my.lists at verizon.net Fri Mar 28 09:11:28 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Fri, 28 Mar 2003 07:11:28 -0800 Subject: [dba-VB] Class Tips References: Message-ID: <003301c2f53c$4ed4ffa0$0eb62904@amd2k> Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) -Francisco http://rcm.netfirms.com/ On Friday, March 28, 2003 6:11 AM [GMT -8], Bryan Carbonnell wrote: : I did a quick and dirty demo of what I was talking about on the way : in to work this morning. : : Let me know if you would like me to send it to you. It's a whole 3K : zipped. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> : On 28 Mar 2003 at 0:29, Francisco Tapia wrote: : :: I have a class and want to give each property some additional methods :: such as the Oldvalue property, am I thinking this right? or will I :: need to build it another way for example, todo the following my class :: has this: :: :: CC.CCID = 1234 :: Private mvarCCID As Long :: Public Property Let CCID(ByVal vData As Long) :: mvarCCID = vData :: End Property :: :: I should be able to figure out how to do this but I have not found :: any :: good tutorials on the web Debug.print CC.CCID.OldValue :: :: How would I do the above? : : : I think you will need to create a CCID class with a Value and : OldValue properties. : : Then in your CC Class, CCID would return the pointer to your new : CCID class and if you have set Value as the Default property, you : should still be able to just use Debug.Print CC.CCID to get the : value of CCID. From Bryan_Carbonnell at cbc.ca Fri Mar 28 09:19:08 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 10:19:08 -0500 Subject: [dba-VB] Class Tips Message-ID: THe only way that I know of to have a current value and an OldValue for a property is to create a separate class that holds the Properties value and old value. SO for each property you wanted to hold the value and OldValue for tou would need speateate classes. The sample has been sent off line. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) From Jdemarco at hshhp.org Fri Mar 28 11:44:26 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Fri, 28 Mar 2003 12:44:26 -0500 Subject: [dba-VB] Class Tips Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54F5F@TTNEXCHSRV1.hshhp.com> There's another method that involves using the PropertyBag property. If you set the class Persistable property to: 1 - Persistable you can save and retrieve the values. Here's a link I found on codehound.com. http://www.vbwm.com/art_1999/whatsnew/persist.asp HTH, Jim DeMarco -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Friday, March 28, 2003 10:11 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Class Tips Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) -Francisco http://rcm.netfirms.com/ On Friday, March 28, 2003 6:11 AM [GMT -8], Bryan Carbonnell wrote: : I did a quick and dirty demo of what I was talking about on the way : in to work this morning. : : Let me know if you would like me to send it to you. It's a whole 3K : zipped. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> : On 28 Mar 2003 at 0:29, Francisco Tapia wrote: : :: I have a class and want to give each property some additional methods :: such as the Oldvalue property, am I thinking this right? or will I :: need to build it another way for example, todo the following my class :: has this: :: :: CC.CCID = 1234 :: Private mvarCCID As Long :: Public Property Let CCID(ByVal vData As Long) :: mvarCCID = vData :: End Property :: :: I should be able to figure out how to do this but I have not found :: any :: good tutorials on the web Debug.print CC.CCID.OldValue :: :: How would I do the above? : : : I think you will need to create a CCID class with a Value and : OldValue properties. : : Then in your CC Class, CCID would return the pointer to your new : CCID class and if you have set Value as the Default property, you : should still be able to just use Debug.Print CC.CCID to get the : value of CCID. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Fri Mar 28 12:04:49 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 10:04:49 -0800 Subject: [dba-VB] Class Tips References: <657FB70438B7D311AF320090279C180103C5E4B3@EXCHMAIL> Message-ID: <002101c2f554$8683fc90$b615010a@FHTAPIA> Thanks Bryan, I'm thinking I can set this class (CCID) as a generic variant variable type to be able to reuse. Any reason that may be a problematic? -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 7:16 AM [GMT-8], Bryan Carbonnell wrote: : Here you go. My MainClass is equivalent to your clsCustomerConcern I : think. : : Ask if anything isn't clear. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> : Thanks Bryan, : : Please do send me that example so I can see what you mean.. :) : : I was placing all the property attributes of a CC into a class named : clsCustomerConcern and then just populate them at form load time : (unbound : form). so the load event would have the following ID's set : : CC.CCID = 1234 : CC.AssignedID = {Some Guid} : CC.Notes = "The customer wants some brochures" : : but then I'd like to also call an OldValue to each of these : properties, I : suppose it's just not possible right? I know I can do it all with a : disconnected ADO recordset where each field has an OldValue, but then : that's : not as fun as whacking my head on my desk ;o) : : : -Francisco : http://rcm.netfirms.com/ : : On Friday, March 28, 2003 6:11 AM [GMT -8], : Bryan Carbonnell wrote: : :: I did a quick and dirty demo of what I was talking about on the way :: in to work this morning. :: :: Let me know if you would like me to send it to you. It's a whole 3K :: zipped. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> :: On 28 Mar 2003 at 0:29, Francisco Tapia wrote: :: ::: I have a class and want to give each property some additional ::: methods such as the Oldvalue property, am I thinking this right? or ::: will I need to build it another way for example, todo the following ::: my class has this: ::: ::: CC.CCID = 1234 ::: Private mvarCCID As Long ::: Public Property Let CCID(ByVal vData As Long) ::: mvarCCID = vData ::: End Property ::: ::: I should be able to figure out how to do this but I have not found ::: any ::: good tutorials on the web Debug.print CC.CCID.OldValue ::: ::: How would I do the above? :: :: :: I think you will need to create a CCID class with a Value and :: OldValue properties. :: :: Then in your CC Class, CCID would return the pointer to your new :: CCID class and if you have set Value as the Default property, you :: should still be able to just use Debug.Print CC.CCID to get the :: value of CCID. : : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com From Bryan_Carbonnell at cbc.ca Fri Mar 28 12:09:51 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 13:09:51 -0500 Subject: [dba-VB] Class Tips Message-ID: None that I can see or think of off the top of my head. I say, go for it. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> my.lists at verizon.net 28-Mar-03 1:04:49 PM >>> Thanks Bryan, I'm thinking I can set this class (CCID) as a generic variant variable type to be able to reuse. Any reason that may be a problematic? -Francisco http://rcm.netfirms.com From my.lists at verizon.net Fri Mar 28 12:25:53 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 10:25:53 -0800 Subject: [dba-VB] Class Tips References: <657FB70438B7D311AF320090279C180103C5E4B3@EXCHMAIL> <002101c2f554$8683fc90$b615010a@FHTAPIA> Message-ID: <002f01c2f557$77c03400$b615010a@FHTAPIA> nevermind, I see why that's a problem... hmm I have a IsDirty property but once you dimension the properties as CCID or their respecitve class you can't use the let or set in the main class anymore, So it seems that I'm stuck w/o a dirty property. I'm sorry for the newbie q's if you can point me to some literature I'm more than happy to search, but I seem to not be keying in the right keywords to return these type of examples... Thanks, -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 10:04 AM [GMT-8], Francisco H Tapia wrote: : Thanks Bryan, : I'm thinking I can set this class (CCID) as a generic variant : variable type to be able to reuse. Any reason that may be a : problematic? : : -Francisco : http://rcm.netfirms.com : : On Friday, March 28, 2003 7:16 AM [GMT-8], : Bryan Carbonnell wrote: : :: Here you go. My MainClass is equivalent to your clsCustomerConcern I :: think. :: :: Ask if anything isn't clear. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> :: Thanks Bryan, :: :: Please do send me that example so I can see what you mean.. :) :: :: I was placing all the property attributes of a CC into a class named :: clsCustomerConcern and then just populate them at form load time :: (unbound :: form). so the load event would have the following ID's set :: :: CC.CCID = 1234 :: CC.AssignedID = {Some Guid} :: CC.Notes = "The customer wants some brochures" :: :: but then I'd like to also call an OldValue to each of these :: properties, I :: suppose it's just not possible right? I know I can do it all with a :: disconnected ADO recordset where each field has an OldValue, but then :: that's :: not as fun as whacking my head on my desk ;o) :: :: :: -Francisco :: http://rcm.netfirms.com/ :: :: On Friday, March 28, 2003 6:11 AM [GMT -8], :: Bryan Carbonnell wrote: :: ::: I did a quick and dirty demo of what I was talking about on the way ::: in to work this morning. ::: ::: Let me know if you would like me to send it to you. It's a whole 3K ::: zipped. ::: ::: Bryan Carbonnell ::: bryan_carbonnell at cbc.ca ::: :::::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> ::: On 28 Mar 2003 at 0:29, Francisco Tapia wrote: ::: :::: I have a class and want to give each property some additional :::: methods such as the Oldvalue property, am I thinking this right? or :::: will I need to build it another way for example, todo the following :::: my class has this: :::: :::: CC.CCID = 1234 :::: Private mvarCCID As Long :::: Public Property Let CCID(ByVal vData As Long) :::: mvarCCID = vData :::: End Property :::: :::: I should be able to figure out how to do this but I have not found :::: any :::: good tutorials on the web Debug.print CC.CCID.OldValue :::: :::: How would I do the above? ::: ::: ::: I think you will need to create a CCID class with a Value and ::: OldValue properties. ::: ::: Then in your CC Class, CCID would return the pointer to your new ::: CCID class and if you have set Value as the Default property, you ::: should still be able to just use Debug.Print CC.CCID to get the ::: value of CCID. :: :: :: _______________________________________________ :: 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 subs at solution-providers.ie Fri Mar 28 13:29:43 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Fri, 28 Mar 2003 19:29:43 -0000 Subject: [dba-VB] Serial Communications - Cross Posted VB and Access Message-ID: <007301c2f560$6315bdf0$219f7dc2@D8TZHN0J> Hello All, I have to receive serial communications from a scanner and compare it to the data that was just printed. I have downloaded a few different bits of software from www.planet-source-code.com that all work to a lesser or greater extent. Basically, at this stage I can receive data from the serial port. However, the client is happy to purchase an OCX or some other such tools to enhance the reliability of this project. There are a few utilities out there for between Euro 100 and Euro 500. The purpose of this email is to ask you guys have you used any such tools or utilities and if so, would you care to pass on the details? To state my question again, I can listen to the serial port now, but I just wondered was there some brialliant piece of software that I simply should not ignore. As usual, thanks in advance for your time and attention, Mark Breen Solution Providers Ireland -------------- next part -------------- An HTML attachment was scrubbed... URL: From my.lists at verizon.net Fri Mar 28 16:41:01 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 14:41:01 -0800 Subject: [dba-VB] Class Tips References: Message-ID: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> I must not be doing something right, I keep getting an error and I don't see why.. it's the error 91 object not set, I can shoot it off to you and you can tell me what I'm doing wrong if that's ok... Thanks, -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 7:19 AM [GMT-8], Bryan Carbonnell wrote: : THe only way that I know of to have a current value and an OldValue : for a property is to create a separate class that holds the : Properties value and old value. : : SO for each property you wanted to hold the value and OldValue for : tou would need speateate classes. : : The sample has been sent off line. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> : Thanks Bryan, : : Please do send me that example so I can see what you mean.. :) : : I was placing all the property attributes of a CC into a class named : clsCustomerConcern and then just populate them at form load time : (unbound : form). so the load event would have the following ID's set : : CC.CCID = 1234 : CC.AssignedID = {Some Guid} : CC.Notes = "The customer wants some brochures" : : but then I'd like to also call an OldValue to each of these : properties, I : suppose it's just not possible right? I know I can do it all with a : disconnected ADO recordset where each field has an OldValue, but then : that's : not as fun as whacking my head on my desk ;o) : : : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com From my.lists at verizon.net Fri Mar 28 17:08:04 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 15:08:04 -0800 Subject: [dba-VB] Class Tips References: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> Message-ID: <006701c2f57e$e369c780$b615010a@FHTAPIA> :-$ hehehe learning new things certainly can make you humble, I restepped through your example and it seems I had some variables misnamed :D, half working... any idea on how to enable an IsDirty property of the CCID so that if I dim a variable Dim CC as cMain and I modify the data from 1 value to another for the IsDirty property to be se to true? Can't see how that would be done... -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 2:41 PM [GMT-8], Francisco H Tapia wrote: : I must not be doing something right, I keep getting an error and I : don't see why.. it's the error 91 object not set, I can shoot it off : to you and you can tell me what I'm doing wrong if that's ok... : : Thanks, : -Francisco : http://rcm.netfirms.com : : On Friday, March 28, 2003 7:19 AM [GMT-8], : Bryan Carbonnell wrote: : :: THe only way that I know of to have a current value and an OldValue :: for a property is to create a separate class that holds the :: Properties value and old value. :: :: SO for each property you wanted to hold the value and OldValue for :: tou would need speateate classes. :: :: The sample has been sent off line. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> :: Thanks Bryan, :: :: Please do send me that example so I can see what you mean.. :) :: :: I was placing all the property attributes of a CC into a class named :: clsCustomerConcern and then just populate them at form load time :: (unbound :: form). so the load event would have the following ID's set :: :: CC.CCID = 1234 :: CC.AssignedID = {Some Guid} :: CC.Notes = "The customer wants some brochures" :: :: but then I'd like to also call an OldValue to each of these :: properties, I :: suppose it's just not possible right? I know I can do it all with a :: disconnected ADO recordset where each field has an OldValue, but then :: that's :: not as fun as whacking my head on my desk ;o) :: :: :: :: _______________________________________________ :: 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 carbonnb at sympatico.ca Fri Mar 28 18:54:56 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 19:54:56 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> Message-ID: <3E84A890.29558.1406E7E@localhost> On 28 Mar 2003 at 14:41, Francisco H Tapia wrote: > I must not be doing something right, I keep getting an error and I > don't see why.. it's the error 91 object not set, I can shoot it off > to you and you can tell me what I'm doing wrong if that's ok... Sure. Send it to my home accout, carbonnb at sympatico.ca -- Bryan Carbonnell - carbonnb at sympatico.ca Change is inevitable; progress is optional. From carbonnb at sympatico.ca Fri Mar 28 19:07:49 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 20:07:49 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <006701c2f57e$e369c780$b615010a@FHTAPIA> Message-ID: <3E84AB95.12205.14C39C1@localhost> On 28 Mar 2003 at 15:08, Francisco H Tapia wrote: > :-$ hehehe learning new things certainly can make you humble, I > restepped through your example and it seems I had some variables > misnamed :D, half working... any idea on how to enable an IsDirty > property of the CCID so that if I dim a variable > > Dim CC as cMain > > and I modify the data from 1 value to another for the IsDirty property > to be se to true? Can't see how that would be done... Well, the first thing that pops into my head is to create a .Parent Property in the CCID class. The only problem with that is that you actually have to "tear down" the classes before you set them = nothing. To see how to do that, go to my site http://www3.sympatico.ca/carbonnb/bryan/xapp/listvbavars.html and download the COM Add-In and look at the source code for it to see how to implement a Parent Property. That being said, It just occurred to me while sticking my daughters in the bath, you can raise an event in the CCID class and in your main class handle the raised event. In you Main Class use Dim WithEvents mobjCCID as CCID In your CCID Class in the general Declarations section Public Event Change() Then in the Set Value Procedure, after you save the old value and set the new value, you would use RaiseEvents Change Now back to your main class, and handle the CCID_CHange event. In here is where you can set your IsDirty module level variable to true. Make sense? If not let me know and I'll "enhance" the demo I did this morning. -- Bryan Carbonnell - carbonnb at sympatico.ca Experience is a wonderful thing. It enables you to recognize a mistake when you make it again. From my.lists at verizon.net Sat Mar 1 21:30:17 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sat, 1 Mar 2003 19:30:17 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821D3@main2.marlow.com> Message-ID: <009c01c2e06c$0c074cd0$0eb62904@amd2k> ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 Sat Mar 1 22:09:00 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Sat, 1 Mar 2003 22:09:00 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DC@main2.marlow.com> Inet protocol? Do you mean the Winsock control? Just an FYI, there is a known memory leak issue with the Winsock control in VB 6. It occurs when you unload an instance of the control. (To prevent the leak, never 'unload' instances of the control, just reuse them. When you are done using them, unload the entire form....it's a nasty memory leak too.) Drew -----Original Message----- From: Francisco Tapia To: dba-vb at databaseadvisors.com Sent: 3/1/03 9:30 PM Subject: Re: [dba-VB] Closing an application ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 Jdemarco at hshhp.org Sun Mar 2 11:25:50 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Sun, 2 Mar 2003 12:25:50 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8528D@TTNEXCHSRV1.hshhp.com> Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). Jim DeMarco -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Saturday, March 01, 2003 11:09 PM To: 'dba-vb at databaseadvisors.com ' Subject: RE: [dba-VB] Closing an application Inet protocol? Do you mean the Winsock control? Just an FYI, there is a known memory leak issue with the Winsock control in VB 6. It occurs when you unload an instance of the control. (To prevent the leak, never 'unload' instances of the control, just reuse them. When you are done using them, unload the entire form....it's a nasty memory leak too.) Drew -----Original Message----- From: Francisco Tapia To: dba-vb at databaseadvisors.com Sent: 3/1/03 9:30 PM Subject: Re: [dba-VB] Closing an application ah ha!, so END is acceptable in a VB environment... and would kill any lingering processes in my called module then right... I'm using the inet protocol but for some reason it seems to hang every once in a while.... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Friday, February 28, 2003 5:15 PM Subject: RE: [dba-VB] Closing an application : Ditto. End is what you use to close a VB App. Sure, if you have one form, : and nothing loaded in the background, you can just unload the form (or give : the user the 'x') but End stops the execution of your VB .exe, thus : unloading everything. : : Drew : : -----Original Message----- : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : Sent: Friday, February 28, 2003 6:24 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : : I have heard this in the past - and I must admit to being guilty of : using End, but I've never really know the difference, other than End : exits your app no matter where it is, and unload requires you to call : each form individually. : : What makes End such a No-no? : : Greg : : : -----Original Message----- : From: dba-vb-admin at databaseadvisors.com : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : Manning : Sent: Friday, February 28, 2003 3:40 PM : To: dba-vb at databaseadvisors.com : Subject: RE: [dba-VB] Closing an application : : "Unload Me" hides the form and removes it from memory so you are : definitely : doing the right thing. As with Access, "END" is a no-no. : : Doris Manning : Database Administrator : Hargrove Inc. : www.hargroveinc.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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Sun Mar 2 19:51:01 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sun, 2 Mar 2003 17:51:01 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821DC@main2.marlow.com> Message-ID: <006501c2e127$5b154550$0eb62904@amd2k> hm, wininet.dll, I dim a control as Inet (or rather the original author did). I then "Unload ME" for the form.... The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user clicking a button, but does provide feedback to show what the heck it is doing... once done it launches the app and unloads itself, but it must be this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose this problem is still not fixed... as I mentioned i'm unloading the FORM, not the contorl and all I want to do is kill the app once it is done.. but of course I would not want it to harvest any memory from the OS once gone... it will currently run on win2K but eventually XP, and even ME... so I would like to take care of any potential memory leaks... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Saturday, March 01, 2003 8:09 PM Subject: RE: [dba-VB] Closing an application : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 my.lists at verizon.net Sun Mar 2 19:52:40 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Sun, 2 Mar 2003 17:52:40 -0800 Subject: [dba-VB] Closing an application References: <22F1CCD5171D17419CB37FEEE09D5F99D8528D@TTNEXCHSRV1.hshhp.com> Message-ID: <007b01c2e127$938227f0$0eb62904@amd2k> :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com : From Jdemarco at hshhp.org Mon Mar 3 06:56:08 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 07:56:08 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85296@TTNEXCHSRV1.hshhp.com> I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 08:34:04 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 08:34:04 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DE@main2.marlow.com> Isn't the Inet control for internet stuff? I don't think that is the same as the Winsock control, which is for the lower level TCP/IP communications. The leak with the Winsock control is documented in the knowledge base though, so maybe you should search there about the Inet control. Drew -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 7:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application hm, wininet.dll, I dim a control as Inet (or rather the original author did). I then "Unload ME" for the form.... The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user clicking a button, but does provide feedback to show what the heck it is doing... once done it launches the app and unloads itself, but it must be this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose this problem is still not fixed... as I mentioned i'm unloading the FORM, not the contorl and all I want to do is kill the app once it is done.. but of course I would not want it to harvest any memory from the OS once gone... it will currently run on win2K but eventually XP, and even ME... so I would like to take care of any potential memory leaks... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Drew Wutka" To: Sent: Saturday, March 01, 2003 8:09 PM Subject: RE: [dba-VB] Closing an application : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : _______________________________________________ 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 Mon Mar 3 08:36:21 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 08:36:21 -0600 Subject: [dba-VB] Closing an application Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821DF@main2.marlow.com> I use the API URLDownloadToFile. Works pretty well, but I don't know what versions it works on. Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 6:56 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Closing an application I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hshhp.org Mon Mar 3 08:43:41 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 09:43:41 -0500 Subject: [dba-VB] Closing an application Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8529F@TTNEXCHSRV1.hshhp.com> I used that or something just like it (it uses wininet.dll). I can't remember the problem but it either hosed windows or the app. I just know it was the NT version of the dll and it did not like being on Win98. Jim -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 9:36 AM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] Closing an application I use the API URLDownloadToFile. Works pretty well, but I don't know what versions it works on. Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 6:56 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Closing an application I know how you feel. I had a nice feature that automatically downloaded any updated files and had to change it to just notify the user that there were updates. Jim -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Sunday, March 02, 2003 8:53 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Closing an application :S there in lies the crutch. :(, back to the FTP control then :( not what I wanted to do... but oh well... -Francisco http://rcm.netfirms.com/ ----- Original Message ----- From: "Jim DeMarco" To: Sent: Sunday, March 02, 2003 9:25 AM Subject: RE: [dba-VB] Closing an application : Or do you mean wininet.dll? I had trouble with this one a while back but it was installed on a Win98 box (dev and install were created on NT 4.0 and the dll version was not backwards compatible). : : Jim DeMarco : : -----Original Message----- : From: Drew Wutka [mailto:DWUTKA at marlow.com] : Sent: Saturday, March 01, 2003 11:09 PM : To: 'dba-vb at databaseadvisors.com ' : Subject: RE: [dba-VB] Closing an application : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : known memory leak issue with the Winsock control in VB 6. It occurs when : you unload an instance of the control. (To prevent the leak, never 'unload' : instances of the control, just reuse them. When you are done using them, : unload the entire form....it's a nasty memory leak too.) : : Drew : : -----Original Message----- : From: Francisco Tapia : To: dba-vb at databaseadvisors.com : Sent: 3/1/03 9:30 PM : Subject: Re: [dba-VB] Closing an application : : ah ha!, so END is acceptable in a VB environment... and would kill any : lingering processes in my called module then right... I'm using the inet : protocol but for some reason it seems to hang every once in a while.... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Friday, February 28, 2003 5:15 PM : Subject: RE: [dba-VB] Closing an application : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : form, : : and nothing loaded in the background, you can just unload the form (or : give : : the user the 'x') but End stops the execution of your VB .exe, thus : : unloading everything. : : : : Drew : : : : -----Original Message----- : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : Sent: Friday, February 28, 2003 6:24 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : : : I have heard this in the past - and I must admit to being guilty of : : using End, but I've never really know the difference, other than End : : exits your app no matter where it is, and unload requires you to call : : each form individually. : : : : What makes End such a No-no? : : : : Greg : : : : : : -----Original Message----- : : From: dba-vb-admin at databaseadvisors.com : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : Manning : : Sent: Friday, February 28, 2003 3:40 PM : : To: dba-vb at databaseadvisors.com : : Subject: RE: [dba-VB] Closing an application : : : : "Unload Me" hides the form and removes it from memory so you are : : definitely : : doing the right thing. As with Access, "END" is a no-no. : : : : Doris Manning : : Database Administrator : : Hargrove Inc. : : www.hargroveinc.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 : : : : **************************************************************************** ******* : "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". : **************************************************************************** ******* : : _______________________________________________ : 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 **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 11:23:22 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 11:23:22 -0600 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821F2@main2.marlow.com> Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz From Jdemarco at hshhp.org Mon Mar 3 11:54:30 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 3 Mar 2003 12:54:30 -0500 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54AE5@TTNEXCHSRV1.hshhp.com> Drew Do you really need to write an app to register a DLL? You can add an item to the Windows Send To menu that's a shortcut to regsvr32.exe (right click a DLL, choose Send To | Register a DLL, or whatever you named the shortcut). Unless there's some functionality I'm missing here. Hadyn's request is actually timely as I've been working on a demo/tutorial/mini-training session for our developers to acclimate them to ASP via straight ASP, VB, and finally .NET. It will probably be complete by the end of the week (or early next week) and if anyone would like to see it I'd be glad to entertain off-line requests. Basically I wrote a few simple pages in ASP, duplicate them in VB and VB.NET just to show the method. It's really a simple tutorial that shows how to look up and display data, and do data entry via the web. Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 12:23 PM To: 'Hadyn Morgan' Cc: dba-vb at databaseadvisors.com Subject: [dba-VB] RE: Web Activex DLL's Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From DWUTKA at marlow.com Mon Mar 3 13:56:38 2003 From: DWUTKA at marlow.com (Drew Wutka) Date: Mon, 3 Mar 2003 13:56:38 -0600 Subject: [dba-VB] RE: Web Activex DLL's Message-ID: <2F8793082E00D4119A1700B0D0216BF801D821F5@main2.marlow.com> It only took a few minutes to write that .exe, so it wasn't exactly a 'huge' project. It boils down to requiring the same amount of work in the end. My co-worker just lives for using regsvr32.exe, and I just out of habit run my .exe. 6 here, half dozen there. ;) Drew -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Monday, March 03, 2003 11:55 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] RE: Web Activex DLL's Drew Do you really need to write an app to register a DLL? You can add an item to the Windows Send To menu that's a shortcut to regsvr32.exe (right click a DLL, choose Send To | Register a DLL, or whatever you named the shortcut). Unless there's some functionality I'm missing here. Hadyn's request is actually timely as I've been working on a demo/tutorial/mini-training session for our developers to acclimate them to ASP via straight ASP, VB, and finally .NET. It will probably be complete by the end of the week (or early next week) and if anyone would like to see it I'd be glad to entertain off-line requests. Basically I wrote a few simple pages in ASP, duplicate them in VB and VB.NET just to show the method. It's really a simple tutorial that shows how to look up and display data, and do data entry via the web. Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Monday, March 03, 2003 12:23 PM To: 'Hadyn Morgan' Cc: dba-vb at databaseadvisors.com Subject: [dba-VB] RE: Web Activex DLL's Hadyn, I am cross posting this to the VB list, because there's going to be some good info in here. First of all, to create a .dll in VB, you are using Class modules. I have an example here, which shows how to use Classes and Collections within Access 97 (I actually wrote the code in VB and copied it to Access). http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=216645 &page=&view=&sb=&o=&vc=1#Post216645 Let me know if you want specific code examples. I am just going to give some of the in's and out's with this email/post. First of all, when you create a .dll in VB, you'll need to 'register' it on your IIS server. Open VB, and create a new Advanced Project. (Should be the last type of project.). Leave the form as Form1, and add a commondialog control to the form. Then put this code into a module: Public Declare Function DLLSelfRegister Lib "vb6stkit.dll" (ByVal lpDllName As String) As Integer Sub Main() Form1.CommonDialog1.Filter = "Dynamic Link Libraries | *.dll" Form1.CommonDialog1.DialogTitle = "What Dynamic Link Library do you want to register?" Form1.CommonDialog1.ShowOpen Dim dwReturn As Long dwReturn = DLLSelfRegister(Form1.CommonDialog1.FileName) If dwReturn = 0 Then MsgBox ".dll has been registered", vbOKOnly + vbInformation, "Success" Else MsgBox "System Failed to register the .dll for the following reason:" & _ vbCrLf & vbCrLf & fGetMessage(dwReturn), vbOKOnly + vbExclamation, "Failure" End If End End Sub Save this module, and put this code in another module: Public Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (ByVal dwFlags As Long, lpSource As Any, ByVal dwMessageId As Long, ByVal dwLanguageId As Long, ByVal lpBuffer As String, ByVal nSize As Long, Arguments As Long) As Long Public Const FORMAT_MESSAGE_FROM_SYSTEM = &H1000 Function fGetMessage(msgNum As Long) As String Dim strTemp As String Dim i strTemp = Space(500) i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, "", msgNum, 0, strTemp, 500, 0) fGetMessage = Left(strTemp, InStr(1, strTemp, Chr(0), vbBinaryCompare) - 1) End Function Save your project, and compile the .exe. You know have a VERY simple way to register your ActiveX .dll's. Just run the .exe on your IIS server. A few things to note about registering your .dll's. First of all, the server will need the necessary runtimes. So you'll need to install some VB program at some point, for the .dll's to even work at the basic level. Also, you'll need addition runtimes for whatever your using. For instance, you'll need MDAC installed, if you are going to use ADO. (I have a few 'programs' that have 99% of the drivers I am ever going to use, and I just install one of them, then I can just use the register program above to 'register' my ActiveX .dlls. Next, when do you need to 're-register' your .dll's? If you Add a new class, you have to re-register the .dll. That is because the 'registration' process learns what objects are in your .dll to use, so if you add a new class, recompile, and copy it to your IIS server, your ASP programs will not pick up the new class (it will just give you an error). Running the registering program again fixes that. Also, this is a quirk I noticed, if you compile a .dll from one machine, and register it on the IIS server. Then compile the same .dll on a second machine, you will have to re-register the compiles from the second machine no matter what you change. It has to do with the GUID that is assigned to the .dll, when you compile it. I have never bothered to figure out more then that! When you actually want to use your .dll in ASP, you must use CreateObject, however, in ASP you must use the CreateObject method of the Server object. ie: Dim cnn Set cnn=server.createobject("ADODB.Connection") or for a personal .dll Dim myClass Set myClass=server.createobject("MyProject.MyClass") Finally, my last tip is to take the extra time to make all of your classes as true owners of what they represent. For example, in my 'example' project linked above, I have a 'lone' data class, which holds data on a particular 'object'. That class can be used to pull up the information by key, or it can be set to just hold the information, and it can also be used to save information (for a new object, or for modifying an existing object). Then I have a 'collection' class, that builds a collection of existing objects. By have the single object class designed to be 'self contained', even if I only ever use it in the collections class (which fills the data in for each new instance of the single class), the ability to pull up an item individually is still there, or to modify that object, etc. Abilities that make things easy as a project is expanded (as they tend to do.). Hope this helps some. Drew -----Original Message----- From: Hadyn Morgan [mailto:hadyn at dataconcepts.co.nz] Sent: Saturday, March 01, 2003 8:36 PM To: Drew Wutka Subject: Web Activex DLL's Hi Drew I thought I remembered you saying that you write your own DLL's for your web projects, so... I am just starting a new web project (online order/quote system) that has a number of complicated processes. I thought the best way to handle this would be through a DLL or two via ASP. I have not created DLL's before and wondered if you could give me a few tips/pointers on where to start :) I have VB 6 (VS) and IIS 5.1 installed. Kind regards Hadyn ___________________________________________ DATA CONCEPTS LTD Enhancing Your Information Management PO Box 1154, Hamilton 2001, New Zealand Tel +64 7 855 9308 Mob +64 21 124 4488 Email: hadyn at dataconcepts.co.nz Web: http://www.dataconcepts.co.nz _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From my.lists at verizon.net Mon Mar 3 15:23:24 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Mon, 3 Mar 2003 13:23:24 -0800 Subject: [dba-VB] Closing an application References: <2F8793082E00D4119A1700B0D0216BF801D821DE@main2.marlow.com> Message-ID: <000d01c2e1cb$20720830$b615010a@FHTAPIA> Just spoke to the author, he mentioned that there seems to be some bulky handling with this inet control, (on the MS side :S) anyways if you guys wanted to check out which source I meant here is the full link... http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=13413&ln gWId=1 The control is called "Microsoft Internet Transfer Control, Version 6.0 (SP4)" btw, I tried END... and it still does not help out... :( -Francisco http://rcm.netfirms.com ----- Original Message ----- From: "Drew Wutka" To: Sent: Monday, March 03, 2003 6:34 AM Subject: RE: [dba-VB] Closing an application : Isn't the Inet control for internet stuff? I don't think that is the same : as the Winsock control, which is for the lower level TCP/IP communications. : The leak with the Winsock control is documented in the knowledge base : though, so maybe you should search there about the Inet control. : : Drew : : -----Original Message----- : From: Francisco Tapia [mailto:my.lists at verizon.net] : Sent: Sunday, March 02, 2003 7:51 PM : To: dba-vb at databaseadvisors.com : Subject: Re: [dba-VB] Closing an application : : : hm, wininet.dll, I dim a control as Inet (or rather the original author : did). I then "Unload ME" for the form.... : The jist is... call the .exe, it AUTO-CHECKS w/o the need of the user : clicking a button, but does provide feedback to show what the heck it is : doing... once done it launches the app and unloads itself, but it must be : this "leak" that is causing problems.. I have VB6 SP5 applied, but I suppose : this problem is still not fixed... as I mentioned i'm unloading the FORM, : not the contorl and all I want to do is kill the app once it is done.. but : of course I would not want it to harvest any memory from the OS once gone... : it will currently run on win2K but eventually XP, and even ME... so I would : like to take care of any potential memory leaks... : : -Francisco : http://rcm.netfirms.com/ : ----- Original Message ----- : From: "Drew Wutka" : To: : Sent: Saturday, March 01, 2003 8:09 PM : Subject: RE: [dba-VB] Closing an application : : : : Inet protocol? Do you mean the Winsock control? Just an FYI, there is a : : known memory leak issue with the Winsock control in VB 6. It occurs when : : you unload an instance of the control. (To prevent the leak, never : 'unload' : : instances of the control, just reuse them. When you are done using them, : : unload the entire form....it's a nasty memory leak too.) : : : : Drew : : : : -----Original Message----- : : From: Francisco Tapia : : To: dba-vb at databaseadvisors.com : : Sent: 3/1/03 9:30 PM : : Subject: Re: [dba-VB] Closing an application : : : : ah ha!, so END is acceptable in a VB environment... and would kill any : : lingering processes in my called module then right... I'm using the inet : : protocol but for some reason it seems to hang every once in a while.... : : : : -Francisco : : http://rcm.netfirms.com/ : : ----- Original Message ----- : : From: "Drew Wutka" : : To: : : Sent: Friday, February 28, 2003 5:15 PM : : Subject: RE: [dba-VB] Closing an application : : : : : : : Ditto. End is what you use to close a VB App. Sure, if you have one : : form, : : : and nothing loaded in the background, you can just unload the form (or : : give : : : the user the 'x') but End stops the execution of your VB .exe, thus : : : unloading everything. : : : : : : Drew : : : : : : -----Original Message----- : : : From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net] : : : Sent: Friday, February 28, 2003 6:24 PM : : : To: dba-vb at databaseadvisors.com : : : Subject: RE: [dba-VB] Closing an application : : : : : : : : : I have heard this in the past - and I must admit to being guilty of : : : using End, but I've never really know the difference, other than End : : : exits your app no matter where it is, and unload requires you to call : : : each form individually. : : : : : : What makes End such a No-no? : : : : : : Greg : : : : : : : : : -----Original Message----- : : : From: dba-vb-admin at databaseadvisors.com : : : [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of Mike and Doris : : : Manning : : : Sent: Friday, February 28, 2003 3:40 PM : : : To: dba-vb at databaseadvisors.com : : : Subject: RE: [dba-VB] Closing an application : : : : : : "Unload Me" hides the form and removes it from memory so you are : : : definitely : : : doing the right thing. As with Access, "END" is a no-no. : : : : : : Doris Manning : : : Database Administrator : : : Hargrove Inc. : : : www.hargroveinc.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 : : : : : _______________________________________________ : 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 subs at solution-providers.ie Wed Mar 5 07:17:39 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Wed, 5 Mar 2003 13:17:39 -0000 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 References: Message-ID: <000701c2e319$992fcf10$356da8c0@IEW001> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, From subs at solution-providers.ie Wed Mar 5 07:18:51 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Wed, 5 Mar 2003 13:18:51 -0000 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: <001001c2e319$c4162b70$356da8c0@IEW001> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, Best Regards Mark L. Breen Solution Providers Ltd Ireland From Bryan_Carbonnell at cbc.ca Wed Mar 5 07:45:04 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Wed, 05 Mar 2003 08:45:04 -0500 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: I have been recently bitten by something like this. What VB does is store copies (well actually most of the binary data for a form) in the .frx file in the same directory as the .frm Once compiled into a DLL or exe, the icons are inside of the compiled file. So if you are creating a new form from a template, I would suspect that the template either doesn't have a corresponding frx, or it doesn't get copied over correctly to your project directory. Not really an answers or advice, but information that was new to me about a month ago so it may not be entirely accurate., but the jist should be right. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> subs at solution-providers.ie 05-Mar-03 8:17:39 AM >>> Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, From Jdemarco at hshhp.org Wed Mar 5 09:27:23 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 5 Mar 2003 10:27:23 -0500 Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8530B@TTNEXCHSRV1.hshhp.com> I usually ship the icons with the app. You could change their extensions if you don't want anyone to see them. I believe you can store them in a resource file as well. This way you don't have to ship the icons they become a part of the resource file. Haven't used this method even though I've considered it a time or two. HTH, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Mark L. Breen [mailto:subs at solution-providers.ie] Sent: Wednesday, March 05, 2003 8:19 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Icons on Buttons & form templates in VB 6 Hello All, I am curious as to what is considered best practice when using icons or pictures on buttons etc When an icon is created onto a button, it appears that the application retains a link to the icon, or to put it another way, it is passed by ref as opposed to by val. If this is the case, I will probably get an error when I roll out on a pc without the same paths as I have (which are the normal MS Office setups). So I wondered what others do. Do you move the.ico files to the app.path directory and then ship then with the exe? The reason I noticed the problem is when I created a form from a template. The template lost it's icons. I also got some other errors relating to class modules that were also referenced from the form, but I am not so worried about those as I know where they are. I am not so much asking one question here as wondering what you guys do with your .ico files and also what your experience has been with template forms. Thanks in advance for your time, Best Regards Mark L. Breen Solution Providers Ltd Ireland _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From R.Griffiths at bury.gov.uk Thu Mar 6 12:09:15 2003 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Thu, 6 Mar 2003 18:09:15 -0000 Subject: [dba-VB] Access and Crystal Reports Message-ID: <52339DF8DCA2A544AF660C8217EB7DCD0227F109@mailgate.bury.gov.uk> Hi using code how do you run a Crystal Report when the Access Db has 1) a password and/or 2) uses a system mdw Many thanks Richard -------------------------------------------------------------------------------------------------------------------- This e-mail, together with any files transmitted with it, is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited without liability on our part. If you have received this e-mail in error please notify the sender. From paul.hartland at fsmail.net Tue Mar 11 05:40:19 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Tue, 11 Mar 2003 11:40:19 +0000 Subject: [dba-VB] Opening Outlook from VB6 Message-ID: <20030311114019.VSDR3409.fep06-svc.ttys.com@localhost> To all, This may sound like a very stupid question, but I think I have gone totally brain dead, could someone please tell me the best way to open an external program, something like MS Outlook using Visual Basic 6 Thanks in advance Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From R.Griffiths at bury.gov.uk Tue Mar 11 05:51:02 2003 From: R.Griffiths at bury.gov.uk (Griffiths, Richard) Date: Tue, 11 Mar 2003 11:51:02 -0000 Subject: [dba-VB] Opening Outlook from VB6 Message-ID: <52339DF8DCA2A544AF660C8217EB7DCD0227F110@mailgate.bury.gov.uk> Shell? > -----Original Message----- > From: paul.hartland at fsmail.net [SMTP:paul.hartland at fsmail.net] > Sent: 11 March 2003 11:40 > To: accessd at databaseadvisors.com; dba-vb at databaseadvisors.com > Subject: [dba-VB] Opening Outlook from VB6 > > To all, > > This may sound like a very stupid question, but I think I have gone > totally brain dead, could someone please tell me the best way to open an > external program, something like MS Outlook using Visual Basic 6 > > Thanks in advance > > Paul Hartland > > __________________________________________________________________________ > Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for > your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month > after that. > > For more information visit http://www.freeserve.com/time/ or call free on > 0800 970 8890 > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > -------------------------------------------------------------------------------------------------------------------- This e-mail, together with any files transmitted with it, is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited without liability on our part. By responding to this e-mail it is accepted that your response may be the subject of recording/monitoring to ensure compliance with the Council?s ICT Security Policy If you have received this e-mail in error please notify the sender. From paul.hartland at fsmail.net Tue Mar 11 08:22:14 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Tue, 11 Mar 2003 14:22:14 +0000 Subject: [dba-VB] Opening Outlook if closed code not working Message-ID: <20030311142214.BYRO3194.fep12-svc.ttys.com@localhost> To all, Can anyone see why the following code (VB6) would open Outlook even if it is already open, I want a module that when I run my application, it checks to see if Outlook is open if not open it...... Function OpenOutlook() Dim objOut As Object On Error Resume Next Set objOut = GetObject("Outlook.Application") If (Err <> 0) Then Dim strOpenOutlook strOpenOutlook = Shell("D:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\OUTLOOK.EXE", vbMinimizedNoFocus) End If End Function Thanks in advance. Paul __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From ghazzard at aelfen.net Wed Mar 12 07:16:39 2003 From: ghazzard at aelfen.net (Gregory K. Hazzard) Date: Wed, 12 Mar 2003 07:16:39 -0600 Subject: [dba-VB] Opening Outlook if closed code not working In-Reply-To: <20030311142214.BYRO3194.fep12-svc.ttys.com@localhost> Message-ID: <00db01c2e899$9ecc1390$0200a8c0@greg> Having never done this, I'm guessing, but I'd say you need your comma. According to what I have read on this, since what you're really using is the second argument, you need to have the comma in the line, indicating that this is not the first argument. Here's the example I got from the MSDN: Set MyXL = Getobject( , "Excel.Application") Good luck. Greg -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Tuesday, March 11, 2003 8:22 AM To: accessd at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-VB] Opening Outlook if closed code not working To all, Can anyone see why the following code (VB6) would open Outlook even if it is already open, I want a module that when I run my application, it checks to see if Outlook is open if not open it...... Function OpenOutlook() Dim objOut As Object On Error Resume Next Set objOut = GetObject("Outlook.Application") If (Err <> 0) Then Dim strOpenOutlook strOpenOutlook = Shell("D:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\OUTLOOK.EXE", vbMinimizedNoFocus) End If End Function Thanks in advance. Paul ________________________________________________________________________ __ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From paul.hartland at fsmail.net Fri Mar 14 03:42:12 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 14 Mar 2003 9:42:12 +0000 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: <20030314094212.EMGX5263.fep04-svc.ttys.com@localhost> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From GRAY at utah.gov Fri Mar 14 08:56:29 2003 From: GRAY at utah.gov (Gary Ray) Date: Fri, 14 Mar 2003 07:56:29 -0700 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: This is some code I am using in an Active Reports designer that works for me. It is based on the code in Chapter 6 of the manual "Unbound Reporting and Grouping" Private Sub ActiveReport_DataInitialize() Set mRS = New ADODB.Recordset '---This report gets its recordset from a custom Activex control's property Set mRS = frmMain.ActiveControl.GetSummaryRS mRS.MoveFirst With Fields .Add "Category" .Add "Boundaries" .Add "Obs" .Add "Percent" End With End Sub Private Sub ActiveReport_FetchData(EOF As Boolean) 'If mRS.EOF = True Then Exit Sub If Not mRS.EOF Then '---Sets ActiveReports fields collection values to mRS values Fields("Category").Value = mRS!Category Fields("Boundaries").Value = mRS!Boundaries Fields("Obs").Value = mRS!Obs Fields("Percent").Value = mRS!Percent End If If Not mRS.EOF Then '---If not at the EOF then set FetchData's EOF value to false EOF = False '---Advance the RS mRS.MoveNext End If End Sub Gary Ray - Application Developer Workforce Information Systems R & D E-Mail gray at utah.gov >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From GRAY at utah.gov Fri Mar 14 09:26:49 2003 From: GRAY at utah.gov (Gary Ray) Date: Fri, 14 Mar 2003 08:26:49 -0700 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: Paul, One other thing. As you work in VB and ADO you will have to "unlearn" some Access stuff. One of those things may be the brackets in your SQL statements. I don't know if they are the problem, but they are not required. >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.hartland at fsmail.net Fri Mar 14 09:48:00 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 14 Mar 2003 15:48:00 +0000 Subject: [dba-VB] Active Reports for Visual Basic 6 Message-ID: <20030314154800.CVPA4985.fep08-svc.ttys.com@localhost> Thanks for the response but I forgot to post that I had solved it by simply changing .RecordSet to .Source i.e. Original line : repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" New Line : repPersonnelByOffice.dcRptData.Source = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" Then show the report to screen...... Thanks for all the other info anyway.......... Paul From: "Gary Ray" Date: Fri 14/Mar/2003 15:26 GMT To: Subject: Re: [dba-VB] Active Reports for Visual Basic 6 Paul, One other thing. As you work in VB and ADO you will have to "unlearn" some Access stuff. One of those things may be the brackets in your SQL statements. I don't know if they are the problem, but they are not required. >>> paul.hartland at fsmail.net 03/14/03 02:42AM >>> To all, Has anyone had any experience with Active Reports v2.0 for Visual Basic, if so I wondered if someone could help me with somthing (bearing in mind I only started using it yesterday). I have built a report using the ADO connector and I need it to buils the recordset on the fly. So I am trying to use the following method..... repPersonnelByOffice.dcRptData.Recordset = "SELECT * FROM [tblPersonnel] WHERE [FinishDate] Is Null ORDER BY [Office], [Surname]" But I get the error Type Mismatch and the whole line gets highlighted when I click debug. Now I can't see anything wrong with this, can anyone point out my mistakes please....... Thanks in advance. Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From jcolby at colbyconsulting.com Fri Mar 14 19:41:13 2003 From: jcolby at colbyconsulting.com (John W. Colby) Date: Fri, 14 Mar 2003 20:41:13 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com From accessd at shaw.ca Sat Mar 15 01:23:28 2003 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Fri, 14 Mar 2003 23:23:28 -0800 Subject: [dba-VB] VB.Net stuff In-Reply-To: Message-ID: Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jcolby at colbyconsulting.com Sat Mar 15 08:23:32 2003 From: jcolby at colbyconsulting.com (John W. Colby) Date: Sat, 15 Mar 2003 09:23:32 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: Message-ID: Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 6328 bytes Desc: not available URL: From JRojas at tnco-inc.com Mon Mar 17 12:22:58 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Mon, 17 Mar 2003 13:22:58 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <806536912C472E4A9D6515DF2E57261E0C5921@mercury.tnco-inc.com> John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From Jdemarco at hshhp.org Mon Mar 17 12:30:23 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Mon, 17 Mar 2003 13:30:23 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85490@TTNEXCHSRV1.hshhp.com> Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From jcolby at ColbyConsulting.com Mon Mar 17 14:35:54 2003 From: jcolby at ColbyConsulting.com (John W. Colby) Date: Mon, 17 Mar 2003 15:35:54 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99D85490@TTNEXCHSRV1.hshhp.com> Message-ID: Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 9352 bytes Desc: not available URL: From JRojas at tnco-inc.com Mon Mar 17 15:37:13 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Mon, 17 Mar 2003 16:37:13 -0500 Subject: [dba-VB] VB.Net stuff Message-ID: <806536912C472E4A9D6515DF2E57261E0C5922@mercury.tnco-inc.com> In Java you don't have to instantiate a class in order to use it's methods. Do you get this functionality in VB.Net? For example, the Character class in Java does not have to be instantiated in order to use it methods. Instead of this: Character myChar = new Character("a"); myChar.isDigit("a"); You could just do: Character.isDigit("a"); -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Monday, March 17, 2003 3:36 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From jcolby at ColbyConsulting.com Mon Mar 17 16:10:08 2003 From: jcolby at ColbyConsulting.com (John W. Colby) Date: Mon, 17 Mar 2003 17:10:08 -0500 Subject: [dba-VB] VB.Net stuff In-Reply-To: <806536912C472E4A9D6515DF2E57261E0C5922@mercury.tnco-inc.com> Message-ID: Yes, the method has to be declared static, and then it doesn't have to be instantiated. I'm stretching on this however since I am very new to this. However I have seen this mentioned in my book. So you can't just use any and all methods apparently, even with the framework classes. Some are static some aren't. It appears that some simply don't make sense to use without instantiation, for example if it's a variable class, and you are going to call the method that formats that variable to a string, it makes no sense unless the variable has some value. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Joe Rojas Sent: Monday, March 17, 2003 4:37 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff In Java you don't have to instantiate a class in order to use it's methods. Do you get this functionality in VB.Net? For example, the Character class in Java does not have to be instantiated in order to use it methods. Instead of this: Character myChar = new Character("a"); myChar.isDigit("a"); You could just do: Character.isDigit("a"); -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Monday, March 17, 2003 3:36 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Boy would I agree with THAT. It is much more of a pain to learn exactly because of the new inheritance stuff. But the key here is that the .net framework is a prewritten set of classes and class trees that expose a TON of functionality that is just waiting to be used. According to the "sales pitch" stuff the compilers are actually a thin layer over the .net framework. Only the truly language specific keywords are in the compiler. Everything else is a class. Even VARIABLES are classes, complete with methods and stuff. Weird! But once you start to understand it it all starts making sense and becomes extremely powerful. Because the variables are classes (strings, longs, singles etc) they are all expressed and used identically from language to language. No more page faults because you tried to pass the wrong thing to something originally written in C. C is using exactly the same class for a string as you are in VB as the next guy is in J etc. This really does free up the dev TEAM to use whatever they prefer rather than have it dictated to them by management. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Monday, March 17, 2003 1:30 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Great observation Joe and pretty true. That was my first take too (Java-like) although as powerful as .NET is it is more complicated than good ole VB6 (maybe complex is a better word for it). I consider VB 6 an easy to use and easy to learn language and development environment. I think M$ complicated it a bit especially where OOP is concerned. Yes, it has all the things a developer who uses object oriented techniques wants but I think it might make it a bit complicated for a newbie or junior developer. Not to say it's not a great tool. The IDE is great and it really is a powerful tool not to mention the server explorer and datasets/datatables as John mentioned. It just seems somewhat harder to learn than classic VB. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Monday, March 17, 2003 1:23 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net stuff John, Looking at the couple of coding examples that you have posted, both here and on the AccessD list, I keep getting this feeling that I am reading Java code. :-) A lot of the keywords, and their uses, look exactly the same as Java and I would assume that they work the same too. This sounds promising for the .Net platform because Java is very cool, IMO! Your excitement towards VB.Net reminds me of how I felt when I started learning Java. My ignorance of the whole .Net stuff made me skeptical about it, but it sounds like it is worth a look! I really enjoy your updates that you post as you learn VB.Net, I find them very useful! -Joe -----Original Message----- From: John W. Colby [mailto:jcolby at colbyconsulting.com] Sent: Saturday, March 15, 2003 9:24 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Jim, I am reading Programming Visual Basic .Net by Francesco Balena - ISBN 0-7356-1375-3. Given that it is the only book on the subject I have I can't compare it to anything but it has done a good job of explaining the basics so far. It does assume that you are a VB6 programmer (which I am not) and know that pretty well, so if you have no VB experience it might be an even steeper learning curve. OTOH, so much has changed from VB (apparently) that I am not even sure how important it is to know that stuff. Apparently the dev environment is completely different, the language now has true implementation inheritance (inherits the functionality and interface instead of just the interface) and is really just a thin layer over the .Net framework of a few thousand classes and interfaces. Implements is a keyword that tells the compiler that you are implementing an interface. Interfaces are still useful in cases where the actual implementation is so specific to what you are doing that trying to inherit code wouldn't be helpful, yet you still want to define a standard interface so everyone does things the same way. IEnumerable is an interface for enumeration, which of course is the process of enumerating a set of objects, handing back one object every time you are called. The hard disk makes a good example, the class initializes, starts to read the dir structure and file names. Each time the class is called, it finds the next directory / file and hands back some property or property (a string in this case with the name of the file). The class keeps track of where it is in the disk structure so that the next time it is called it knows where to go (into subdirectories for example) to get the next file property. .Net the framework is a truly awesome collection of classes that wrap the entire windows API, as well as classes which build up other useful functionality. There are collection classes, which are subclassed to make stacks and queues. Need a stack? It's in there. Need a stack that does something special? Inherit it and implement your own custom functionality. There are classes for encryption, literally perhaps 50 lines of code to open a file (a class), feed the text stream to the encryption class, feed the encryption stream to a class that transmits the stream out over the internet. Let's not pretend that I have any idea how to do this yet, but I know that these classes exist. and with true inheritance, tweaking existing stuff to do what you need has to be a bajillion times faster that writing it yourself from the ground up. Of course you have to learn the namespaces and where all this stuff is, as well as how to use the individual classes once you know where they are. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Saturday, March 15, 2003 2:23 AM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net stuff Hi John: Looks like awesome stuff. I have been wandering around the side of the .net pool for a while and will eventually have to jump in...but learning this coding will be like climbing 3000 vertical feet with two pack-sacks on. What is a 'Implements IEnumerable' anyway? Modules? Classes and internal sub-classes with functions and subroutines floating around? This looks like something that will take more than an evening to master. 8-/ I bet there is no books that will read 'Master .Net in 24 hours'. Nothing like a good challenge...:-) Any recommendations for a good book to start? Jim -----Original Message----- From: dba-vb-admin at databaseadvisors.com [mailto:dba-vb-admin at databaseadvisors.com]On Behalf Of John W. Colby Sent: Friday, March 14, 2003 5:41 PM To: AccessD Cc: VbAdmin; VBA Subject: [dba-VB] VB.Net stuff I thought you folks might be interested in looking at some of the features that .net exposes. The following is a class directly from "Programming VB.net" by Francesco Balena. It is fascinating (to me anyway) as it clearly displays the usage of a whole slew of functionality built in to the .net environment. It was really an exercise in demonstrating the ability to add enumerators to any class (where appropriate) so that people using your class could use "for each" constructs with your classes. This class iterates a disk path and returns the file name of each file or directory in turn. Please let's not get in to a "it could have been so much simpler". I have no idea whether that is true, and really don't much care. In fact I don't even understand all that is happening here! I am simply showing the code so that anyone who is interested can see how the author uses built in classes such as IEnumerator, and the built in stack class of the Systems.Collection namespace. Seriously cool built in functionality ready to be built upon. I built a wrapper function: Module Module1 Function TestGetEnumerator(ByVal strRoot As String) As String Dim f As System.IO.FileInfo Dim str As String 'enumerate all files in strRoot directory tree For Each f In New FileTree(strRoot) str = str & f.FullName & vbCrLf Next TestGetEnumerator = str End Function End Module Which I then used in the OnOpen event of a form to return a string of all the files and directories in a given path (hard coded), which I then place into a text box on a form. What I want to do is have the function be the datasource for a combo or list but I couldn't figure that out and needed to move on. ;-) The result is an EXE which I could mail to you which opens the form and displays the file names. Of course I can just as easily use the file name to do some processing on that file, likewise the class could be modified to return any of the file attributes - size, created date etc. The EXE is ~10k but of course requires that you have the .net environment on your computer. Anyone that uses the Windows Update feature to keep their system up to date with all of the latest patches has probably been offered the ability to download and install the .net environment needed to run my 10k exe. Anyway, the class is as follows - all copyrights belong to their owners, not me. Public Class FileTree Implements IEnumerable 'The search Path Public ReadOnly DirPath As String 'The constructor Sub New(ByVal DirPath As String) Me.DirPath = DirPath End Sub 'Return an enumeraable object(an instance of the inner class) Function GetEnumerator() As IEnumerator _ Implements IEnumerable.GetEnumerator Return New FileTreeEnumerator(DirPath) End Function 'The IEnumerator private object Class FileTreeEnumerator Implements IEnumerator Dim DirPath As String 'This variable contains the Enumerator object for the file list 'in the dir being scanned Dim FileEnumerator As IEnumerator 'This variable contains the stack of the Enumerator objects 'for subdirs of all pending directories Dim DirEnumerators As New System.Collections.Stack() 'a simple constructor Sub New(ByVal DirPath As String) 'Save the dir path Me.DirPath = DirPath 'manually call the reset method Reset() End Sub Sub Reset() Implements IEnumerator.Reset 'The dir object that represents the root object Dim di As New System.IO.DirectoryInfo(DirPath) 'get the Enumerator object for the file list, and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'get the enumerator object for the subdirectory list Dim dirEnum As IEnumerator = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) End Sub Function MoveNext() As Boolean Implements IEnumerator.MoveNext 'simply delegate to the file enumerator object If FileEnumerator.MoveNext Then 'it returned true so we can exit Return True End If 'if there are no files in the current directory, check 'for another subdirectory in the cuurrent directory Dim dirEnum As IEnumerator = _ CType(DirEnumerators.Peek, IEnumerator) 'check whether current subdirectory enumerator has more items Do Until dirEnum.MoveNext 'There are no more subdirectories on this level 'so we must pop another element of the stack DirEnumerators.Pop() If DirEnumerators.Count = 0 Then 'return false if no more subdirectories to scan Return False End If 'get the current enumerator dirEnum = CType(DirEnumerators.Peek, IEnumerator) Loop 'We can create a DirectoryInfo. Dim di As System.IO.DirectoryInfo = _ CType(dirEnum.Current, System.IO.DirectoryInfo) 'Store the file enumerator and reset it FileEnumerator = di.GetFiles.GetEnumerator FileEnumerator.Reset() 'Get the enumerator for the subdir list 'and reset it dirEnum = di.GetDirectories.GetEnumerator dirEnum.Reset() 'push it onto the stack DirEnumerators.Push(dirEnum) 'recursive call to process the file enumerator Return Me.MoveNext End Function 'The current property simply delegates to FileEnumerator.Current ReadOnly Property Current() As Object Implements IEnumerator.Current Get Return FileEnumerator.Current End Get End Property End Class End Class John W. Colby Colby Consulting www.ColbyConsulting.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.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 ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------- Is email taking over your day? Manage your time with eMailBoss. Try it free! http://www.eMailBoss.com -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 10792 bytes Desc: not available URL: From paul.hartland at fsmail.net Thu Mar 20 05:31:52 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 20 Mar 2003 11:31:52 +0000 Subject: [dba-VB] Move from Windows NT to XP Message-ID: <20030320113152.GJNK3144.fep08-svc.ttys.com@localhost> To all, I have a VB6 FE connected to a SQL Server 7.0 BE, on the employee records when someone changes a payroll number myself and the HR Department would receive an email stating the changes. Under Windows NT the email got sent automatically without a problem, BUT we have just gone to Windows XP and before it sends an email the following happens : 1. The user gets asked for his/her Outlook profile name. 2. The user receive's a message saying a program is automatically trying to send an email, and asks for confirmation that Outlook should send the email.... Has anyone else come across this ?. If so, is there anyway around this problem as sometimes it will ask me to confirm the email to each individual recipient (sometimes upto 15 people), and this can be very irritating.... Thanks for any help in advance...... Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?14.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From paul.hartland at fsmail.net Fri Mar 21 04:37:35 2003 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 21 Mar 2003 10:37:35 +0000 Subject: [dba-VB] OT - XP Taskbar Help Required Message-ID: <20030321103735.ZHY5916.fep10-svc.ttys.com@localhost> To all, We have recently (2 days ago) upgraded to XP (not a very big fan at all), and there is one thing thats absolutely driving me mad. I have an Access Application and as usual when you run it, a button appears in the taskbar.....BUT, when you select an option from the switchboard opening another form another button appears and so on. Is there any way to stop XP creating a button for each form you have open.... Thanks in advance. Yours going absolutely raving mental...... Paul __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for your first 3 months, that's HALF PRICE! And then it's just ?13.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 From martyconnelly at shaw.ca Sat Mar 22 18:11:26 2003 From: martyconnelly at shaw.ca (MartyConnelly) Date: Sat, 22 Mar 2003 16:11:26 -0800 Subject: [dba-VB] OT - XP Taskbar Help Required References: <20030321103735.ZHY5916.fep10-svc.ttys.com@localhost> Message-ID: <3E7CFBAE.1010505@shaw.ca> The way to turn off this annoying (added) feature they started with Access 2000, go to Tools | Options | View tab | Uncheck "Windows in Taskbar". You could do this by adding the following line into your "startup forms" (i.e. main menu, switchboard, etc.)'s OnLoad event: Call Application.SetOption("ShowWindowsInTaskbar", False) Or you could right click the taskbar and place them in a stack as happens with IE paul.hartland at fsmail.net wrote: >To all, > >We have recently (2 days ago) upgraded to XP (not a very big fan at all), and there is one thing thats absolutely driving me mad. I have an Access Application and as usual when you run it, a button appears in the taskbar.....BUT, when you select an option from the switchboard opening another form another button appears and so on. Is there any way to stop XP creating a button for each form you have open.... > >Thanks in advance. > >Yours going absolutely raving mental...... > >Paul > >__________________________________________________________________________ >Freeserve AnyTime - Go online whenever you want for just ?6.99 a month for >your first 3 months, that's HALF PRICE! And then it's just ?13.99 a month >after that. > >For more information visit http://www.freeserve.com/time/ or call free on >0800 970 8890 > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > > From info at oop.nl Sat Mar 22 18:14:59 2003 From: info at oop.nl (Oop! Software & Computers) Date: Sun, 23 Mar 2003 01:14:59 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303230114.AA02024@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From Jdemarco at hshhp.org Wed Mar 26 13:31:14 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 14:31:14 -0500 Subject: [dba-VB] MSDE and replication Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8567F@TTNEXCHSRV1.hshhp.com> Cross posted: AccessD & dba-VB Does anyone know if I can replicate a MSDE BE when using VB as FE or is it limited to Access ADPs? Thanks, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From info at oop.nl Wed Mar 26 13:34:03 2003 From: info at oop.nl (Oop! Software & Computers) Date: Wed, 26 Mar 2003 20:34:03 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303262034.AA01980@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From Jdemarco at hshhp.org Wed Mar 26 14:02:48 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 15:02:48 -0500 Subject: [dba-VB] OT: oh no (list moderators please) Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> Cross posted: accessd, dba-VB Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! Jim DeMarco *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From info at oop.nl Wed Mar 26 14:05:34 2003 From: info at oop.nl (Oop! Software & Computers) Date: Wed, 26 Mar 2003 21:05:34 +0100 Subject: [dba-VB] email ontvangst bevestiging Message-ID: <10303262105.AA01792@oop.nl> email ontvangst bevestiging Uw email is correct ontvangen, en zal zo spoedig mogelijk verwerkt worden. Voor support vragen kunt u mailen naar support at oop.nl Met vriendelijke groet Oop! software & Computers www.oop.nl From sgsax at ksu.edu Wed Mar 26 15:38:35 2003 From: sgsax at ksu.edu (Seth Galitzer) Date: 26 Mar 2003 15:38:35 -0600 Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> References: <22F1CCD5171D17419CB37FEEE09D5F99D85683@TTNEXCHSRV1.hshhp.com> Message-ID: <1048714716.7326.42.camel@sgsax-th4022c> It's been taken care of. Seth On Wed, 2003-03-26 at 14:02, Jim DeMarco wrote: > Cross posted: accessd, dba-VB > > Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! > > Jim DeMarco -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From Jdemarco at hshhp.org Wed Mar 26 16:04:51 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Wed, 26 Mar 2003 17:04:51 -0500 Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99D8568E@TTNEXCHSRV1.hshhp.com> Thanks, Jim -----Original Message----- From: Seth Galitzer [mailto:sgsax at ksu.edu] Sent: Wednesday, March 26, 2003 4:39 PM To: accessd Cc: AccessD (E-mail); VB List (E-mail) Subject: [dba-VB] Re: [AccessD] OT: oh no (list moderators please) It's been taken care of. Seth On Wed, 2003-03-26 at 14:02, Jim DeMarco wrote: > Cross posted: accessd, dba-VB > > Now I'm getting the dreaded "email ontvangst bevestiging" message from the VB list!! > > Jim DeMarco -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Fri Mar 28 02:29:56 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Fri, 28 Mar 2003 00:29:56 -0800 Subject: [dba-VB] Class Tips Message-ID: <00ab01c2f504$3d5685b0$0eb62904@amd2k> So beyond adding a property.. how would you do this: I have a class and want to give each property some additional methods such as the Oldvalue property, am I thinking this right? or will I need to build it another way for example, todo the following my class has this: CC.CCID = 1234 Private mvarCCID As Long Public Property Let CCID(ByVal vData As Long) mvarCCID = vData End Property I should be able to figure out how to do this but I have not found any good tutorials on the web Debug.print CC.CCID.OldValue How would I do the above? Thanks, -Francisco From carbonnb at sympatico.ca Fri Mar 28 04:50:48 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 05:50:48 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <00ab01c2f504$3d5685b0$0eb62904@amd2k> Message-ID: <3E83E2B8.4828.24492D@localhost> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. From Bryan_Carbonnell at cbc.ca Fri Mar 28 08:11:23 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 09:11:23 -0500 Subject: [dba-VB] Class Tips Message-ID: I did a quick and dirty demo of what I was talking about on the way in to work this morning. Let me know if you would like me to send it to you. It's a whole 3K zipped. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hshhp.org Fri Mar 28 08:24:12 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Fri, 28 Mar 2003 09:24:12 -0500 Subject: [dba-VB] Class Tips Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54F56@TTNEXCHSRV1.hshhp.com> Basically you faked inheritance in VB6 right? If you ever get a chance to check it out one of the neat improvements in VB.NET is better inheritance implentation. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Bryan Carbonnell [mailto:Bryan_Carbonnell at cbc.ca] Sent: Friday, March 28, 2003 9:11 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Class Tips I did a quick and dirty demo of what I was talking about on the way in to work this morning. Let me know if you would like me to send it to you. It's a whole 3K zipped. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> On 28 Mar 2003 at 0:29, Francisco Tapia wrote: > I have a class and want to give each property some additional methods > such as the Oldvalue property, am I thinking this right? or will I > need to build it another way for example, todo the following my class > has this: > > CC.CCID = 1234 > Private mvarCCID As Long > Public Property Let CCID(ByVal vData As Long) > mvarCCID = vData > End Property > > I should be able to figure out how to do this but I have not found any > good tutorials on the web Debug.print CC.CCID.OldValue > > How would I do the above? I think you will need to create a CCID class with a Value and OldValue properties. Then in your CC Class, CCID would return the pointer to your new CCID class and if you have set Value as the Default property, you should still be able to just use Debug.Print CC.CCID to get the value of CCID. -- Bryan Carbonnell - carbonnb at sympatico.ca Earth is the insane asylum for the universe. _______________________________________________ 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 *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From Bryan_Carbonnell at cbc.ca Fri Mar 28 08:29:47 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 09:29:47 -0500 Subject: [dba-VB] Class Tips Message-ID: I don't know, 'cause I'm not sure I know what inheritance is. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> Jdemarco at hshhp.org 28-Mar-03 9:24:12 AM >>> Basically you faked inheritance in VB6 right? If you ever get a chance to check it out one of the neat improvements in VB.NET is better inheritance implentation. Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan From my.lists at verizon.net Fri Mar 28 09:11:28 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Fri, 28 Mar 2003 07:11:28 -0800 Subject: [dba-VB] Class Tips References: Message-ID: <003301c2f53c$4ed4ffa0$0eb62904@amd2k> Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) -Francisco http://rcm.netfirms.com/ On Friday, March 28, 2003 6:11 AM [GMT -8], Bryan Carbonnell wrote: : I did a quick and dirty demo of what I was talking about on the way : in to work this morning. : : Let me know if you would like me to send it to you. It's a whole 3K : zipped. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> : On 28 Mar 2003 at 0:29, Francisco Tapia wrote: : :: I have a class and want to give each property some additional methods :: such as the Oldvalue property, am I thinking this right? or will I :: need to build it another way for example, todo the following my class :: has this: :: :: CC.CCID = 1234 :: Private mvarCCID As Long :: Public Property Let CCID(ByVal vData As Long) :: mvarCCID = vData :: End Property :: :: I should be able to figure out how to do this but I have not found :: any :: good tutorials on the web Debug.print CC.CCID.OldValue :: :: How would I do the above? : : : I think you will need to create a CCID class with a Value and : OldValue properties. : : Then in your CC Class, CCID would return the pointer to your new : CCID class and if you have set Value as the Default property, you : should still be able to just use Debug.Print CC.CCID to get the : value of CCID. From Bryan_Carbonnell at cbc.ca Fri Mar 28 09:19:08 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 10:19:08 -0500 Subject: [dba-VB] Class Tips Message-ID: THe only way that I know of to have a current value and an OldValue for a property is to create a separate class that holds the Properties value and old value. SO for each property you wanted to hold the value and OldValue for tou would need speateate classes. The sample has been sent off line. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) From Jdemarco at hshhp.org Fri Mar 28 11:44:26 2003 From: Jdemarco at hshhp.org (Jim DeMarco) Date: Fri, 28 Mar 2003 12:44:26 -0500 Subject: [dba-VB] Class Tips Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99E54F5F@TTNEXCHSRV1.hshhp.com> There's another method that involves using the PropertyBag property. If you set the class Persistable property to: 1 - Persistable you can save and retrieve the values. Here's a link I found on codehound.com. http://www.vbwm.com/art_1999/whatsnew/persist.asp HTH, Jim DeMarco -----Original Message----- From: Francisco Tapia [mailto:my.lists at verizon.net] Sent: Friday, March 28, 2003 10:11 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Class Tips Thanks Bryan, Please do send me that example so I can see what you mean.. :) I was placing all the property attributes of a CC into a class named clsCustomerConcern and then just populate them at form load time (unbound form). so the load event would have the following ID's set CC.CCID = 1234 CC.AssignedID = {Some Guid} CC.Notes = "The customer wants some brochures" but then I'd like to also call an OldValue to each of these properties, I suppose it's just not possible right? I know I can do it all with a disconnected ADO recordset where each field has an OldValue, but then that's not as fun as whacking my head on my desk ;o) -Francisco http://rcm.netfirms.com/ On Friday, March 28, 2003 6:11 AM [GMT -8], Bryan Carbonnell wrote: : I did a quick and dirty demo of what I was talking about on the way : in to work this morning. : : Let me know if you would like me to send it to you. It's a whole 3K : zipped. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> : On 28 Mar 2003 at 0:29, Francisco Tapia wrote: : :: I have a class and want to give each property some additional methods :: such as the Oldvalue property, am I thinking this right? or will I :: need to build it another way for example, todo the following my class :: has this: :: :: CC.CCID = 1234 :: Private mvarCCID As Long :: Public Property Let CCID(ByVal vData As Long) :: mvarCCID = vData :: End Property :: :: I should be able to figure out how to do this but I have not found :: any :: good tutorials on the web Debug.print CC.CCID.OldValue :: :: How would I do the above? : : : I think you will need to create a CCID class with a Value and : OldValue properties. : : Then in your CC Class, CCID would return the pointer to your new : CCID class and if you have set Value as the Default property, you : should still be able to just use Debug.Print CC.CCID to get the : value of CCID. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from HealthSource/Hudson Health Plan (HS/HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HS/HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From my.lists at verizon.net Fri Mar 28 12:04:49 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 10:04:49 -0800 Subject: [dba-VB] Class Tips References: <657FB70438B7D311AF320090279C180103C5E4B3@EXCHMAIL> Message-ID: <002101c2f554$8683fc90$b615010a@FHTAPIA> Thanks Bryan, I'm thinking I can set this class (CCID) as a generic variant variable type to be able to reuse. Any reason that may be a problematic? -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 7:16 AM [GMT-8], Bryan Carbonnell wrote: : Here you go. My MainClass is equivalent to your clsCustomerConcern I : think. : : Ask if anything isn't clear. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> : Thanks Bryan, : : Please do send me that example so I can see what you mean.. :) : : I was placing all the property attributes of a CC into a class named : clsCustomerConcern and then just populate them at form load time : (unbound : form). so the load event would have the following ID's set : : CC.CCID = 1234 : CC.AssignedID = {Some Guid} : CC.Notes = "The customer wants some brochures" : : but then I'd like to also call an OldValue to each of these : properties, I : suppose it's just not possible right? I know I can do it all with a : disconnected ADO recordset where each field has an OldValue, but then : that's : not as fun as whacking my head on my desk ;o) : : : -Francisco : http://rcm.netfirms.com/ : : On Friday, March 28, 2003 6:11 AM [GMT -8], : Bryan Carbonnell wrote: : :: I did a quick and dirty demo of what I was talking about on the way :: in to work this morning. :: :: Let me know if you would like me to send it to you. It's a whole 3K :: zipped. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> :: On 28 Mar 2003 at 0:29, Francisco Tapia wrote: :: ::: I have a class and want to give each property some additional ::: methods such as the Oldvalue property, am I thinking this right? or ::: will I need to build it another way for example, todo the following ::: my class has this: ::: ::: CC.CCID = 1234 ::: Private mvarCCID As Long ::: Public Property Let CCID(ByVal vData As Long) ::: mvarCCID = vData ::: End Property ::: ::: I should be able to figure out how to do this but I have not found ::: any ::: good tutorials on the web Debug.print CC.CCID.OldValue ::: ::: How would I do the above? :: :: :: I think you will need to create a CCID class with a Value and :: OldValue properties. :: :: Then in your CC Class, CCID would return the pointer to your new :: CCID class and if you have set Value as the Default property, you :: should still be able to just use Debug.Print CC.CCID to get the :: value of CCID. : : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com From Bryan_Carbonnell at cbc.ca Fri Mar 28 12:09:51 2003 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 13:09:51 -0500 Subject: [dba-VB] Class Tips Message-ID: None that I can see or think of off the top of my head. I say, go for it. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> my.lists at verizon.net 28-Mar-03 1:04:49 PM >>> Thanks Bryan, I'm thinking I can set this class (CCID) as a generic variant variable type to be able to reuse. Any reason that may be a problematic? -Francisco http://rcm.netfirms.com From my.lists at verizon.net Fri Mar 28 12:25:53 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 10:25:53 -0800 Subject: [dba-VB] Class Tips References: <657FB70438B7D311AF320090279C180103C5E4B3@EXCHMAIL> <002101c2f554$8683fc90$b615010a@FHTAPIA> Message-ID: <002f01c2f557$77c03400$b615010a@FHTAPIA> nevermind, I see why that's a problem... hmm I have a IsDirty property but once you dimension the properties as CCID or their respecitve class you can't use the let or set in the main class anymore, So it seems that I'm stuck w/o a dirty property. I'm sorry for the newbie q's if you can point me to some literature I'm more than happy to search, but I seem to not be keying in the right keywords to return these type of examples... Thanks, -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 10:04 AM [GMT-8], Francisco H Tapia wrote: : Thanks Bryan, : I'm thinking I can set this class (CCID) as a generic variant : variable type to be able to reuse. Any reason that may be a : problematic? : : -Francisco : http://rcm.netfirms.com : : On Friday, March 28, 2003 7:16 AM [GMT-8], : Bryan Carbonnell wrote: : :: Here you go. My MainClass is equivalent to your clsCustomerConcern I :: think. :: :: Ask if anything isn't clear. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> :: Thanks Bryan, :: :: Please do send me that example so I can see what you mean.. :) :: :: I was placing all the property attributes of a CC into a class named :: clsCustomerConcern and then just populate them at form load time :: (unbound :: form). so the load event would have the following ID's set :: :: CC.CCID = 1234 :: CC.AssignedID = {Some Guid} :: CC.Notes = "The customer wants some brochures" :: :: but then I'd like to also call an OldValue to each of these :: properties, I :: suppose it's just not possible right? I know I can do it all with a :: disconnected ADO recordset where each field has an OldValue, but then :: that's :: not as fun as whacking my head on my desk ;o) :: :: :: -Francisco :: http://rcm.netfirms.com/ :: :: On Friday, March 28, 2003 6:11 AM [GMT -8], :: Bryan Carbonnell wrote: :: ::: I did a quick and dirty demo of what I was talking about on the way ::: in to work this morning. ::: ::: Let me know if you would like me to send it to you. It's a whole 3K ::: zipped. ::: ::: Bryan Carbonnell ::: bryan_carbonnell at cbc.ca ::: :::::: carbonnb at sympatico.ca 28-Mar-03 5:50:48 AM >>> ::: On 28 Mar 2003 at 0:29, Francisco Tapia wrote: ::: :::: I have a class and want to give each property some additional :::: methods such as the Oldvalue property, am I thinking this right? or :::: will I need to build it another way for example, todo the following :::: my class has this: :::: :::: CC.CCID = 1234 :::: Private mvarCCID As Long :::: Public Property Let CCID(ByVal vData As Long) :::: mvarCCID = vData :::: End Property :::: :::: I should be able to figure out how to do this but I have not found :::: any :::: good tutorials on the web Debug.print CC.CCID.OldValue :::: :::: How would I do the above? ::: ::: ::: I think you will need to create a CCID class with a Value and ::: OldValue properties. ::: ::: Then in your CC Class, CCID would return the pointer to your new ::: CCID class and if you have set Value as the Default property, you ::: should still be able to just use Debug.Print CC.CCID to get the ::: value of CCID. :: :: :: _______________________________________________ :: 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 subs at solution-providers.ie Fri Mar 28 13:29:43 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Fri, 28 Mar 2003 19:29:43 -0000 Subject: [dba-VB] Serial Communications - Cross Posted VB and Access Message-ID: <007301c2f560$6315bdf0$219f7dc2@D8TZHN0J> Hello All, I have to receive serial communications from a scanner and compare it to the data that was just printed. I have downloaded a few different bits of software from www.planet-source-code.com that all work to a lesser or greater extent. Basically, at this stage I can receive data from the serial port. However, the client is happy to purchase an OCX or some other such tools to enhance the reliability of this project. There are a few utilities out there for between Euro 100 and Euro 500. The purpose of this email is to ask you guys have you used any such tools or utilities and if so, would you care to pass on the details? To state my question again, I can listen to the serial port now, but I just wondered was there some brialliant piece of software that I simply should not ignore. As usual, thanks in advance for your time and attention, Mark Breen Solution Providers Ireland -------------- next part -------------- An HTML attachment was scrubbed... URL: From my.lists at verizon.net Fri Mar 28 16:41:01 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 14:41:01 -0800 Subject: [dba-VB] Class Tips References: Message-ID: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> I must not be doing something right, I keep getting an error and I don't see why.. it's the error 91 object not set, I can shoot it off to you and you can tell me what I'm doing wrong if that's ok... Thanks, -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 7:19 AM [GMT-8], Bryan Carbonnell wrote: : THe only way that I know of to have a current value and an OldValue : for a property is to create a separate class that holds the : Properties value and old value. : : SO for each property you wanted to hold the value and OldValue for : tou would need speateate classes. : : The sample has been sent off line. : : Bryan Carbonnell : bryan_carbonnell at cbc.ca : :::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> : Thanks Bryan, : : Please do send me that example so I can see what you mean.. :) : : I was placing all the property attributes of a CC into a class named : clsCustomerConcern and then just populate them at form load time : (unbound : form). so the load event would have the following ID's set : : CC.CCID = 1234 : CC.AssignedID = {Some Guid} : CC.Notes = "The customer wants some brochures" : : but then I'd like to also call an OldValue to each of these : properties, I : suppose it's just not possible right? I know I can do it all with a : disconnected ADO recordset where each field has an OldValue, but then : that's : not as fun as whacking my head on my desk ;o) : : : : _______________________________________________ : dba-VB mailing list : dba-VB at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-vb : http://www.databaseadvisors.com From my.lists at verizon.net Fri Mar 28 17:08:04 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 28 Mar 2003 15:08:04 -0800 Subject: [dba-VB] Class Tips References: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> Message-ID: <006701c2f57e$e369c780$b615010a@FHTAPIA> :-$ hehehe learning new things certainly can make you humble, I restepped through your example and it seems I had some variables misnamed :D, half working... any idea on how to enable an IsDirty property of the CCID so that if I dim a variable Dim CC as cMain and I modify the data from 1 value to another for the IsDirty property to be se to true? Can't see how that would be done... -Francisco http://rcm.netfirms.com On Friday, March 28, 2003 2:41 PM [GMT-8], Francisco H Tapia wrote: : I must not be doing something right, I keep getting an error and I : don't see why.. it's the error 91 object not set, I can shoot it off : to you and you can tell me what I'm doing wrong if that's ok... : : Thanks, : -Francisco : http://rcm.netfirms.com : : On Friday, March 28, 2003 7:19 AM [GMT-8], : Bryan Carbonnell wrote: : :: THe only way that I know of to have a current value and an OldValue :: for a property is to create a separate class that holds the :: Properties value and old value. :: :: SO for each property you wanted to hold the value and OldValue for :: tou would need speateate classes. :: :: The sample has been sent off line. :: :: Bryan Carbonnell :: bryan_carbonnell at cbc.ca :: ::::: my.lists at verizon.net 28-Mar-03 10:11:28 AM >>> :: Thanks Bryan, :: :: Please do send me that example so I can see what you mean.. :) :: :: I was placing all the property attributes of a CC into a class named :: clsCustomerConcern and then just populate them at form load time :: (unbound :: form). so the load event would have the following ID's set :: :: CC.CCID = 1234 :: CC.AssignedID = {Some Guid} :: CC.Notes = "The customer wants some brochures" :: :: but then I'd like to also call an OldValue to each of these :: properties, I :: suppose it's just not possible right? I know I can do it all with a :: disconnected ADO recordset where each field has an OldValue, but then :: that's :: not as fun as whacking my head on my desk ;o) :: :: :: :: _______________________________________________ :: 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 carbonnb at sympatico.ca Fri Mar 28 18:54:56 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 19:54:56 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <006101c2f57b$1c85f9c0$b615010a@FHTAPIA> Message-ID: <3E84A890.29558.1406E7E@localhost> On 28 Mar 2003 at 14:41, Francisco H Tapia wrote: > I must not be doing something right, I keep getting an error and I > don't see why.. it's the error 91 object not set, I can shoot it off > to you and you can tell me what I'm doing wrong if that's ok... Sure. Send it to my home accout, carbonnb at sympatico.ca -- Bryan Carbonnell - carbonnb at sympatico.ca Change is inevitable; progress is optional. From carbonnb at sympatico.ca Fri Mar 28 19:07:49 2003 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Fri, 28 Mar 2003 20:07:49 -0500 Subject: [dba-VB] Class Tips In-Reply-To: <006701c2f57e$e369c780$b615010a@FHTAPIA> Message-ID: <3E84AB95.12205.14C39C1@localhost> On 28 Mar 2003 at 15:08, Francisco H Tapia wrote: > :-$ hehehe learning new things certainly can make you humble, I > restepped through your example and it seems I had some variables > misnamed :D, half working... any idea on how to enable an IsDirty > property of the CCID so that if I dim a variable > > Dim CC as cMain > > and I modify the data from 1 value to another for the IsDirty property > to be se to true? Can't see how that would be done... Well, the first thing that pops into my head is to create a .Parent Property in the CCID class. The only problem with that is that you actually have to "tear down" the classes before you set them = nothing. To see how to do that, go to my site http://www3.sympatico.ca/carbonnb/bryan/xapp/listvbavars.html and download the COM Add-In and look at the source code for it to see how to implement a Parent Property. That being said, It just occurred to me while sticking my daughters in the bath, you can raise an event in the CCID class and in your main class handle the raised event. In you Main Class use Dim WithEvents mobjCCID as CCID In your CCID Class in the general Declarations section Public Event Change() Then in the Set Value Procedure, after you save the old value and set the new value, you would use RaiseEvents Change Now back to your main class, and handle the CCID_CHange event. In here is where you can set your IsDirty module level variable to true. Make sense? If not let me know and I'll "enhance" the demo I did this morning. -- Bryan Carbonnell - carbonnb at sympatico.ca Experience is a wonderful thing. It enables you to recognize a mistake when you make it again.