From listmaster at databaseadvisors.com Fri Apr 6 08:40:34 2007 From: listmaster at databaseadvisors.com (Bryan Carbonnell) Date: Fri, 06 Apr 2007 09:40:34 -0400 Subject: [dba-VB] Administrivia - Server Upgrades Message-ID: <46161592.19068.306522A@listmaster.databaseadvisors.com> Hello all, I hope you are all having a good Easter Weekend and that you won't miss the lists too much. I have to do an upgrade on the server, so it will be mostly up, but at some points going down over this weekend. If, at the end of the day, you are having problems, please e-mail me at listmaster at databaseadvisors.com or IF THAT DOES NOT WORK, e-mail me at bryan at carbonnell.ca The main reason for this upgrade is for spam control. We are getting hammered at the server and I need to implement a spam control solution. Again, if you have any problems, contact me at listmaster at databaseadvisors.com or bryan at carbonnell.ca -- Bryan Carbonnell - listmaster at databaseadvisors.com From listmaster at databaseadvisors.com Fri Apr 6 19:17:16 2007 From: listmaster at databaseadvisors.com (Bryan Carbonnell) Date: Fri, 06 Apr 2007 20:17:16 -0400 Subject: [dba-VB] Administrivia - Server Upgrade Complete Message-ID: <4616AACC.16681.54D3C94@listmaster.databaseadvisors.com> Well, the server upgrade has been completed. Hopefully you didn't notice too much of a disruption through out the day today. If you run across anything out of the ordinary, please e-mail me at listmaster at databaseadvisors.com or if that does not work, bryan at carbonnell.ca -- Bryan Carbonnell - listmaster at databaseadvisors.com From Jdemarco at hudsonhealthplan.org Thu Apr 19 10:38:59 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Thu, 19 Apr 2007 11:38:59 -0400 Subject: [dba-VB] XQuery in VB 6 In-Reply-To: <200704191517.l3JFHOx19027@smarthost.yourcomms.net> References: <20070419144605.592A82B8B5C@smtp.nildram.co.uk><1C2084FD2472124AB1812A5476EA3B7A015A0E0B@msgswbmnmsp04.wellsfargo.com> <200704191517.l3JFHOx19027@smarthost.yourcomms.net> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB375@TTNEXCHSVR.hshhp.com> X-posted AccessD, VB Hello All, I've been absent for a while but an issue has just come up that I hope someone can help with. Does anyone have any VB 6 code that uses XQuery to return a set of nodes? I find plenty of XQuery examples that show the query and the returned nodes but no VB 6 implementation. Any short code snip will do. TIA, Jim DeMarco From jwcolby at colbyconsulting.com Sun Apr 22 22:56:21 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sun, 22 Apr 2007 23:56:21 -0400 Subject: [dba-VB] using a saved SSIS with VB.Net Message-ID: <000301c7855b$5c12e9d0$657aa8c0@m6805> I saved an import spec from the import wizard in SQL Server 2005. I now need to use that import spec in VB.Net, but I need to modify it. I need to change the source file, make it an append instead of a make table / append, and I need to modify the datatype from NVarchar to varchar. Of course I can simply go back in to SQL Server and run the import wizard again, however this is a fixed width file which means recreating all of the field name / field width info a second time. Is it possible to just do these mods on the existing import spec or should I just bite the bullet and rebuild. I have ~ sixty more files to import into the table and I really don't want to do this 60 times. The last time I did this I actually built an Access app to create .csv files from the original fixed width files. It seems like the long way around the barn but then again I do not see how this wizard is really very useful in this case. Anyone? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Thu Apr 26 21:51:19 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Thu, 26 Apr 2007 22:51:19 -0400 Subject: [dba-VB] Deploying .net solutions Message-ID: <00bd01c78876$f00d7240$657aa8c0@m6805> I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Thu Apr 26 22:12:11 2007 From: ebarro at verizon.net (Eric Barro) Date: Thu, 26 Apr 2007 20:12:11 -0700 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00bd01c78876$f00d7240$657aa8c0@m6805> Message-ID: <0JH400FF1ZK97U33@vms040.mailsrvcs.net> .NET desktop apps are no different from any non .NET app. You have several options such as creating a setup or .MSI project for your application. Or you can have the app check for updates everytime it starts http://windowsforms.net/articles/appupdater.aspx -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 7:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/776 - Release Date: 4/25/2007 12:19 PM From Jdemarco at hudsonhealthplan.org Fri Apr 27 06:59:41 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 07:59:41 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00bd01c78876$f00d7240$657aa8c0@m6805> References: <00bd01c78876$f00d7240$657aa8c0@m6805> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Fri Apr 27 07:31:22 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 08:31:22 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805> <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 07:39:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 08:39:44 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> Message-ID: <00d601c788c9$22beeb90$657aa8c0@m6805> I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Fri Apr 27 07:55:10 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 08:55:10 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00d601c788c9$22beeb90$657aa8c0@m6805> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com><0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> <00d601c788c9$22beeb90$657aa8c0@m6805> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> There were certainly security issues in VS 2003 but I'm under the impression they've been dealt with in 2005 but this is M$ we're talking about. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 8:40 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 08:34:32 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 09:34:32 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com><0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com><00d601c788c9$22beeb90$657aa8c0@m6805> <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> Message-ID: <00da01c788d0$ca6f37d0$657aa8c0@m6805> Incredibly, application distribution is a subject that is not much in the news. I googled around trying to find out "the how" and there is not a lot out there. My books do not even have the word "deployment" in the index. Simply incredible. I work on a computer at my office. I want to install the application on a server at my client. What do I do? Apparently there is a "project" that wraps the project that is to be installed that builds an installer (MSA?). That is fine, except that the installation onto the server may or may not be the end of the subject. Some things may be a server based application, the server actually runs the application. This would be things like an application that watches an FTP directory, when files appear they are downloaded to the local hard disk, unzipped / unencrypted and then the files are imported to the database. Likewise an application (in fact very likely the SAME application) pulls data out of the database, encrypts / zips it and uploads it to an FTP directory somewhere. With other things, the movement to the server is just the first step. From there, the user needs to execute the application, i.e. needs to download the application to their desktop and run it. If there are changes then somehow the changes need to be automatically pulled down as well. It could be something as simple as copying the whole darned directory and all of its subdirectories but I certainly hope not. Of course if that is not huge then why not? So far these are little applications, as opposed to the main call center app which is an Access FE with hundreds of tables, queries, reports, modules and reports. These are applications such as the report generators that create data feeds to the mainframes. They take a certain amount of setup - selecting product types and date ranges before clicking the button. All of these applications may change on a daily / weekly basis. I am a one man show for the client so they have a huge list of "things to do" which include but are not limited to these applets, and of course there are bug fixes. Each of these things may get a new report this week, a fix to some specific field today and so forth. Updates are relatively easy with Access since it is at most a library mda and the fe. How do I do all this in vb.net? I need to be able to make changes and push it out whenever it is ready, quickly and conveniently. And of course I often times remote in and work local to the machine because it saves the hassle of the FTP up / down to get things back and forth. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:55 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions There were certainly security issues in VS 2003 but I'm under the impression they've been dealt with in 2005 but this is M$ we're talking about. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 8:40 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 09:30:17 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 10:30:17 -0400 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: References: Message-ID: <00f101c788d8$946eeec0$657aa8c0@m6805> Gustav, I am at the same place. I own a copy of VS2005 and SQL Server 2005 (got it at the coming out party) so I can go there if I wish. I have it installed and have played with it quite a bit over the last two years or so. I am actually considering working in the VB.Net express until I come up to speed on that, then make the move to VS2005. The express stuff is free and provides all the functionality that I can understand for the moment anyway. Once I get that down, then I will be ready to learn the stuff that the express versions do not provide. As for reporting, that is a show stopper, especially when you come from Access which is one of the better report generators out there. I am actually considering simply using automation to continue using Access as a report generator for the moment. Again, once I come up to speed on the .Net stuff, then I can re-examine my options. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Friday, April 27, 2007 10:10 AM To: accessd at databaseadvisors.com Subject: [AccessD] Dot Net, where to start? Hi all It seems to be the time for me to get into the Dot Net stuff. But where to start? The only books on Access I've ever had are the original references and handbooks for Access 1 and 2 and the Application Development book for Access 97 so I'm reluctant to buy books - I just don't have the patience ... In the Action Pack - which we subscribe to - I've noticed two discs for VS 2005 Express, "Corbis Image Disc" and "Getting Started". Are these tutorials worth the effort to study? I browsed our vb list archive, which I don't subsribe to, and traffic seems to be low, so where to discuss Dot Net matters at the same level as we discuss Access here? One thing I think I've understood is that report design in VS is poor and third party tools or Report Design Service of SQL Server 2005 are to be preferred if you need reports on a level that match that of Access. Of course, my main interest is anything related to databases - pure web development is second, and game development won't come into play. Any advice will be greatly appreciated. /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From chizotz at mchsi.com Fri Apr 27 11:29:34 2007 From: chizotz at mchsi.com (Ron Allen) Date: Fri, 27 Apr 2007 16:29:34 +0000 Subject: [dba-VB] Deploying .net solutions Message-ID: <042720071629.19344.463224ED000DC91300004B90219792474103010CD2079C080C03BF969B019607080C@mchsi.com> John, It can be as easy as copying the new .NET exe file to the user computers, overwriting the old version. This is how I handle upgrades and bug fixes in my shop, and it works fine. I was also amazed at the sparse information available on deployment. I couldn't find anything substantial or truly useful when I was exploring these issues some time back. Finally, I reasoned that all an installer really does is: *copy the needed files to the target machine *register any library files as needed *set up any necessary directory structures *add any necessary registry entries *create icons The installer built in to VS is not particularly intuitive to use if you want to do anything fancy, even though it appears to have a fair amount of power if you know how to harness it; there is very little useful documentation on how to anything that I have been able to find. But what I have found is that once the initial install is done, unless you need to add additional library files that must be registered on the user system, upgrades can be done by simply copying the new .exe file over the old version on the user machine. One caveat, if you want to upgrade in this manner you can not use the built-in auto-increment versioning because the internal version of the .exe file is registered on the system and replacing the file with one that has a different internal version will cause it to fail. I work in a relatively small shop, with responsibility for 19 users and direct access to all machines. The path of least resistance for me is to stick the new version out on a common location on one of the servers, then go to each workstation and simply copy the new version over the old. However, in the past I have used a DOS batch file with a shortcut on each desktop, and notified everyone by email to run the upgrade; that also works, if your users are responsible enough to follow instructions. We've also discussed having upgrades performed on each machine reboot, checking for new versions and copying only if a new version exists; that would work because we mandate that all machines except mine (I occasionally have to remote in) are turned off at night, and my machine is irrelevant because it is the development machine. Don't know if this helped at all, but I guess the real point is that there are many ways to get this accomplished and it needn't be a huge hassle. Ron ps to all you book-writing gurus out there: I'd say that the world is way ready for a good solid and *usable* book on deployment. > Incredibly, application distribution is a subject that is not much in the > news. I googled around trying to find out "the how" and there is not a lot > out there. My books do not even have the word "deployment" in the index. > Simply incredible. > > I work on a computer at my office. I want to install the application on a > server at my client. What do I do? Apparently there is a "project" that > wraps the project that is to be installed that builds an installer (MSA?). > That is fine, except that the installation onto the server may or may not be > the end of the subject. > > Some things may be a server based application, the server actually runs the > application. This would be things like an application that watches an FTP > directory, when files appear they are downloaded to the local hard disk, > unzipped / unencrypted and then the files are imported to the database. > Likewise an application (in fact very likely the SAME application) pulls > data out of the database, encrypts / zips it and uploads it to an FTP > directory somewhere. > > With other things, the movement to the server is just the first step. From > there, the user needs to execute the application, i.e. needs to download the > application to their desktop and run it. If there are changes then somehow > the changes need to be automatically pulled down as well. It could be > something as simple as copying the whole darned directory and all of its > subdirectories but I certainly hope not. Of course if that is not huge then > why not? So far these are little applications, as opposed to the main call > center app which is an Access FE with hundreds of tables, queries, reports, > modules and reports. > > These are applications such as the report generators that create data feeds > to the mainframes. They take a certain amount of setup - selecting product > types and date ranges before clicking the button. > > All of these applications may change on a daily / weekly basis. I am a one > man show for the client so they have a huge list of "things to do" which > include but are not limited to these applets, and of course there are bug > fixes. Each of these things may get a new report this week, a fix to some > specific field today and so forth. Updates are relatively easy with Access > since it is at most a library mda and the fe. > > How do I do all this in vb.net? I need to be able to make changes and push > it out whenever it is ready, quickly and conveniently. And of course I > often times remote in and work local to the machine because it saves the > hassle of the FTP up / down to get things back and forth. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:55 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > There were certainly security issues in VS 2003 but I'm under the impression > they've been dealt with in 2005 but this is M$ we're talking about. > > > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Friday, April 27, 2007 8:40 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > I read about that on the internet last night, and it looks like it might be > a viable method. I also read that it has some issues, particularly in the > presence of different versions of the .Net framework on the desktop, and > also IIRC something about security issues and what the app is allowed to do. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:31 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > ClickOnce is the technology I was referring to. > > > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:00 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > John, > > If you mean how are you going to get updates to users you should look at > "smart client" applications where the client is aware of changes and > downloads them from a central location before the app starts. I don't have > much experience with it but I expect I will soon as we're moving a major > client/server app to .NET this year. > > > Jim DeMarco > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Thursday, April 26, 2007 10:51 PM > To: 'Access Developers discussion and problem solving'; > dba-vb at databaseadvisors.com > Subject: [dba-VB] Deploying .net solutions > > I have a bunch of processes that are not particularly suited to Access for > one reason or another. These include things like > > * doing what I call "directory watching" and performing some action when a > file appears. > * FTP transfers between local drives and FTP sites > * Building complex data feeds between a database and a remote mainframe > > To take an example, I regularly build data feeds which look like: > > Header Rec > Detail Rec > Detail Rec > Detail Rec > . > . > Trailer Rec > > The header rec has some specific set of data in it such as who it is coming > from, the date of the file etc. > > The detail recs have repetitive data such as payments to clients, payment > dates, from/to dates that the payment is for, the amount, the check number > etc. > > The footer rec has some specific data in it such as the number of checks, > the bank account number that the checks are drawn against etc. > > I have built a report generator in VBA, inside of access, and it works, but > it is really rather patchwork by nature. I have to reference specific libs, > go outside of VBA to handle things like the file system and text streams (in > an object oriented manner) and so forth. There are no threads so a single > error can hang the system, and things that should happen in parallel have to > happen sequentially. > > So, I would like to take one of these systems and move it to .Net. What I > am trying to discover is how .Net systems are (reliably) deployed to the > desktop. Often times these applets are used by more than one person, often > at the same time. At the moment, because they are Access / vba based, I > just do a copy down to the desktop (a single file) and open the mdb. A form > opens and the user goes to work. These applets are under constant > development, literally daily as I finish one report another is started. Bug > fixes are done. > > I assume (but am not sure) that a VB.Net applet would be distributed as > well, downloaded to the desktop and run from there. What is the vehicle for > this distribution? > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > 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 chizotz at mchsi.com Fri Apr 27 11:47:42 2007 From: chizotz at mchsi.com (Ron Allen) Date: Fri, 27 Apr 2007 16:47:42 +0000 Subject: [dba-VB] [AccessD] Dot Net, where to start? Message-ID: <042720071647.4471.4632292E000BDC6500001177219792474103010CD2079C080C03BF969B019607080C@mchsi.com> Gustav, We use (shudder) Crystal Reports. Crystal is bug-ridden, or perhaps I should say bug-riddled, and although they fix seemingly thousands of bugs between versions (at least according to their lists of changes), they never seem to bother to fix many basic problems. There are many bugs in Crystal that have been around so long (years) that long-time Crystal developers tend to think of them as "quirky features" rather than the maddening bugs they actually are. That said, overall Crystal does a good job and, in truth, is far more powerful than Access as a reporting tool. And despite it's obscene cost, it's cheaper than most other solutions. I haven't looked at the reporting tool in 2005 yet, but the version I looked at a couple of years ago was not at all intuitive, not nearly as powerful as Crystal, and had many problems of it's own. Ron > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Friday, April 27, 2007 10:10 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Dot Net, where to start? > > Hi all > > It seems to be the time for me to get into the Dot Net stuff. But where to > start? > The only books on Access I've ever had are the original references and > handbooks for Access 1 and 2 and the Application Development book for Access > 97 so I'm reluctant to buy books - I just don't have the patience ... > > In the Action Pack - which we subscribe to - I've noticed two discs for VS > 2005 Express, "Corbis Image Disc" and "Getting Started". Are these tutorials > worth the effort to study? > > I browsed our vb list archive, which I don't subsribe to, and traffic seems > to be low, so where to discuss Dot Net matters at the same level as we > discuss Access here? > > One thing I think I've understood is that report design in VS is poor and > third party tools or Report Design Service of SQL Server 2005 are to be > preferred if you need reports on a level that match that of Access. > > Of course, my main interest is anything related to databases - pure web > development is second, and game development won't come into play. > Any advice will be greatly appreciated. > > /gustav From jwcolby at colbyconsulting.com Fri Apr 27 15:33:27 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 16:33:27 -0400 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: References: Message-ID: <011901c7890b$504911c0$657aa8c0@m6805> In playing around with the VB Express I discovered that you can reference an Access FE in a dataset. Doing that allows you to see not only all linked tables, but also all of the queries in the FE. Theoretically this will allow me to build, save and use queries there where I am comfortable until such time as you guys teach me how to build queries inside of VB.Net One thing I am still struggling to figure out is how to move a table from an MDB to SQL Server Express. I have one specific table which is causing heartaches in Access. It uses memo fields and there are LOTS of "locking issues" when users are trying to edit / add these memos. This is a key table, where the user adds dated notes about the claim, so users are in there viewing old notes and adding new notes about phone conversations and other stuff. Microsoft's party line is that these locking issues are often caused by the way memos are stored in pages on the disk and how JET locks these pages during edits. Thus I believe (hope, pray) that if I move that table out to SQL Server the locking issues will go away since SQL Server handles such things entirely differently. A related benefit is that the BE will slim down considerably. These memos constitute well over 250 megabytes of data in a (consolidated) 700 mbyte BE. I could of course simply build the table by hand but I would really like to "just move it", data and all. John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Fri Apr 27 15:51:59 2007 From: ebarro at verizon.net (Eric Barro) Date: Fri, 27 Apr 2007 13:51:59 -0700 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: <011901c7890b$504911c0$657aa8c0@m6805> Message-ID: <0JH600LNFCMY68YE@vms048.mailsrvcs.net> Using SQL Management Studio you connect to your SQL Express database where you want the tables to live and then right click the database name and select Tasks->Import Data from the drop down menu. After you select the data source (Microsoft Access) and the file location for the source and the SQL database for the destination, it will create the tables for you. You might have to check indexes and copy and paste your queries (views in SQL). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 1:33 PM To: 'Access Developers discussion and problem solving' Cc: dba-vb at databaseadvisors.com Subject: Re: [AccessD] Dot Net, where to start? In playing around with the VB Express I discovered that you can reference an Access FE in a dataset. Doing that allows you to see not only all linked tables, but also all of the queries in the FE. Theoretically this will allow me to build, save and use queries there where I am comfortable until such time as you guys teach me how to build queries inside of VB.Net One thing I am still struggling to figure out is how to move a table from an MDB to SQL Server Express. I have one specific table which is causing heartaches in Access. It uses memo fields and there are LOTS of "locking issues" when users are trying to edit / add these memos. This is a key table, where the user adds dated notes about the claim, so users are in there viewing old notes and adding new notes about phone conversations and other stuff. Microsoft's party line is that these locking issues are often caused by the way memos are stored in pages on the disk and how JET locks these pages during edits. Thus I believe (hope, pray) that if I move that table out to SQL Server the locking issues will go away since SQL Server handles such things entirely differently. A related benefit is that the BE will slim down considerably. These memos constitute well over 250 megabytes of data in a (consolidated) 700 mbyte BE. I could of course simply build the table by hand but I would really like to "just move it", data and all. John W. Colby Colby Consulting www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 3:23 PM From ridermark at gmail.com Fri Apr 27 16:33:40 2007 From: ridermark at gmail.com (Mark Rider) Date: Fri, 27 Apr 2007 16:33:40 -0500 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: <0JH600LNFCMY68YE@vms048.mailsrvcs.net> References: <011901c7890b$504911c0$657aa8c0@m6805> <0JH600LNFCMY68YE@vms048.mailsrvcs.net> Message-ID: SQL Server 2005 Express Manager does not offer Import/Export functionality as it is dependent on SQL Server Integration Services (SSIS) and SQL Server Agent. You will need to obtain the full version of SQL Server Management Studio. See the thread at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=157773&SiteId=1 On 4/27/07, Eric Barro wrote: > Using SQL Management Studio you connect to your SQL Express database where > you want the tables to live and then right click the database name and > select Tasks->Import Data from the drop down menu. -- Mark Rider http://dfwmdug.org Don't anthropomorphize computers. They don't like it. From jwcolby at colbyconsulting.com Fri Apr 27 18:45:34 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 19:45:34 -0400 Subject: [dba-VB] Moving your table to SQL Server In-Reply-To: <7d60f23a0704271348k215adach120403fbf818efef@mail.gmail.com> References: <7d60f23a0704271348k215adach120403fbf818efef@mail.gmail.com> Message-ID: <012301c78926$274def50$657aa8c0@m6805> Martin, Really it is just a matter of "how do you do it". I am the kind of person who needs to know the "how it is done" so that I can do it the next time. In SQL Server 2005 Standard Edition there is a wizard that I use but it pretty much sucks (at least how I have used it). Data types are lost, indexes are lost etc. HOLY SMOKE batman! I just ran the SQL Server Migration Assistant for Access and it WORKED! I imported my entire billing database into SQL Server Express. The wizard would not "find" the SQL Server Express database, but if I typed it in "m6805\SQLExpress" it found it. I went out there in advance and created the database itself (no tables). I am IMPRESSED!!! I am actually using my billing database hooked to SQL Server expressed now! WOW! John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Apr 27 23:42:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 00:42:44 -0400 Subject: [dba-VB] VB.Net - UnhandledException Message-ID: <012601c7894f$b023b3e0$657aa8c0@m6805> I am reading about the top level "unhandled exception" error handler. This makes me wonder what the experienced .Net developers do for logging errors. Is there already an error logger object somewhere in the bowels of this beast? If so how is it used? I would dearly love to log all errors that I don't explicitly handle and even some that I do explicitly handle. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Apr 28 00:34:35 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 01:34:35 -0400 Subject: [dba-VB] Combo box Message-ID: <012b01c78956$ec798c50$657aa8c0@m6805> I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Apr 28 01:05:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 02:05:44 -0400 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <013001c7895b$44be7430$657aa8c0@m6805> Many years ago I designed (in Access) a text box / list box pair of controls to emulate a combo box. The idea was to take each character in the text box and use the characters to narrow down the remaining values displayed in the list. IOW filter a query over and over as more characters were typed in the text box. In order to make it look like a combo, I created a list box, positioned it under the text box, shrank the vertical size up to a single line and the width to the same width as the text box. When the user clicked in the text box I dropped down the list (expanded it vertically and horizontally) and displayed the entire list. As the user typed characters I requeried the list, with fewer and fewer remaining records being displayed. If the user deleted characters I also requeried the list. When the user had selected the correct data and left the text box, the OnExit resized the list to a single line / same width as the text box. It worked quite well. Do you think a strategy such as this could be used to implement an "access type" combo box substitute. It wasn't an exact duplicate of the combo functionality but it did work and was easy to implement. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 1:35 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ebarro at verizon.net Sat Apr 28 01:14:24 2007 From: ebarro at verizon.net (Eric Barro) Date: Fri, 27 Apr 2007 23:14:24 -0700 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> This is my snippet of code should give you an idea...it is however in C# and specific to ASP.NET (web-based). It should be fairly easy to port it over to VB.NET and change a couple of lines to be Win32 specific. The function is a public method stored in my Data class... public static int BindDropDownList(DropDownList ddl, string sql, string sqlConnect, Hashtable sqlParameters, string ddlTextField, string ddlValueField, bool showDefaultSelection) { DataSet sqlDs; //count of records returned int totalRecords; //grab the connection string string ConnectionString = ConfigurationSettings.AppSettings.Get(sqlConnect); //define and initialize the connection object SqlConnection sqlConn = new SqlConnection(ConnectionString); //define and initialize the command object SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); //define the command type sqlCmd.CommandType = CommandType.StoredProcedure; if (sqlParameters.Count > 0) { //get a collection of the keys ICollection sqlParams = sqlParameters.Keys; foreach (string key in sqlParams) { // add parameters to pass to the sproc sqlCmd.Parameters.Add(new SqlParameter(key, sqlParameters[key].ToString())); } } //open the connection sqlConn.Open(); //define the data adapter SqlDataAdapter sqlDa = new SqlDataAdapter(); //define the select command sqlDa.SelectCommand = sqlCmd; //initialize the dataset sqlDs = new DataSet("MyList"); //fill the dataset sqlDa.Fill(sqlDs, "MyList"); //define a session variable containing our dataset System.Web.HttpContext.Current.Session["MyList"] = sqlDs; //grab the total number of records returned by the sproc totalRecords = sqlDs.Tables[0].Rows.Count; if (totalRecords > 0) { if (showDefaultSelection) { DataRow newListRow = sqlDs.Tables[0].NewRow(); //this is the value that shows on the dropdownlist //specify an option that will be the default selection newListRow[ddlTextField] = "--Please select one--"; //this is the value that will be posted to the database newListRow[ddlValueField] = 0; //add the new row sqlDs.Tables[0].Rows.Add(newListRow); //specify a sort order based on ddlValueField; this ensures that the newly added row will show up at the top sqlDs.Tables[0].DefaultView.Sort = ddlValueField; } //close the connection ddl.DataSource = sqlDs.Tables[0].DefaultView; ddl.DataTextField = ddlTextField; ddl.DataValueField = ddlValueField; ddl.DataBind(); sqlConn.Close(); } return totalRecords; } //end BindDropDownList This is how I call it... Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, "ZipCity", "ZipCode", true); ZipCity is what I use to display in the dropdownlist and ZipCode is what I use to lookup and store values. I believe this is referred to as DisplayMember and ValueMember in Win32 comboboxes. In my SQL stored procedure I simply make sure that ZipCity is concatenated with whatever value I want to show in the dropdownlist. -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 10:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 3:23 PM From wdhindman at dejpolsystems.com Sat Apr 28 01:55:48 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Sat, 28 Apr 2007 02:55:48 -0400 Subject: [dba-VB] Combo box References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> Message-ID: <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. > > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Friday, April 27, 2007 10:35 PM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Combo box > > I am running into the issue of how to display multiple lines in a combo > box. > IIRC this is a "no can do" in the combos in VB.Net but there must be > common > workarounds. > > For example I need to allow the user to select a zip code, but he really > needs to see the zip AND the city. Furthermore my code is going to need > to > load a record based on that zip code to get lat/long. > > So, is there a way other than using a concatenation of the zip and the > city > to display both in the combo? If I do a concatenation, then I can no > longer > use the zip to lookup a record in a recordset since it now has city data > in > the string. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 > 3:23 PM > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From mjrobertson at iinet.net.au Sat Apr 28 02:31:08 2007 From: mjrobertson at iinet.net.au (Mike) Date: Sat, 28 Apr 2007 17:31:08 +1000 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <000001c78967$30cf3070$0600a8c0@D3NSLB1S> John, This was a very annoying issue when I started the move to .NET Apart from buying custom controls, the only way I found to reproduce multi-column combo/list boxes was to use a datagrid. Individual elements of the datagrid can then be accessed when a row or cell is selected. Regards, Mike Robertson -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, 28 April 2007 3:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/777 - Release Date: 26/04/2007 3:23 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/777 - Release Date: 26/04/2007 3:23 PM From jwcolby at colbyconsulting.com Sat Apr 28 07:07:41 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 08:07:41 -0400 Subject: [dba-VB] Combo box In-Reply-To: <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> Message-ID: <013401c7898d$d5881d90$657aa8c0@m6805> LOL, and it only gets better (worse). John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Saturday, April 28, 2007 2:56 AM To: ebarro at verizon.net; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. From jwcolby at colbyconsulting.com Sat Apr 28 08:58:42 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 09:58:42 -0400 Subject: [dba-VB] Moving through an ADO recordset Message-ID: <013501c7899d$57d0f010$657aa8c0@m6805> In Access (because I was a DAO kinda guy) for smallish recordsets I would often create a class to hold a record (properties for each field I needed to work with) and a class to hold a collection of these classes. I would then read the data out into the record class instances, storing each record class instance in a collection in a "table" class. For example, I have an application already built in Access which calculates the population in all the zips which fall within a radius around a zip code. My brute force approach was to read about 42 thousand records from a table of zip codes, pulling just the zip, city, lat, long, population and house hold count. I would then store each record in a zip class instance which has a property for each of those fields in the record. The ZIPS (plural) class has a collection to hold the zip (singular) class. The ZIPS class opens the recordset and enters a loop creating zip class instances and passing the recordset off to the zip class instance which loads the fields into the properties, and on return the ZIPS class stores the populated zip class instance into a collection. Once loaded I have 42K zip class instances in a collection in a ZIPS class, keyed on the zipcode. Having done that I can now ask the user for a zip code and a radius. Using a formula which calculates the distance between two points (lat/long) I iterate through each and every zip class in the ZIPS collection storing in an "InRadius" collection all the zip classes where the distance between the user supplied zip's lat / long and the zip class being evaluated is less than the radius. Having done that, when I have examined every zip class in the big zip collection, I now have a collection containing pointers to only those zips within the radius. I now iterate that collection adding up the populations and house hold count of each zip class and display it in text boxes in the calculator form. It is a trivial application to write and other than the initial load of the zip classes from the recordset is pretty darned fast to calc the populations - of course depending on the radius. As an exercise in .Net I decided to port that application. There is one huge difference however, DAO is gone and I am faced with the ADO object (s) etc. The upside is that the ADO widget is actually a "disconnected" recordset, i.e. it reads it all into memory for me. This is a "read only" recordset, i.e. I am not updating records and writing them back to the table. This leads me to question whether it makes any sense to do the Zip/ZIPS class thing or just sweep through the ADO recordset itself. Are there record objects? Could I run directly through the recordset pulling pointers to record objects and storing those pointers in my collection? Could I add a field to my recordset called selected and sweep through the ADO recordset setting the SELECTED flag in each record that is within the radius, and then just apply a filter to the ADO recordset to "pull out" only the SELECTED records to sum them? And importantly, if doing it this way is possible, is it faster or slower than iterating my own collection? I would have to clear a selected flag between uses whereas a collection is just re-dimed to empty it and get it ready to fill again. Moving from one tool to another means re-examining the method used to ensure that it is still an efficient method in the new tool. Does anyone have any experience in iterating a ADO recordset in this manner? John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Sat Apr 28 09:41:17 2007 From: ebarro at verizon.net (Eric Barro) Date: Sat, 28 Apr 2007 07:41:17 -0700 Subject: [dba-VB] Moving through an ADO recordset In-Reply-To: <013501c7899d$57d0f010$657aa8c0@m6805> Message-ID: <0JH700CZ1Q4UL2A3@vms046.mailsrvcs.net> In ADO.NET you can mirror your database in datasets. Datasets are different from recordsets in that they are more similar to database containers. Recordsets in DAO are the table equivalents in ADO.NET. Thus, in one dataset object you can have multiple tables contained inside that dataset. You can define relations between those tables and you can perform filtering, sorting and yes update the records in the Dataset. The approach I have taken in .NET is to connect to the database and retrieve records from a table and fill a table object in a dataset object. I can then return the dataset object to my app or return a single table. I use collections such as Hashtables and Arraylists to iterate through the records. Here's a link that explains datasets in ADO.NET http://builder.com.com/5100-6388-1050109-2.html -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 6:59 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Moving through an ADO recordset In Access (because I was a DAO kinda guy) for smallish recordsets I would often create a class to hold a record (properties for each field I needed to work with) and a class to hold a collection of these classes. I would then read the data out into the record class instances, storing each record class instance in a collection in a "table" class. For example, I have an application already built in Access which calculates the population in all the zips which fall within a radius around a zip code. My brute force approach was to read about 42 thousand records from a table of zip codes, pulling just the zip, city, lat, long, population and house hold count. I would then store each record in a zip class instance which has a property for each of those fields in the record. The ZIPS (plural) class has a collection to hold the zip (singular) class. The ZIPS class opens the recordset and enters a loop creating zip class instances and passing the recordset off to the zip class instance which loads the fields into the properties, and on return the ZIPS class stores the populated zip class instance into a collection. Once loaded I have 42K zip class instances in a collection in a ZIPS class, keyed on the zipcode. Having done that I can now ask the user for a zip code and a radius. Using a formula which calculates the distance between two points (lat/long) I iterate through each and every zip class in the ZIPS collection storing in an "InRadius" collection all the zip classes where the distance between the user supplied zip's lat / long and the zip class being evaluated is less than the radius. Having done that, when I have examined every zip class in the big zip collection, I now have a collection containing pointers to only those zips within the radius. I now iterate that collection adding up the populations and house hold count of each zip class and display it in text boxes in the calculator form. It is a trivial application to write and other than the initial load of the zip classes from the recordset is pretty darned fast to calc the populations - of course depending on the radius. As an exercise in .Net I decided to port that application. There is one huge difference however, DAO is gone and I am faced with the ADO object (s) etc. The upside is that the ADO widget is actually a "disconnected" recordset, i.e. it reads it all into memory for me. This is a "read only" recordset, i.e. I am not updating records and writing them back to the table. This leads me to question whether it makes any sense to do the Zip/ZIPS class thing or just sweep through the ADO recordset itself. Are there record objects? Could I run directly through the recordset pulling pointers to record objects and storing those pointers in my collection? Could I add a field to my recordset called selected and sweep through the ADO recordset setting the SELECTED flag in each record that is within the radius, and then just apply a filter to the ADO recordset to "pull out" only the SELECTED records to sum them? And importantly, if doing it this way is possible, is it faster or slower than iterating my own collection? I would have to clear a selected flag between uses whereas a collection is just re-dimed to empty it and get it ready to fill again. Moving from one tool to another means re-examining the method used to ensure that it is still an efficient method in the new tool. Does anyone have any experience in iterating a ADO recordset in this manner? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/778 - Release Date: 4/27/2007 1:39 PM From bheid at sc.rr.com Sun Apr 29 17:18:07 2007 From: bheid at sc.rr.com (Bobby Heid) Date: Sun, 29 Apr 2007 18:18:07 -0400 Subject: [dba-VB] Combo box In-Reply-To: <013401c7898d$d5881d90$657aa8c0@m6805> References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> <013401c7898d$d5881d90$657aa8c0@m6805> Message-ID: <000901c78aac$4418ea40$2c01a8c0@bhxp> John, If you load a table in a dataset with all of the desired fields in it (zip & Name, zip, name, ID, etc.), then bind a binding source to the table in the dataset, then bind the combo box to the ID and the zip & name fields. When the user selects an item in the combo box, you can use something like the bindingsource.currentrow (or something like that, I can not remember the name of it right now), to get all of the data in the current row, not just what is in the combo box. So check out the binding source and see if that will give you what you need. Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 8:08 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box LOL, and it only gets better (worse). John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Saturday, April 28, 2007 2:56 AM To: ebarro at verizon.net; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Apr 30 10:49:27 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 30 Apr 2007 08:49:27 -0700 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: Combos in .Net are actually a kind of datagrid, so just binding the combo to a multicolumn source (or array or listview, etc.) should give you multiple columns. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 10:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From chizotz at mchsi.com Mon Apr 30 17:36:36 2007 From: chizotz at mchsi.com (Ron Allen) Date: Mon, 30 Apr 2007 22:36:36 +0000 Subject: [dba-VB] Combo box Message-ID: <043020072236.3859.46366F740003174200000F13219791299503010CD2079C080C03BF969B019607080C@mchsi.com> Or concatenate the information you want displayed in the dataset for the display member of the combo box, and set the value member to the field you need to use to get other data. That will easily and quickly give you a drop- down display that looks like: 63005 CHESTERFIELD 63011 BALLWIN 63012 BARNHART 63014 BERGER 63017 CHESTERFIELD 63021 BALLWIN 63025 EUREKA 63026 FENTON 63028 FESTUS 63031 FLORISSANT and will return either the zip or the city name as needed. You can also change the value member at run time to pull either the zip or the city name if that's needed; a little more work, but I don't think all that much. If that still doesn't work for you, you can create your own multiline combo box that inherits from the comboBox class. Here's a link to one example of how you might go about it: http://www.codeproject.com/cs/combobox/multicolumncombo.asp Ron > John, > > If you load a table in a dataset with all of the desired fields in it (zip & > Name, zip, name, ID, etc.), then bind a binding source to the table in the > dataset, then bind the combo box to the ID and the zip & name fields. When > the user selects an item in the combo box, you can use something like the > bindingsource.currentrow (or something like that, I can not remember the > name of it right now), to get all of the data in the current row, not just > what is in the combo box. > > So check out the binding source and see if that will give you what you need. > > Bobby > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Saturday, April 28, 2007 8:08 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Combo box > > LOL, and it only gets better (worse). > > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman > Sent: Saturday, April 28, 2007 2:56 AM > To: ebarro at verizon.net; dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Combo box > > ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, > what in the heck is the world coming to when there is no such thing as a > simple d&d combo available ...y'all give me a headache, you do ...turning > off the lights :( > > William Hindman > > ----- Original Message ----- > From: "Eric Barro" > To: > Sent: Saturday, April 28, 2007 2:14 AM > Subject: Re: [dba-VB] Combo box > > > > This is my snippet of code should give you an idea...it is however in C# > > and > > specific to ASP.NET (web-based). It should be fairly easy to port it over > > to > > VB.NET and change a couple of lines to be Win32 specific. > > > > The function is a public method stored in my Data class... > > > > public static int BindDropDownList(DropDownList ddl, > > string sql, string sqlConnect, Hashtable > > sqlParameters, > > string ddlTextField, string ddlValueField, bool > > showDefaultSelection) > > { > > DataSet sqlDs; > > > > //count of records returned > > int totalRecords; > > //grab the connection string > > string ConnectionString = > > ConfigurationSettings.AppSettings.Get(sqlConnect); > > //define and initialize the connection object > > SqlConnection sqlConn = new > > SqlConnection(ConnectionString); > > //define and initialize the command object > > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > > //define the command type > > sqlCmd.CommandType = CommandType.StoredProcedure; > > > > if (sqlParameters.Count > 0) > > { > > //get a collection of the keys > > ICollection sqlParams = sqlParameters.Keys; > > foreach (string key in sqlParams) > > { > > // add parameters to pass to the > > sproc > > sqlCmd.Parameters.Add(new > > SqlParameter(key, sqlParameters[key].ToString())); > > } > > } > > //open the connection > > sqlConn.Open(); > > //define the data adapter > > SqlDataAdapter sqlDa = new SqlDataAdapter(); > > //define the select command > > sqlDa.SelectCommand = sqlCmd; > > //initialize the dataset > > sqlDs = new DataSet("MyList"); > > //fill the dataset > > sqlDa.Fill(sqlDs, "MyList"); > > //define a session variable containing our dataset > > System.Web.HttpContext.Current.Session["MyList"] = > > sqlDs; > > //grab the total number of records returned by the > > sproc > > totalRecords = sqlDs.Tables[0].Rows.Count; > > if (totalRecords > 0) > > { > > if (showDefaultSelection) > > { > > DataRow newListRow = > > sqlDs.Tables[0].NewRow(); > > //this is the value that shows on > > the dropdownlist > > //specify an option that will be the > > default selection > > newListRow[ddlTextField] = "--Please > > select one--"; > > //this is the value that will be > > posted to the database > > newListRow[ddlValueField] = 0; > > //add the new row > > > > sqlDs.Tables[0].Rows.Add(newListRow); > > //specify a sort order based on > > ddlValueField; this ensures that the newly added row will show up at the > > top > > sqlDs.Tables[0].DefaultView.Sort = > > ddlValueField; > > } > > //close the connection > > ddl.DataSource = > > sqlDs.Tables[0].DefaultView; > > ddl.DataTextField = ddlTextField; > > ddl.DataValueField = ddlValueField; > > ddl.DataBind(); > > sqlConn.Close(); > > } > > return totalRecords; > > } //end BindDropDownList > > > > > > This is how I call it... > > > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > > "ZipCity", "ZipCode", true); > > > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > > use to lookup and store values. I believe this is referred to as > > DisplayMember and ValueMember in Win32 comboboxes. > > > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > > with whatever value I want to show in the dropdownlist. > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > 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 listmaster at databaseadvisors.com Fri Apr 6 08:40:34 2007 From: listmaster at databaseadvisors.com (Bryan Carbonnell) Date: Fri, 06 Apr 2007 09:40:34 -0400 Subject: [dba-VB] Administrivia - Server Upgrades Message-ID: <46161592.19068.306522A@listmaster.databaseadvisors.com> Hello all, I hope you are all having a good Easter Weekend and that you won't miss the lists too much. I have to do an upgrade on the server, so it will be mostly up, but at some points going down over this weekend. If, at the end of the day, you are having problems, please e-mail me at listmaster at databaseadvisors.com or IF THAT DOES NOT WORK, e-mail me at bryan at carbonnell.ca The main reason for this upgrade is for spam control. We are getting hammered at the server and I need to implement a spam control solution. Again, if you have any problems, contact me at listmaster at databaseadvisors.com or bryan at carbonnell.ca -- Bryan Carbonnell - listmaster at databaseadvisors.com From listmaster at databaseadvisors.com Fri Apr 6 19:17:16 2007 From: listmaster at databaseadvisors.com (Bryan Carbonnell) Date: Fri, 06 Apr 2007 20:17:16 -0400 Subject: [dba-VB] Administrivia - Server Upgrade Complete Message-ID: <4616AACC.16681.54D3C94@listmaster.databaseadvisors.com> Well, the server upgrade has been completed. Hopefully you didn't notice too much of a disruption through out the day today. If you run across anything out of the ordinary, please e-mail me at listmaster at databaseadvisors.com or if that does not work, bryan at carbonnell.ca -- Bryan Carbonnell - listmaster at databaseadvisors.com From Jdemarco at hudsonhealthplan.org Thu Apr 19 10:38:59 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Thu, 19 Apr 2007 11:38:59 -0400 Subject: [dba-VB] XQuery in VB 6 In-Reply-To: <200704191517.l3JFHOx19027@smarthost.yourcomms.net> References: <20070419144605.592A82B8B5C@smtp.nildram.co.uk><1C2084FD2472124AB1812A5476EA3B7A015A0E0B@msgswbmnmsp04.wellsfargo.com> <200704191517.l3JFHOx19027@smarthost.yourcomms.net> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB375@TTNEXCHSVR.hshhp.com> X-posted AccessD, VB Hello All, I've been absent for a while but an issue has just come up that I hope someone can help with. Does anyone have any VB 6 code that uses XQuery to return a set of nodes? I find plenty of XQuery examples that show the query and the returned nodes but no VB 6 implementation. Any short code snip will do. TIA, Jim DeMarco From jwcolby at colbyconsulting.com Sun Apr 22 22:56:21 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sun, 22 Apr 2007 23:56:21 -0400 Subject: [dba-VB] using a saved SSIS with VB.Net Message-ID: <000301c7855b$5c12e9d0$657aa8c0@m6805> I saved an import spec from the import wizard in SQL Server 2005. I now need to use that import spec in VB.Net, but I need to modify it. I need to change the source file, make it an append instead of a make table / append, and I need to modify the datatype from NVarchar to varchar. Of course I can simply go back in to SQL Server and run the import wizard again, however this is a fixed width file which means recreating all of the field name / field width info a second time. Is it possible to just do these mods on the existing import spec or should I just bite the bullet and rebuild. I have ~ sixty more files to import into the table and I really don't want to do this 60 times. The last time I did this I actually built an Access app to create .csv files from the original fixed width files. It seems like the long way around the barn but then again I do not see how this wizard is really very useful in this case. Anyone? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Thu Apr 26 21:51:19 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Thu, 26 Apr 2007 22:51:19 -0400 Subject: [dba-VB] Deploying .net solutions Message-ID: <00bd01c78876$f00d7240$657aa8c0@m6805> I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Thu Apr 26 22:12:11 2007 From: ebarro at verizon.net (Eric Barro) Date: Thu, 26 Apr 2007 20:12:11 -0700 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00bd01c78876$f00d7240$657aa8c0@m6805> Message-ID: <0JH400FF1ZK97U33@vms040.mailsrvcs.net> .NET desktop apps are no different from any non .NET app. You have several options such as creating a setup or .MSI project for your application. Or you can have the app check for updates everytime it starts http://windowsforms.net/articles/appupdater.aspx -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 7:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/776 - Release Date: 4/25/2007 12:19 PM From Jdemarco at hudsonhealthplan.org Fri Apr 27 06:59:41 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 07:59:41 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00bd01c78876$f00d7240$657aa8c0@m6805> References: <00bd01c78876$f00d7240$657aa8c0@m6805> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Fri Apr 27 07:31:22 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 08:31:22 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805> <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 07:39:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 08:39:44 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> Message-ID: <00d601c788c9$22beeb90$657aa8c0@m6805> I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Fri Apr 27 07:55:10 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 08:55:10 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00d601c788c9$22beeb90$657aa8c0@m6805> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com><0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> <00d601c788c9$22beeb90$657aa8c0@m6805> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> There were certainly security issues in VS 2003 but I'm under the impression they've been dealt with in 2005 but this is M$ we're talking about. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 8:40 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 08:34:32 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 09:34:32 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com><0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com><00d601c788c9$22beeb90$657aa8c0@m6805> <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> Message-ID: <00da01c788d0$ca6f37d0$657aa8c0@m6805> Incredibly, application distribution is a subject that is not much in the news. I googled around trying to find out "the how" and there is not a lot out there. My books do not even have the word "deployment" in the index. Simply incredible. I work on a computer at my office. I want to install the application on a server at my client. What do I do? Apparently there is a "project" that wraps the project that is to be installed that builds an installer (MSA?). That is fine, except that the installation onto the server may or may not be the end of the subject. Some things may be a server based application, the server actually runs the application. This would be things like an application that watches an FTP directory, when files appear they are downloaded to the local hard disk, unzipped / unencrypted and then the files are imported to the database. Likewise an application (in fact very likely the SAME application) pulls data out of the database, encrypts / zips it and uploads it to an FTP directory somewhere. With other things, the movement to the server is just the first step. From there, the user needs to execute the application, i.e. needs to download the application to their desktop and run it. If there are changes then somehow the changes need to be automatically pulled down as well. It could be something as simple as copying the whole darned directory and all of its subdirectories but I certainly hope not. Of course if that is not huge then why not? So far these are little applications, as opposed to the main call center app which is an Access FE with hundreds of tables, queries, reports, modules and reports. These are applications such as the report generators that create data feeds to the mainframes. They take a certain amount of setup - selecting product types and date ranges before clicking the button. All of these applications may change on a daily / weekly basis. I am a one man show for the client so they have a huge list of "things to do" which include but are not limited to these applets, and of course there are bug fixes. Each of these things may get a new report this week, a fix to some specific field today and so forth. Updates are relatively easy with Access since it is at most a library mda and the fe. How do I do all this in vb.net? I need to be able to make changes and push it out whenever it is ready, quickly and conveniently. And of course I often times remote in and work local to the machine because it saves the hassle of the FTP up / down to get things back and forth. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:55 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions There were certainly security issues in VS 2003 but I'm under the impression they've been dealt with in 2005 but this is M$ we're talking about. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 8:40 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 09:30:17 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 10:30:17 -0400 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: References: Message-ID: <00f101c788d8$946eeec0$657aa8c0@m6805> Gustav, I am at the same place. I own a copy of VS2005 and SQL Server 2005 (got it at the coming out party) so I can go there if I wish. I have it installed and have played with it quite a bit over the last two years or so. I am actually considering working in the VB.Net express until I come up to speed on that, then make the move to VS2005. The express stuff is free and provides all the functionality that I can understand for the moment anyway. Once I get that down, then I will be ready to learn the stuff that the express versions do not provide. As for reporting, that is a show stopper, especially when you come from Access which is one of the better report generators out there. I am actually considering simply using automation to continue using Access as a report generator for the moment. Again, once I come up to speed on the .Net stuff, then I can re-examine my options. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Friday, April 27, 2007 10:10 AM To: accessd at databaseadvisors.com Subject: [AccessD] Dot Net, where to start? Hi all It seems to be the time for me to get into the Dot Net stuff. But where to start? The only books on Access I've ever had are the original references and handbooks for Access 1 and 2 and the Application Development book for Access 97 so I'm reluctant to buy books - I just don't have the patience ... In the Action Pack - which we subscribe to - I've noticed two discs for VS 2005 Express, "Corbis Image Disc" and "Getting Started". Are these tutorials worth the effort to study? I browsed our vb list archive, which I don't subsribe to, and traffic seems to be low, so where to discuss Dot Net matters at the same level as we discuss Access here? One thing I think I've understood is that report design in VS is poor and third party tools or Report Design Service of SQL Server 2005 are to be preferred if you need reports on a level that match that of Access. Of course, my main interest is anything related to databases - pure web development is second, and game development won't come into play. Any advice will be greatly appreciated. /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From chizotz at mchsi.com Fri Apr 27 11:29:34 2007 From: chizotz at mchsi.com (Ron Allen) Date: Fri, 27 Apr 2007 16:29:34 +0000 Subject: [dba-VB] Deploying .net solutions Message-ID: <042720071629.19344.463224ED000DC91300004B90219792474103010CD2079C080C03BF969B019607080C@mchsi.com> John, It can be as easy as copying the new .NET exe file to the user computers, overwriting the old version. This is how I handle upgrades and bug fixes in my shop, and it works fine. I was also amazed at the sparse information available on deployment. I couldn't find anything substantial or truly useful when I was exploring these issues some time back. Finally, I reasoned that all an installer really does is: *copy the needed files to the target machine *register any library files as needed *set up any necessary directory structures *add any necessary registry entries *create icons The installer built in to VS is not particularly intuitive to use if you want to do anything fancy, even though it appears to have a fair amount of power if you know how to harness it; there is very little useful documentation on how to anything that I have been able to find. But what I have found is that once the initial install is done, unless you need to add additional library files that must be registered on the user system, upgrades can be done by simply copying the new .exe file over the old version on the user machine. One caveat, if you want to upgrade in this manner you can not use the built-in auto-increment versioning because the internal version of the .exe file is registered on the system and replacing the file with one that has a different internal version will cause it to fail. I work in a relatively small shop, with responsibility for 19 users and direct access to all machines. The path of least resistance for me is to stick the new version out on a common location on one of the servers, then go to each workstation and simply copy the new version over the old. However, in the past I have used a DOS batch file with a shortcut on each desktop, and notified everyone by email to run the upgrade; that also works, if your users are responsible enough to follow instructions. We've also discussed having upgrades performed on each machine reboot, checking for new versions and copying only if a new version exists; that would work because we mandate that all machines except mine (I occasionally have to remote in) are turned off at night, and my machine is irrelevant because it is the development machine. Don't know if this helped at all, but I guess the real point is that there are many ways to get this accomplished and it needn't be a huge hassle. Ron ps to all you book-writing gurus out there: I'd say that the world is way ready for a good solid and *usable* book on deployment. > Incredibly, application distribution is a subject that is not much in the > news. I googled around trying to find out "the how" and there is not a lot > out there. My books do not even have the word "deployment" in the index. > Simply incredible. > > I work on a computer at my office. I want to install the application on a > server at my client. What do I do? Apparently there is a "project" that > wraps the project that is to be installed that builds an installer (MSA?). > That is fine, except that the installation onto the server may or may not be > the end of the subject. > > Some things may be a server based application, the server actually runs the > application. This would be things like an application that watches an FTP > directory, when files appear they are downloaded to the local hard disk, > unzipped / unencrypted and then the files are imported to the database. > Likewise an application (in fact very likely the SAME application) pulls > data out of the database, encrypts / zips it and uploads it to an FTP > directory somewhere. > > With other things, the movement to the server is just the first step. From > there, the user needs to execute the application, i.e. needs to download the > application to their desktop and run it. If there are changes then somehow > the changes need to be automatically pulled down as well. It could be > something as simple as copying the whole darned directory and all of its > subdirectories but I certainly hope not. Of course if that is not huge then > why not? So far these are little applications, as opposed to the main call > center app which is an Access FE with hundreds of tables, queries, reports, > modules and reports. > > These are applications such as the report generators that create data feeds > to the mainframes. They take a certain amount of setup - selecting product > types and date ranges before clicking the button. > > All of these applications may change on a daily / weekly basis. I am a one > man show for the client so they have a huge list of "things to do" which > include but are not limited to these applets, and of course there are bug > fixes. Each of these things may get a new report this week, a fix to some > specific field today and so forth. Updates are relatively easy with Access > since it is at most a library mda and the fe. > > How do I do all this in vb.net? I need to be able to make changes and push > it out whenever it is ready, quickly and conveniently. And of course I > often times remote in and work local to the machine because it saves the > hassle of the FTP up / down to get things back and forth. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:55 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > There were certainly security issues in VS 2003 but I'm under the impression > they've been dealt with in 2005 but this is M$ we're talking about. > > > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Friday, April 27, 2007 8:40 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > I read about that on the internet last night, and it looks like it might be > a viable method. I also read that it has some issues, particularly in the > presence of different versions of the .Net framework on the desktop, and > also IIRC something about security issues and what the app is allowed to do. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:31 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > ClickOnce is the technology I was referring to. > > > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:00 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > John, > > If you mean how are you going to get updates to users you should look at > "smart client" applications where the client is aware of changes and > downloads them from a central location before the app starts. I don't have > much experience with it but I expect I will soon as we're moving a major > client/server app to .NET this year. > > > Jim DeMarco > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Thursday, April 26, 2007 10:51 PM > To: 'Access Developers discussion and problem solving'; > dba-vb at databaseadvisors.com > Subject: [dba-VB] Deploying .net solutions > > I have a bunch of processes that are not particularly suited to Access for > one reason or another. These include things like > > * doing what I call "directory watching" and performing some action when a > file appears. > * FTP transfers between local drives and FTP sites > * Building complex data feeds between a database and a remote mainframe > > To take an example, I regularly build data feeds which look like: > > Header Rec > Detail Rec > Detail Rec > Detail Rec > . > . > Trailer Rec > > The header rec has some specific set of data in it such as who it is coming > from, the date of the file etc. > > The detail recs have repetitive data such as payments to clients, payment > dates, from/to dates that the payment is for, the amount, the check number > etc. > > The footer rec has some specific data in it such as the number of checks, > the bank account number that the checks are drawn against etc. > > I have built a report generator in VBA, inside of access, and it works, but > it is really rather patchwork by nature. I have to reference specific libs, > go outside of VBA to handle things like the file system and text streams (in > an object oriented manner) and so forth. There are no threads so a single > error can hang the system, and things that should happen in parallel have to > happen sequentially. > > So, I would like to take one of these systems and move it to .Net. What I > am trying to discover is how .Net systems are (reliably) deployed to the > desktop. Often times these applets are used by more than one person, often > at the same time. At the moment, because they are Access / vba based, I > just do a copy down to the desktop (a single file) and open the mdb. A form > opens and the user goes to work. These applets are under constant > development, literally daily as I finish one report another is started. Bug > fixes are done. > > I assume (but am not sure) that a VB.Net applet would be distributed as > well, downloaded to the desktop and run from there. What is the vehicle for > this distribution? > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > 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 chizotz at mchsi.com Fri Apr 27 11:47:42 2007 From: chizotz at mchsi.com (Ron Allen) Date: Fri, 27 Apr 2007 16:47:42 +0000 Subject: [dba-VB] [AccessD] Dot Net, where to start? Message-ID: <042720071647.4471.4632292E000BDC6500001177219792474103010CD2079C080C03BF969B019607080C@mchsi.com> Gustav, We use (shudder) Crystal Reports. Crystal is bug-ridden, or perhaps I should say bug-riddled, and although they fix seemingly thousands of bugs between versions (at least according to their lists of changes), they never seem to bother to fix many basic problems. There are many bugs in Crystal that have been around so long (years) that long-time Crystal developers tend to think of them as "quirky features" rather than the maddening bugs they actually are. That said, overall Crystal does a good job and, in truth, is far more powerful than Access as a reporting tool. And despite it's obscene cost, it's cheaper than most other solutions. I haven't looked at the reporting tool in 2005 yet, but the version I looked at a couple of years ago was not at all intuitive, not nearly as powerful as Crystal, and had many problems of it's own. Ron > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Friday, April 27, 2007 10:10 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Dot Net, where to start? > > Hi all > > It seems to be the time for me to get into the Dot Net stuff. But where to > start? > The only books on Access I've ever had are the original references and > handbooks for Access 1 and 2 and the Application Development book for Access > 97 so I'm reluctant to buy books - I just don't have the patience ... > > In the Action Pack - which we subscribe to - I've noticed two discs for VS > 2005 Express, "Corbis Image Disc" and "Getting Started". Are these tutorials > worth the effort to study? > > I browsed our vb list archive, which I don't subsribe to, and traffic seems > to be low, so where to discuss Dot Net matters at the same level as we > discuss Access here? > > One thing I think I've understood is that report design in VS is poor and > third party tools or Report Design Service of SQL Server 2005 are to be > preferred if you need reports on a level that match that of Access. > > Of course, my main interest is anything related to databases - pure web > development is second, and game development won't come into play. > Any advice will be greatly appreciated. > > /gustav From jwcolby at colbyconsulting.com Fri Apr 27 15:33:27 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 16:33:27 -0400 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: References: Message-ID: <011901c7890b$504911c0$657aa8c0@m6805> In playing around with the VB Express I discovered that you can reference an Access FE in a dataset. Doing that allows you to see not only all linked tables, but also all of the queries in the FE. Theoretically this will allow me to build, save and use queries there where I am comfortable until such time as you guys teach me how to build queries inside of VB.Net One thing I am still struggling to figure out is how to move a table from an MDB to SQL Server Express. I have one specific table which is causing heartaches in Access. It uses memo fields and there are LOTS of "locking issues" when users are trying to edit / add these memos. This is a key table, where the user adds dated notes about the claim, so users are in there viewing old notes and adding new notes about phone conversations and other stuff. Microsoft's party line is that these locking issues are often caused by the way memos are stored in pages on the disk and how JET locks these pages during edits. Thus I believe (hope, pray) that if I move that table out to SQL Server the locking issues will go away since SQL Server handles such things entirely differently. A related benefit is that the BE will slim down considerably. These memos constitute well over 250 megabytes of data in a (consolidated) 700 mbyte BE. I could of course simply build the table by hand but I would really like to "just move it", data and all. John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Fri Apr 27 15:51:59 2007 From: ebarro at verizon.net (Eric Barro) Date: Fri, 27 Apr 2007 13:51:59 -0700 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: <011901c7890b$504911c0$657aa8c0@m6805> Message-ID: <0JH600LNFCMY68YE@vms048.mailsrvcs.net> Using SQL Management Studio you connect to your SQL Express database where you want the tables to live and then right click the database name and select Tasks->Import Data from the drop down menu. After you select the data source (Microsoft Access) and the file location for the source and the SQL database for the destination, it will create the tables for you. You might have to check indexes and copy and paste your queries (views in SQL). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 1:33 PM To: 'Access Developers discussion and problem solving' Cc: dba-vb at databaseadvisors.com Subject: Re: [AccessD] Dot Net, where to start? In playing around with the VB Express I discovered that you can reference an Access FE in a dataset. Doing that allows you to see not only all linked tables, but also all of the queries in the FE. Theoretically this will allow me to build, save and use queries there where I am comfortable until such time as you guys teach me how to build queries inside of VB.Net One thing I am still struggling to figure out is how to move a table from an MDB to SQL Server Express. I have one specific table which is causing heartaches in Access. It uses memo fields and there are LOTS of "locking issues" when users are trying to edit / add these memos. This is a key table, where the user adds dated notes about the claim, so users are in there viewing old notes and adding new notes about phone conversations and other stuff. Microsoft's party line is that these locking issues are often caused by the way memos are stored in pages on the disk and how JET locks these pages during edits. Thus I believe (hope, pray) that if I move that table out to SQL Server the locking issues will go away since SQL Server handles such things entirely differently. A related benefit is that the BE will slim down considerably. These memos constitute well over 250 megabytes of data in a (consolidated) 700 mbyte BE. I could of course simply build the table by hand but I would really like to "just move it", data and all. John W. Colby Colby Consulting www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 3:23 PM From ridermark at gmail.com Fri Apr 27 16:33:40 2007 From: ridermark at gmail.com (Mark Rider) Date: Fri, 27 Apr 2007 16:33:40 -0500 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: <0JH600LNFCMY68YE@vms048.mailsrvcs.net> References: <011901c7890b$504911c0$657aa8c0@m6805> <0JH600LNFCMY68YE@vms048.mailsrvcs.net> Message-ID: SQL Server 2005 Express Manager does not offer Import/Export functionality as it is dependent on SQL Server Integration Services (SSIS) and SQL Server Agent. You will need to obtain the full version of SQL Server Management Studio. See the thread at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=157773&SiteId=1 On 4/27/07, Eric Barro wrote: > Using SQL Management Studio you connect to your SQL Express database where > you want the tables to live and then right click the database name and > select Tasks->Import Data from the drop down menu. -- Mark Rider http://dfwmdug.org Don't anthropomorphize computers. They don't like it. From jwcolby at colbyconsulting.com Fri Apr 27 18:45:34 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 19:45:34 -0400 Subject: [dba-VB] Moving your table to SQL Server In-Reply-To: <7d60f23a0704271348k215adach120403fbf818efef@mail.gmail.com> References: <7d60f23a0704271348k215adach120403fbf818efef@mail.gmail.com> Message-ID: <012301c78926$274def50$657aa8c0@m6805> Martin, Really it is just a matter of "how do you do it". I am the kind of person who needs to know the "how it is done" so that I can do it the next time. In SQL Server 2005 Standard Edition there is a wizard that I use but it pretty much sucks (at least how I have used it). Data types are lost, indexes are lost etc. HOLY SMOKE batman! I just ran the SQL Server Migration Assistant for Access and it WORKED! I imported my entire billing database into SQL Server Express. The wizard would not "find" the SQL Server Express database, but if I typed it in "m6805\SQLExpress" it found it. I went out there in advance and created the database itself (no tables). I am IMPRESSED!!! I am actually using my billing database hooked to SQL Server expressed now! WOW! John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Apr 27 23:42:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 00:42:44 -0400 Subject: [dba-VB] VB.Net - UnhandledException Message-ID: <012601c7894f$b023b3e0$657aa8c0@m6805> I am reading about the top level "unhandled exception" error handler. This makes me wonder what the experienced .Net developers do for logging errors. Is there already an error logger object somewhere in the bowels of this beast? If so how is it used? I would dearly love to log all errors that I don't explicitly handle and even some that I do explicitly handle. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Apr 28 00:34:35 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 01:34:35 -0400 Subject: [dba-VB] Combo box Message-ID: <012b01c78956$ec798c50$657aa8c0@m6805> I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Apr 28 01:05:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 02:05:44 -0400 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <013001c7895b$44be7430$657aa8c0@m6805> Many years ago I designed (in Access) a text box / list box pair of controls to emulate a combo box. The idea was to take each character in the text box and use the characters to narrow down the remaining values displayed in the list. IOW filter a query over and over as more characters were typed in the text box. In order to make it look like a combo, I created a list box, positioned it under the text box, shrank the vertical size up to a single line and the width to the same width as the text box. When the user clicked in the text box I dropped down the list (expanded it vertically and horizontally) and displayed the entire list. As the user typed characters I requeried the list, with fewer and fewer remaining records being displayed. If the user deleted characters I also requeried the list. When the user had selected the correct data and left the text box, the OnExit resized the list to a single line / same width as the text box. It worked quite well. Do you think a strategy such as this could be used to implement an "access type" combo box substitute. It wasn't an exact duplicate of the combo functionality but it did work and was easy to implement. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 1:35 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ebarro at verizon.net Sat Apr 28 01:14:24 2007 From: ebarro at verizon.net (Eric Barro) Date: Fri, 27 Apr 2007 23:14:24 -0700 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> This is my snippet of code should give you an idea...it is however in C# and specific to ASP.NET (web-based). It should be fairly easy to port it over to VB.NET and change a couple of lines to be Win32 specific. The function is a public method stored in my Data class... public static int BindDropDownList(DropDownList ddl, string sql, string sqlConnect, Hashtable sqlParameters, string ddlTextField, string ddlValueField, bool showDefaultSelection) { DataSet sqlDs; //count of records returned int totalRecords; //grab the connection string string ConnectionString = ConfigurationSettings.AppSettings.Get(sqlConnect); //define and initialize the connection object SqlConnection sqlConn = new SqlConnection(ConnectionString); //define and initialize the command object SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); //define the command type sqlCmd.CommandType = CommandType.StoredProcedure; if (sqlParameters.Count > 0) { //get a collection of the keys ICollection sqlParams = sqlParameters.Keys; foreach (string key in sqlParams) { // add parameters to pass to the sproc sqlCmd.Parameters.Add(new SqlParameter(key, sqlParameters[key].ToString())); } } //open the connection sqlConn.Open(); //define the data adapter SqlDataAdapter sqlDa = new SqlDataAdapter(); //define the select command sqlDa.SelectCommand = sqlCmd; //initialize the dataset sqlDs = new DataSet("MyList"); //fill the dataset sqlDa.Fill(sqlDs, "MyList"); //define a session variable containing our dataset System.Web.HttpContext.Current.Session["MyList"] = sqlDs; //grab the total number of records returned by the sproc totalRecords = sqlDs.Tables[0].Rows.Count; if (totalRecords > 0) { if (showDefaultSelection) { DataRow newListRow = sqlDs.Tables[0].NewRow(); //this is the value that shows on the dropdownlist //specify an option that will be the default selection newListRow[ddlTextField] = "--Please select one--"; //this is the value that will be posted to the database newListRow[ddlValueField] = 0; //add the new row sqlDs.Tables[0].Rows.Add(newListRow); //specify a sort order based on ddlValueField; this ensures that the newly added row will show up at the top sqlDs.Tables[0].DefaultView.Sort = ddlValueField; } //close the connection ddl.DataSource = sqlDs.Tables[0].DefaultView; ddl.DataTextField = ddlTextField; ddl.DataValueField = ddlValueField; ddl.DataBind(); sqlConn.Close(); } return totalRecords; } //end BindDropDownList This is how I call it... Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, "ZipCity", "ZipCode", true); ZipCity is what I use to display in the dropdownlist and ZipCode is what I use to lookup and store values. I believe this is referred to as DisplayMember and ValueMember in Win32 comboboxes. In my SQL stored procedure I simply make sure that ZipCity is concatenated with whatever value I want to show in the dropdownlist. -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 10:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 3:23 PM From wdhindman at dejpolsystems.com Sat Apr 28 01:55:48 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Sat, 28 Apr 2007 02:55:48 -0400 Subject: [dba-VB] Combo box References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> Message-ID: <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. > > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Friday, April 27, 2007 10:35 PM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Combo box > > I am running into the issue of how to display multiple lines in a combo > box. > IIRC this is a "no can do" in the combos in VB.Net but there must be > common > workarounds. > > For example I need to allow the user to select a zip code, but he really > needs to see the zip AND the city. Furthermore my code is going to need > to > load a record based on that zip code to get lat/long. > > So, is there a way other than using a concatenation of the zip and the > city > to display both in the combo? If I do a concatenation, then I can no > longer > use the zip to lookup a record in a recordset since it now has city data > in > the string. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 > 3:23 PM > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From mjrobertson at iinet.net.au Sat Apr 28 02:31:08 2007 From: mjrobertson at iinet.net.au (Mike) Date: Sat, 28 Apr 2007 17:31:08 +1000 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <000001c78967$30cf3070$0600a8c0@D3NSLB1S> John, This was a very annoying issue when I started the move to .NET Apart from buying custom controls, the only way I found to reproduce multi-column combo/list boxes was to use a datagrid. Individual elements of the datagrid can then be accessed when a row or cell is selected. Regards, Mike Robertson -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, 28 April 2007 3:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/777 - Release Date: 26/04/2007 3:23 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/777 - Release Date: 26/04/2007 3:23 PM From jwcolby at colbyconsulting.com Sat Apr 28 07:07:41 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 08:07:41 -0400 Subject: [dba-VB] Combo box In-Reply-To: <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> Message-ID: <013401c7898d$d5881d90$657aa8c0@m6805> LOL, and it only gets better (worse). John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Saturday, April 28, 2007 2:56 AM To: ebarro at verizon.net; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. From jwcolby at colbyconsulting.com Sat Apr 28 08:58:42 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 09:58:42 -0400 Subject: [dba-VB] Moving through an ADO recordset Message-ID: <013501c7899d$57d0f010$657aa8c0@m6805> In Access (because I was a DAO kinda guy) for smallish recordsets I would often create a class to hold a record (properties for each field I needed to work with) and a class to hold a collection of these classes. I would then read the data out into the record class instances, storing each record class instance in a collection in a "table" class. For example, I have an application already built in Access which calculates the population in all the zips which fall within a radius around a zip code. My brute force approach was to read about 42 thousand records from a table of zip codes, pulling just the zip, city, lat, long, population and house hold count. I would then store each record in a zip class instance which has a property for each of those fields in the record. The ZIPS (plural) class has a collection to hold the zip (singular) class. The ZIPS class opens the recordset and enters a loop creating zip class instances and passing the recordset off to the zip class instance which loads the fields into the properties, and on return the ZIPS class stores the populated zip class instance into a collection. Once loaded I have 42K zip class instances in a collection in a ZIPS class, keyed on the zipcode. Having done that I can now ask the user for a zip code and a radius. Using a formula which calculates the distance between two points (lat/long) I iterate through each and every zip class in the ZIPS collection storing in an "InRadius" collection all the zip classes where the distance between the user supplied zip's lat / long and the zip class being evaluated is less than the radius. Having done that, when I have examined every zip class in the big zip collection, I now have a collection containing pointers to only those zips within the radius. I now iterate that collection adding up the populations and house hold count of each zip class and display it in text boxes in the calculator form. It is a trivial application to write and other than the initial load of the zip classes from the recordset is pretty darned fast to calc the populations - of course depending on the radius. As an exercise in .Net I decided to port that application. There is one huge difference however, DAO is gone and I am faced with the ADO object (s) etc. The upside is that the ADO widget is actually a "disconnected" recordset, i.e. it reads it all into memory for me. This is a "read only" recordset, i.e. I am not updating records and writing them back to the table. This leads me to question whether it makes any sense to do the Zip/ZIPS class thing or just sweep through the ADO recordset itself. Are there record objects? Could I run directly through the recordset pulling pointers to record objects and storing those pointers in my collection? Could I add a field to my recordset called selected and sweep through the ADO recordset setting the SELECTED flag in each record that is within the radius, and then just apply a filter to the ADO recordset to "pull out" only the SELECTED records to sum them? And importantly, if doing it this way is possible, is it faster or slower than iterating my own collection? I would have to clear a selected flag between uses whereas a collection is just re-dimed to empty it and get it ready to fill again. Moving from one tool to another means re-examining the method used to ensure that it is still an efficient method in the new tool. Does anyone have any experience in iterating a ADO recordset in this manner? John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Sat Apr 28 09:41:17 2007 From: ebarro at verizon.net (Eric Barro) Date: Sat, 28 Apr 2007 07:41:17 -0700 Subject: [dba-VB] Moving through an ADO recordset In-Reply-To: <013501c7899d$57d0f010$657aa8c0@m6805> Message-ID: <0JH700CZ1Q4UL2A3@vms046.mailsrvcs.net> In ADO.NET you can mirror your database in datasets. Datasets are different from recordsets in that they are more similar to database containers. Recordsets in DAO are the table equivalents in ADO.NET. Thus, in one dataset object you can have multiple tables contained inside that dataset. You can define relations between those tables and you can perform filtering, sorting and yes update the records in the Dataset. The approach I have taken in .NET is to connect to the database and retrieve records from a table and fill a table object in a dataset object. I can then return the dataset object to my app or return a single table. I use collections such as Hashtables and Arraylists to iterate through the records. Here's a link that explains datasets in ADO.NET http://builder.com.com/5100-6388-1050109-2.html -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 6:59 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Moving through an ADO recordset In Access (because I was a DAO kinda guy) for smallish recordsets I would often create a class to hold a record (properties for each field I needed to work with) and a class to hold a collection of these classes. I would then read the data out into the record class instances, storing each record class instance in a collection in a "table" class. For example, I have an application already built in Access which calculates the population in all the zips which fall within a radius around a zip code. My brute force approach was to read about 42 thousand records from a table of zip codes, pulling just the zip, city, lat, long, population and house hold count. I would then store each record in a zip class instance which has a property for each of those fields in the record. The ZIPS (plural) class has a collection to hold the zip (singular) class. The ZIPS class opens the recordset and enters a loop creating zip class instances and passing the recordset off to the zip class instance which loads the fields into the properties, and on return the ZIPS class stores the populated zip class instance into a collection. Once loaded I have 42K zip class instances in a collection in a ZIPS class, keyed on the zipcode. Having done that I can now ask the user for a zip code and a radius. Using a formula which calculates the distance between two points (lat/long) I iterate through each and every zip class in the ZIPS collection storing in an "InRadius" collection all the zip classes where the distance between the user supplied zip's lat / long and the zip class being evaluated is less than the radius. Having done that, when I have examined every zip class in the big zip collection, I now have a collection containing pointers to only those zips within the radius. I now iterate that collection adding up the populations and house hold count of each zip class and display it in text boxes in the calculator form. It is a trivial application to write and other than the initial load of the zip classes from the recordset is pretty darned fast to calc the populations - of course depending on the radius. As an exercise in .Net I decided to port that application. There is one huge difference however, DAO is gone and I am faced with the ADO object (s) etc. The upside is that the ADO widget is actually a "disconnected" recordset, i.e. it reads it all into memory for me. This is a "read only" recordset, i.e. I am not updating records and writing them back to the table. This leads me to question whether it makes any sense to do the Zip/ZIPS class thing or just sweep through the ADO recordset itself. Are there record objects? Could I run directly through the recordset pulling pointers to record objects and storing those pointers in my collection? Could I add a field to my recordset called selected and sweep through the ADO recordset setting the SELECTED flag in each record that is within the radius, and then just apply a filter to the ADO recordset to "pull out" only the SELECTED records to sum them? And importantly, if doing it this way is possible, is it faster or slower than iterating my own collection? I would have to clear a selected flag between uses whereas a collection is just re-dimed to empty it and get it ready to fill again. Moving from one tool to another means re-examining the method used to ensure that it is still an efficient method in the new tool. Does anyone have any experience in iterating a ADO recordset in this manner? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/778 - Release Date: 4/27/2007 1:39 PM From bheid at sc.rr.com Sun Apr 29 17:18:07 2007 From: bheid at sc.rr.com (Bobby Heid) Date: Sun, 29 Apr 2007 18:18:07 -0400 Subject: [dba-VB] Combo box In-Reply-To: <013401c7898d$d5881d90$657aa8c0@m6805> References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> <013401c7898d$d5881d90$657aa8c0@m6805> Message-ID: <000901c78aac$4418ea40$2c01a8c0@bhxp> John, If you load a table in a dataset with all of the desired fields in it (zip & Name, zip, name, ID, etc.), then bind a binding source to the table in the dataset, then bind the combo box to the ID and the zip & name fields. When the user selects an item in the combo box, you can use something like the bindingsource.currentrow (or something like that, I can not remember the name of it right now), to get all of the data in the current row, not just what is in the combo box. So check out the binding source and see if that will give you what you need. Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 8:08 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box LOL, and it only gets better (worse). John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Saturday, April 28, 2007 2:56 AM To: ebarro at verizon.net; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Apr 30 10:49:27 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 30 Apr 2007 08:49:27 -0700 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: Combos in .Net are actually a kind of datagrid, so just binding the combo to a multicolumn source (or array or listview, etc.) should give you multiple columns. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 10:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From chizotz at mchsi.com Mon Apr 30 17:36:36 2007 From: chizotz at mchsi.com (Ron Allen) Date: Mon, 30 Apr 2007 22:36:36 +0000 Subject: [dba-VB] Combo box Message-ID: <043020072236.3859.46366F740003174200000F13219791299503010CD2079C080C03BF969B019607080C@mchsi.com> Or concatenate the information you want displayed in the dataset for the display member of the combo box, and set the value member to the field you need to use to get other data. That will easily and quickly give you a drop- down display that looks like: 63005 CHESTERFIELD 63011 BALLWIN 63012 BARNHART 63014 BERGER 63017 CHESTERFIELD 63021 BALLWIN 63025 EUREKA 63026 FENTON 63028 FESTUS 63031 FLORISSANT and will return either the zip or the city name as needed. You can also change the value member at run time to pull either the zip or the city name if that's needed; a little more work, but I don't think all that much. If that still doesn't work for you, you can create your own multiline combo box that inherits from the comboBox class. Here's a link to one example of how you might go about it: http://www.codeproject.com/cs/combobox/multicolumncombo.asp Ron > John, > > If you load a table in a dataset with all of the desired fields in it (zip & > Name, zip, name, ID, etc.), then bind a binding source to the table in the > dataset, then bind the combo box to the ID and the zip & name fields. When > the user selects an item in the combo box, you can use something like the > bindingsource.currentrow (or something like that, I can not remember the > name of it right now), to get all of the data in the current row, not just > what is in the combo box. > > So check out the binding source and see if that will give you what you need. > > Bobby > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Saturday, April 28, 2007 8:08 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Combo box > > LOL, and it only gets better (worse). > > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman > Sent: Saturday, April 28, 2007 2:56 AM > To: ebarro at verizon.net; dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Combo box > > ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, > what in the heck is the world coming to when there is no such thing as a > simple d&d combo available ...y'all give me a headache, you do ...turning > off the lights :( > > William Hindman > > ----- Original Message ----- > From: "Eric Barro" > To: > Sent: Saturday, April 28, 2007 2:14 AM > Subject: Re: [dba-VB] Combo box > > > > This is my snippet of code should give you an idea...it is however in C# > > and > > specific to ASP.NET (web-based). It should be fairly easy to port it over > > to > > VB.NET and change a couple of lines to be Win32 specific. > > > > The function is a public method stored in my Data class... > > > > public static int BindDropDownList(DropDownList ddl, > > string sql, string sqlConnect, Hashtable > > sqlParameters, > > string ddlTextField, string ddlValueField, bool > > showDefaultSelection) > > { > > DataSet sqlDs; > > > > //count of records returned > > int totalRecords; > > //grab the connection string > > string ConnectionString = > > ConfigurationSettings.AppSettings.Get(sqlConnect); > > //define and initialize the connection object > > SqlConnection sqlConn = new > > SqlConnection(ConnectionString); > > //define and initialize the command object > > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > > //define the command type > > sqlCmd.CommandType = CommandType.StoredProcedure; > > > > if (sqlParameters.Count > 0) > > { > > //get a collection of the keys > > ICollection sqlParams = sqlParameters.Keys; > > foreach (string key in sqlParams) > > { > > // add parameters to pass to the > > sproc > > sqlCmd.Parameters.Add(new > > SqlParameter(key, sqlParameters[key].ToString())); > > } > > } > > //open the connection > > sqlConn.Open(); > > //define the data adapter > > SqlDataAdapter sqlDa = new SqlDataAdapter(); > > //define the select command > > sqlDa.SelectCommand = sqlCmd; > > //initialize the dataset > > sqlDs = new DataSet("MyList"); > > //fill the dataset > > sqlDa.Fill(sqlDs, "MyList"); > > //define a session variable containing our dataset > > System.Web.HttpContext.Current.Session["MyList"] = > > sqlDs; > > //grab the total number of records returned by the > > sproc > > totalRecords = sqlDs.Tables[0].Rows.Count; > > if (totalRecords > 0) > > { > > if (showDefaultSelection) > > { > > DataRow newListRow = > > sqlDs.Tables[0].NewRow(); > > //this is the value that shows on > > the dropdownlist > > //specify an option that will be the > > default selection > > newListRow[ddlTextField] = "--Please > > select one--"; > > //this is the value that will be > > posted to the database > > newListRow[ddlValueField] = 0; > > //add the new row > > > > sqlDs.Tables[0].Rows.Add(newListRow); > > //specify a sort order based on > > ddlValueField; this ensures that the newly added row will show up at the > > top > > sqlDs.Tables[0].DefaultView.Sort = > > ddlValueField; > > } > > //close the connection > > ddl.DataSource = > > sqlDs.Tables[0].DefaultView; > > ddl.DataTextField = ddlTextField; > > ddl.DataValueField = ddlValueField; > > ddl.DataBind(); > > sqlConn.Close(); > > } > > return totalRecords; > > } //end BindDropDownList > > > > > > This is how I call it... > > > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > > "ZipCity", "ZipCode", true); > > > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > > use to lookup and store values. I believe this is referred to as > > DisplayMember and ValueMember in Win32 comboboxes. > > > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > > with whatever value I want to show in the dropdownlist. > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > 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 listmaster at databaseadvisors.com Fri Apr 6 08:40:34 2007 From: listmaster at databaseadvisors.com (Bryan Carbonnell) Date: Fri, 06 Apr 2007 09:40:34 -0400 Subject: [dba-VB] Administrivia - Server Upgrades Message-ID: <46161592.19068.306522A@listmaster.databaseadvisors.com> Hello all, I hope you are all having a good Easter Weekend and that you won't miss the lists too much. I have to do an upgrade on the server, so it will be mostly up, but at some points going down over this weekend. If, at the end of the day, you are having problems, please e-mail me at listmaster at databaseadvisors.com or IF THAT DOES NOT WORK, e-mail me at bryan at carbonnell.ca The main reason for this upgrade is for spam control. We are getting hammered at the server and I need to implement a spam control solution. Again, if you have any problems, contact me at listmaster at databaseadvisors.com or bryan at carbonnell.ca -- Bryan Carbonnell - listmaster at databaseadvisors.com From listmaster at databaseadvisors.com Fri Apr 6 19:17:16 2007 From: listmaster at databaseadvisors.com (Bryan Carbonnell) Date: Fri, 06 Apr 2007 20:17:16 -0400 Subject: [dba-VB] Administrivia - Server Upgrade Complete Message-ID: <4616AACC.16681.54D3C94@listmaster.databaseadvisors.com> Well, the server upgrade has been completed. Hopefully you didn't notice too much of a disruption through out the day today. If you run across anything out of the ordinary, please e-mail me at listmaster at databaseadvisors.com or if that does not work, bryan at carbonnell.ca -- Bryan Carbonnell - listmaster at databaseadvisors.com From Jdemarco at hudsonhealthplan.org Thu Apr 19 10:38:59 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Thu, 19 Apr 2007 11:38:59 -0400 Subject: [dba-VB] XQuery in VB 6 In-Reply-To: <200704191517.l3JFHOx19027@smarthost.yourcomms.net> References: <20070419144605.592A82B8B5C@smtp.nildram.co.uk><1C2084FD2472124AB1812A5476EA3B7A015A0E0B@msgswbmnmsp04.wellsfargo.com> <200704191517.l3JFHOx19027@smarthost.yourcomms.net> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB375@TTNEXCHSVR.hshhp.com> X-posted AccessD, VB Hello All, I've been absent for a while but an issue has just come up that I hope someone can help with. Does anyone have any VB 6 code that uses XQuery to return a set of nodes? I find plenty of XQuery examples that show the query and the returned nodes but no VB 6 implementation. Any short code snip will do. TIA, Jim DeMarco From jwcolby at colbyconsulting.com Sun Apr 22 22:56:21 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sun, 22 Apr 2007 23:56:21 -0400 Subject: [dba-VB] using a saved SSIS with VB.Net Message-ID: <000301c7855b$5c12e9d0$657aa8c0@m6805> I saved an import spec from the import wizard in SQL Server 2005. I now need to use that import spec in VB.Net, but I need to modify it. I need to change the source file, make it an append instead of a make table / append, and I need to modify the datatype from NVarchar to varchar. Of course I can simply go back in to SQL Server and run the import wizard again, however this is a fixed width file which means recreating all of the field name / field width info a second time. Is it possible to just do these mods on the existing import spec or should I just bite the bullet and rebuild. I have ~ sixty more files to import into the table and I really don't want to do this 60 times. The last time I did this I actually built an Access app to create .csv files from the original fixed width files. It seems like the long way around the barn but then again I do not see how this wizard is really very useful in this case. Anyone? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Thu Apr 26 21:51:19 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Thu, 26 Apr 2007 22:51:19 -0400 Subject: [dba-VB] Deploying .net solutions Message-ID: <00bd01c78876$f00d7240$657aa8c0@m6805> I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Thu Apr 26 22:12:11 2007 From: ebarro at verizon.net (Eric Barro) Date: Thu, 26 Apr 2007 20:12:11 -0700 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00bd01c78876$f00d7240$657aa8c0@m6805> Message-ID: <0JH400FF1ZK97U33@vms040.mailsrvcs.net> .NET desktop apps are no different from any non .NET app. You have several options such as creating a setup or .MSI project for your application. Or you can have the app check for updates everytime it starts http://windowsforms.net/articles/appupdater.aspx -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 7:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/776 - Release Date: 4/25/2007 12:19 PM From Jdemarco at hudsonhealthplan.org Fri Apr 27 06:59:41 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 07:59:41 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00bd01c78876$f00d7240$657aa8c0@m6805> References: <00bd01c78876$f00d7240$657aa8c0@m6805> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Fri Apr 27 07:31:22 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 08:31:22 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805> <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 07:39:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 08:39:44 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> Message-ID: <00d601c788c9$22beeb90$657aa8c0@m6805> I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Fri Apr 27 07:55:10 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 08:55:10 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00d601c788c9$22beeb90$657aa8c0@m6805> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com><0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> <00d601c788c9$22beeb90$657aa8c0@m6805> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> There were certainly security issues in VS 2003 but I'm under the impression they've been dealt with in 2005 but this is M$ we're talking about. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 8:40 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 08:34:32 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 09:34:32 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com><0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com><00d601c788c9$22beeb90$657aa8c0@m6805> <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> Message-ID: <00da01c788d0$ca6f37d0$657aa8c0@m6805> Incredibly, application distribution is a subject that is not much in the news. I googled around trying to find out "the how" and there is not a lot out there. My books do not even have the word "deployment" in the index. Simply incredible. I work on a computer at my office. I want to install the application on a server at my client. What do I do? Apparently there is a "project" that wraps the project that is to be installed that builds an installer (MSA?). That is fine, except that the installation onto the server may or may not be the end of the subject. Some things may be a server based application, the server actually runs the application. This would be things like an application that watches an FTP directory, when files appear they are downloaded to the local hard disk, unzipped / unencrypted and then the files are imported to the database. Likewise an application (in fact very likely the SAME application) pulls data out of the database, encrypts / zips it and uploads it to an FTP directory somewhere. With other things, the movement to the server is just the first step. From there, the user needs to execute the application, i.e. needs to download the application to their desktop and run it. If there are changes then somehow the changes need to be automatically pulled down as well. It could be something as simple as copying the whole darned directory and all of its subdirectories but I certainly hope not. Of course if that is not huge then why not? So far these are little applications, as opposed to the main call center app which is an Access FE with hundreds of tables, queries, reports, modules and reports. These are applications such as the report generators that create data feeds to the mainframes. They take a certain amount of setup - selecting product types and date ranges before clicking the button. All of these applications may change on a daily / weekly basis. I am a one man show for the client so they have a huge list of "things to do" which include but are not limited to these applets, and of course there are bug fixes. Each of these things may get a new report this week, a fix to some specific field today and so forth. Updates are relatively easy with Access since it is at most a library mda and the fe. How do I do all this in vb.net? I need to be able to make changes and push it out whenever it is ready, quickly and conveniently. And of course I often times remote in and work local to the machine because it saves the hassle of the FTP up / down to get things back and forth. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:55 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions There were certainly security issues in VS 2003 but I'm under the impression they've been dealt with in 2005 but this is M$ we're talking about. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 8:40 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 09:30:17 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 10:30:17 -0400 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: References: Message-ID: <00f101c788d8$946eeec0$657aa8c0@m6805> Gustav, I am at the same place. I own a copy of VS2005 and SQL Server 2005 (got it at the coming out party) so I can go there if I wish. I have it installed and have played with it quite a bit over the last two years or so. I am actually considering working in the VB.Net express until I come up to speed on that, then make the move to VS2005. The express stuff is free and provides all the functionality that I can understand for the moment anyway. Once I get that down, then I will be ready to learn the stuff that the express versions do not provide. As for reporting, that is a show stopper, especially when you come from Access which is one of the better report generators out there. I am actually considering simply using automation to continue using Access as a report generator for the moment. Again, once I come up to speed on the .Net stuff, then I can re-examine my options. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Friday, April 27, 2007 10:10 AM To: accessd at databaseadvisors.com Subject: [AccessD] Dot Net, where to start? Hi all It seems to be the time for me to get into the Dot Net stuff. But where to start? The only books on Access I've ever had are the original references and handbooks for Access 1 and 2 and the Application Development book for Access 97 so I'm reluctant to buy books - I just don't have the patience ... In the Action Pack - which we subscribe to - I've noticed two discs for VS 2005 Express, "Corbis Image Disc" and "Getting Started". Are these tutorials worth the effort to study? I browsed our vb list archive, which I don't subsribe to, and traffic seems to be low, so where to discuss Dot Net matters at the same level as we discuss Access here? One thing I think I've understood is that report design in VS is poor and third party tools or Report Design Service of SQL Server 2005 are to be preferred if you need reports on a level that match that of Access. Of course, my main interest is anything related to databases - pure web development is second, and game development won't come into play. Any advice will be greatly appreciated. /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From chizotz at mchsi.com Fri Apr 27 11:29:34 2007 From: chizotz at mchsi.com (Ron Allen) Date: Fri, 27 Apr 2007 16:29:34 +0000 Subject: [dba-VB] Deploying .net solutions Message-ID: <042720071629.19344.463224ED000DC91300004B90219792474103010CD2079C080C03BF969B019607080C@mchsi.com> John, It can be as easy as copying the new .NET exe file to the user computers, overwriting the old version. This is how I handle upgrades and bug fixes in my shop, and it works fine. I was also amazed at the sparse information available on deployment. I couldn't find anything substantial or truly useful when I was exploring these issues some time back. Finally, I reasoned that all an installer really does is: *copy the needed files to the target machine *register any library files as needed *set up any necessary directory structures *add any necessary registry entries *create icons The installer built in to VS is not particularly intuitive to use if you want to do anything fancy, even though it appears to have a fair amount of power if you know how to harness it; there is very little useful documentation on how to anything that I have been able to find. But what I have found is that once the initial install is done, unless you need to add additional library files that must be registered on the user system, upgrades can be done by simply copying the new .exe file over the old version on the user machine. One caveat, if you want to upgrade in this manner you can not use the built-in auto-increment versioning because the internal version of the .exe file is registered on the system and replacing the file with one that has a different internal version will cause it to fail. I work in a relatively small shop, with responsibility for 19 users and direct access to all machines. The path of least resistance for me is to stick the new version out on a common location on one of the servers, then go to each workstation and simply copy the new version over the old. However, in the past I have used a DOS batch file with a shortcut on each desktop, and notified everyone by email to run the upgrade; that also works, if your users are responsible enough to follow instructions. We've also discussed having upgrades performed on each machine reboot, checking for new versions and copying only if a new version exists; that would work because we mandate that all machines except mine (I occasionally have to remote in) are turned off at night, and my machine is irrelevant because it is the development machine. Don't know if this helped at all, but I guess the real point is that there are many ways to get this accomplished and it needn't be a huge hassle. Ron ps to all you book-writing gurus out there: I'd say that the world is way ready for a good solid and *usable* book on deployment. > Incredibly, application distribution is a subject that is not much in the > news. I googled around trying to find out "the how" and there is not a lot > out there. My books do not even have the word "deployment" in the index. > Simply incredible. > > I work on a computer at my office. I want to install the application on a > server at my client. What do I do? Apparently there is a "project" that > wraps the project that is to be installed that builds an installer (MSA?). > That is fine, except that the installation onto the server may or may not be > the end of the subject. > > Some things may be a server based application, the server actually runs the > application. This would be things like an application that watches an FTP > directory, when files appear they are downloaded to the local hard disk, > unzipped / unencrypted and then the files are imported to the database. > Likewise an application (in fact very likely the SAME application) pulls > data out of the database, encrypts / zips it and uploads it to an FTP > directory somewhere. > > With other things, the movement to the server is just the first step. From > there, the user needs to execute the application, i.e. needs to download the > application to their desktop and run it. If there are changes then somehow > the changes need to be automatically pulled down as well. It could be > something as simple as copying the whole darned directory and all of its > subdirectories but I certainly hope not. Of course if that is not huge then > why not? So far these are little applications, as opposed to the main call > center app which is an Access FE with hundreds of tables, queries, reports, > modules and reports. > > These are applications such as the report generators that create data feeds > to the mainframes. They take a certain amount of setup - selecting product > types and date ranges before clicking the button. > > All of these applications may change on a daily / weekly basis. I am a one > man show for the client so they have a huge list of "things to do" which > include but are not limited to these applets, and of course there are bug > fixes. Each of these things may get a new report this week, a fix to some > specific field today and so forth. Updates are relatively easy with Access > since it is at most a library mda and the fe. > > How do I do all this in vb.net? I need to be able to make changes and push > it out whenever it is ready, quickly and conveniently. And of course I > often times remote in and work local to the machine because it saves the > hassle of the FTP up / down to get things back and forth. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:55 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > There were certainly security issues in VS 2003 but I'm under the impression > they've been dealt with in 2005 but this is M$ we're talking about. > > > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Friday, April 27, 2007 8:40 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > I read about that on the internet last night, and it looks like it might be > a viable method. I also read that it has some issues, particularly in the > presence of different versions of the .Net framework on the desktop, and > also IIRC something about security issues and what the app is allowed to do. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:31 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > ClickOnce is the technology I was referring to. > > > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:00 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > John, > > If you mean how are you going to get updates to users you should look at > "smart client" applications where the client is aware of changes and > downloads them from a central location before the app starts. I don't have > much experience with it but I expect I will soon as we're moving a major > client/server app to .NET this year. > > > Jim DeMarco > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Thursday, April 26, 2007 10:51 PM > To: 'Access Developers discussion and problem solving'; > dba-vb at databaseadvisors.com > Subject: [dba-VB] Deploying .net solutions > > I have a bunch of processes that are not particularly suited to Access for > one reason or another. These include things like > > * doing what I call "directory watching" and performing some action when a > file appears. > * FTP transfers between local drives and FTP sites > * Building complex data feeds between a database and a remote mainframe > > To take an example, I regularly build data feeds which look like: > > Header Rec > Detail Rec > Detail Rec > Detail Rec > . > . > Trailer Rec > > The header rec has some specific set of data in it such as who it is coming > from, the date of the file etc. > > The detail recs have repetitive data such as payments to clients, payment > dates, from/to dates that the payment is for, the amount, the check number > etc. > > The footer rec has some specific data in it such as the number of checks, > the bank account number that the checks are drawn against etc. > > I have built a report generator in VBA, inside of access, and it works, but > it is really rather patchwork by nature. I have to reference specific libs, > go outside of VBA to handle things like the file system and text streams (in > an object oriented manner) and so forth. There are no threads so a single > error can hang the system, and things that should happen in parallel have to > happen sequentially. > > So, I would like to take one of these systems and move it to .Net. What I > am trying to discover is how .Net systems are (reliably) deployed to the > desktop. Often times these applets are used by more than one person, often > at the same time. At the moment, because they are Access / vba based, I > just do a copy down to the desktop (a single file) and open the mdb. A form > opens and the user goes to work. These applets are under constant > development, literally daily as I finish one report another is started. Bug > fixes are done. > > I assume (but am not sure) that a VB.Net applet would be distributed as > well, downloaded to the desktop and run from there. What is the vehicle for > this distribution? > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > 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 chizotz at mchsi.com Fri Apr 27 11:47:42 2007 From: chizotz at mchsi.com (Ron Allen) Date: Fri, 27 Apr 2007 16:47:42 +0000 Subject: [dba-VB] [AccessD] Dot Net, where to start? Message-ID: <042720071647.4471.4632292E000BDC6500001177219792474103010CD2079C080C03BF969B019607080C@mchsi.com> Gustav, We use (shudder) Crystal Reports. Crystal is bug-ridden, or perhaps I should say bug-riddled, and although they fix seemingly thousands of bugs between versions (at least according to their lists of changes), they never seem to bother to fix many basic problems. There are many bugs in Crystal that have been around so long (years) that long-time Crystal developers tend to think of them as "quirky features" rather than the maddening bugs they actually are. That said, overall Crystal does a good job and, in truth, is far more powerful than Access as a reporting tool. And despite it's obscene cost, it's cheaper than most other solutions. I haven't looked at the reporting tool in 2005 yet, but the version I looked at a couple of years ago was not at all intuitive, not nearly as powerful as Crystal, and had many problems of it's own. Ron > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Friday, April 27, 2007 10:10 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Dot Net, where to start? > > Hi all > > It seems to be the time for me to get into the Dot Net stuff. But where to > start? > The only books on Access I've ever had are the original references and > handbooks for Access 1 and 2 and the Application Development book for Access > 97 so I'm reluctant to buy books - I just don't have the patience ... > > In the Action Pack - which we subscribe to - I've noticed two discs for VS > 2005 Express, "Corbis Image Disc" and "Getting Started". Are these tutorials > worth the effort to study? > > I browsed our vb list archive, which I don't subsribe to, and traffic seems > to be low, so where to discuss Dot Net matters at the same level as we > discuss Access here? > > One thing I think I've understood is that report design in VS is poor and > third party tools or Report Design Service of SQL Server 2005 are to be > preferred if you need reports on a level that match that of Access. > > Of course, my main interest is anything related to databases - pure web > development is second, and game development won't come into play. > Any advice will be greatly appreciated. > > /gustav From jwcolby at colbyconsulting.com Fri Apr 27 15:33:27 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 16:33:27 -0400 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: References: Message-ID: <011901c7890b$504911c0$657aa8c0@m6805> In playing around with the VB Express I discovered that you can reference an Access FE in a dataset. Doing that allows you to see not only all linked tables, but also all of the queries in the FE. Theoretically this will allow me to build, save and use queries there where I am comfortable until such time as you guys teach me how to build queries inside of VB.Net One thing I am still struggling to figure out is how to move a table from an MDB to SQL Server Express. I have one specific table which is causing heartaches in Access. It uses memo fields and there are LOTS of "locking issues" when users are trying to edit / add these memos. This is a key table, where the user adds dated notes about the claim, so users are in there viewing old notes and adding new notes about phone conversations and other stuff. Microsoft's party line is that these locking issues are often caused by the way memos are stored in pages on the disk and how JET locks these pages during edits. Thus I believe (hope, pray) that if I move that table out to SQL Server the locking issues will go away since SQL Server handles such things entirely differently. A related benefit is that the BE will slim down considerably. These memos constitute well over 250 megabytes of data in a (consolidated) 700 mbyte BE. I could of course simply build the table by hand but I would really like to "just move it", data and all. John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Fri Apr 27 15:51:59 2007 From: ebarro at verizon.net (Eric Barro) Date: Fri, 27 Apr 2007 13:51:59 -0700 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: <011901c7890b$504911c0$657aa8c0@m6805> Message-ID: <0JH600LNFCMY68YE@vms048.mailsrvcs.net> Using SQL Management Studio you connect to your SQL Express database where you want the tables to live and then right click the database name and select Tasks->Import Data from the drop down menu. After you select the data source (Microsoft Access) and the file location for the source and the SQL database for the destination, it will create the tables for you. You might have to check indexes and copy and paste your queries (views in SQL). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 1:33 PM To: 'Access Developers discussion and problem solving' Cc: dba-vb at databaseadvisors.com Subject: Re: [AccessD] Dot Net, where to start? In playing around with the VB Express I discovered that you can reference an Access FE in a dataset. Doing that allows you to see not only all linked tables, but also all of the queries in the FE. Theoretically this will allow me to build, save and use queries there where I am comfortable until such time as you guys teach me how to build queries inside of VB.Net One thing I am still struggling to figure out is how to move a table from an MDB to SQL Server Express. I have one specific table which is causing heartaches in Access. It uses memo fields and there are LOTS of "locking issues" when users are trying to edit / add these memos. This is a key table, where the user adds dated notes about the claim, so users are in there viewing old notes and adding new notes about phone conversations and other stuff. Microsoft's party line is that these locking issues are often caused by the way memos are stored in pages on the disk and how JET locks these pages during edits. Thus I believe (hope, pray) that if I move that table out to SQL Server the locking issues will go away since SQL Server handles such things entirely differently. A related benefit is that the BE will slim down considerably. These memos constitute well over 250 megabytes of data in a (consolidated) 700 mbyte BE. I could of course simply build the table by hand but I would really like to "just move it", data and all. John W. Colby Colby Consulting www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 3:23 PM From ridermark at gmail.com Fri Apr 27 16:33:40 2007 From: ridermark at gmail.com (Mark Rider) Date: Fri, 27 Apr 2007 16:33:40 -0500 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: <0JH600LNFCMY68YE@vms048.mailsrvcs.net> References: <011901c7890b$504911c0$657aa8c0@m6805> <0JH600LNFCMY68YE@vms048.mailsrvcs.net> Message-ID: SQL Server 2005 Express Manager does not offer Import/Export functionality as it is dependent on SQL Server Integration Services (SSIS) and SQL Server Agent. You will need to obtain the full version of SQL Server Management Studio. See the thread at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=157773&SiteId=1 On 4/27/07, Eric Barro wrote: > Using SQL Management Studio you connect to your SQL Express database where > you want the tables to live and then right click the database name and > select Tasks->Import Data from the drop down menu. -- Mark Rider http://dfwmdug.org Don't anthropomorphize computers. They don't like it. From jwcolby at colbyconsulting.com Fri Apr 27 18:45:34 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 19:45:34 -0400 Subject: [dba-VB] Moving your table to SQL Server In-Reply-To: <7d60f23a0704271348k215adach120403fbf818efef@mail.gmail.com> References: <7d60f23a0704271348k215adach120403fbf818efef@mail.gmail.com> Message-ID: <012301c78926$274def50$657aa8c0@m6805> Martin, Really it is just a matter of "how do you do it". I am the kind of person who needs to know the "how it is done" so that I can do it the next time. In SQL Server 2005 Standard Edition there is a wizard that I use but it pretty much sucks (at least how I have used it). Data types are lost, indexes are lost etc. HOLY SMOKE batman! I just ran the SQL Server Migration Assistant for Access and it WORKED! I imported my entire billing database into SQL Server Express. The wizard would not "find" the SQL Server Express database, but if I typed it in "m6805\SQLExpress" it found it. I went out there in advance and created the database itself (no tables). I am IMPRESSED!!! I am actually using my billing database hooked to SQL Server expressed now! WOW! John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Apr 27 23:42:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 00:42:44 -0400 Subject: [dba-VB] VB.Net - UnhandledException Message-ID: <012601c7894f$b023b3e0$657aa8c0@m6805> I am reading about the top level "unhandled exception" error handler. This makes me wonder what the experienced .Net developers do for logging errors. Is there already an error logger object somewhere in the bowels of this beast? If so how is it used? I would dearly love to log all errors that I don't explicitly handle and even some that I do explicitly handle. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Apr 28 00:34:35 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 01:34:35 -0400 Subject: [dba-VB] Combo box Message-ID: <012b01c78956$ec798c50$657aa8c0@m6805> I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Apr 28 01:05:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 02:05:44 -0400 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <013001c7895b$44be7430$657aa8c0@m6805> Many years ago I designed (in Access) a text box / list box pair of controls to emulate a combo box. The idea was to take each character in the text box and use the characters to narrow down the remaining values displayed in the list. IOW filter a query over and over as more characters were typed in the text box. In order to make it look like a combo, I created a list box, positioned it under the text box, shrank the vertical size up to a single line and the width to the same width as the text box. When the user clicked in the text box I dropped down the list (expanded it vertically and horizontally) and displayed the entire list. As the user typed characters I requeried the list, with fewer and fewer remaining records being displayed. If the user deleted characters I also requeried the list. When the user had selected the correct data and left the text box, the OnExit resized the list to a single line / same width as the text box. It worked quite well. Do you think a strategy such as this could be used to implement an "access type" combo box substitute. It wasn't an exact duplicate of the combo functionality but it did work and was easy to implement. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 1:35 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ebarro at verizon.net Sat Apr 28 01:14:24 2007 From: ebarro at verizon.net (Eric Barro) Date: Fri, 27 Apr 2007 23:14:24 -0700 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> This is my snippet of code should give you an idea...it is however in C# and specific to ASP.NET (web-based). It should be fairly easy to port it over to VB.NET and change a couple of lines to be Win32 specific. The function is a public method stored in my Data class... public static int BindDropDownList(DropDownList ddl, string sql, string sqlConnect, Hashtable sqlParameters, string ddlTextField, string ddlValueField, bool showDefaultSelection) { DataSet sqlDs; //count of records returned int totalRecords; //grab the connection string string ConnectionString = ConfigurationSettings.AppSettings.Get(sqlConnect); //define and initialize the connection object SqlConnection sqlConn = new SqlConnection(ConnectionString); //define and initialize the command object SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); //define the command type sqlCmd.CommandType = CommandType.StoredProcedure; if (sqlParameters.Count > 0) { //get a collection of the keys ICollection sqlParams = sqlParameters.Keys; foreach (string key in sqlParams) { // add parameters to pass to the sproc sqlCmd.Parameters.Add(new SqlParameter(key, sqlParameters[key].ToString())); } } //open the connection sqlConn.Open(); //define the data adapter SqlDataAdapter sqlDa = new SqlDataAdapter(); //define the select command sqlDa.SelectCommand = sqlCmd; //initialize the dataset sqlDs = new DataSet("MyList"); //fill the dataset sqlDa.Fill(sqlDs, "MyList"); //define a session variable containing our dataset System.Web.HttpContext.Current.Session["MyList"] = sqlDs; //grab the total number of records returned by the sproc totalRecords = sqlDs.Tables[0].Rows.Count; if (totalRecords > 0) { if (showDefaultSelection) { DataRow newListRow = sqlDs.Tables[0].NewRow(); //this is the value that shows on the dropdownlist //specify an option that will be the default selection newListRow[ddlTextField] = "--Please select one--"; //this is the value that will be posted to the database newListRow[ddlValueField] = 0; //add the new row sqlDs.Tables[0].Rows.Add(newListRow); //specify a sort order based on ddlValueField; this ensures that the newly added row will show up at the top sqlDs.Tables[0].DefaultView.Sort = ddlValueField; } //close the connection ddl.DataSource = sqlDs.Tables[0].DefaultView; ddl.DataTextField = ddlTextField; ddl.DataValueField = ddlValueField; ddl.DataBind(); sqlConn.Close(); } return totalRecords; } //end BindDropDownList This is how I call it... Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, "ZipCity", "ZipCode", true); ZipCity is what I use to display in the dropdownlist and ZipCode is what I use to lookup and store values. I believe this is referred to as DisplayMember and ValueMember in Win32 comboboxes. In my SQL stored procedure I simply make sure that ZipCity is concatenated with whatever value I want to show in the dropdownlist. -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 10:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 3:23 PM From wdhindman at dejpolsystems.com Sat Apr 28 01:55:48 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Sat, 28 Apr 2007 02:55:48 -0400 Subject: [dba-VB] Combo box References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> Message-ID: <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. > > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Friday, April 27, 2007 10:35 PM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Combo box > > I am running into the issue of how to display multiple lines in a combo > box. > IIRC this is a "no can do" in the combos in VB.Net but there must be > common > workarounds. > > For example I need to allow the user to select a zip code, but he really > needs to see the zip AND the city. Furthermore my code is going to need > to > load a record based on that zip code to get lat/long. > > So, is there a way other than using a concatenation of the zip and the > city > to display both in the combo? If I do a concatenation, then I can no > longer > use the zip to lookup a record in a recordset since it now has city data > in > the string. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 > 3:23 PM > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From mjrobertson at iinet.net.au Sat Apr 28 02:31:08 2007 From: mjrobertson at iinet.net.au (Mike) Date: Sat, 28 Apr 2007 17:31:08 +1000 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <000001c78967$30cf3070$0600a8c0@D3NSLB1S> John, This was a very annoying issue when I started the move to .NET Apart from buying custom controls, the only way I found to reproduce multi-column combo/list boxes was to use a datagrid. Individual elements of the datagrid can then be accessed when a row or cell is selected. Regards, Mike Robertson -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, 28 April 2007 3:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/777 - Release Date: 26/04/2007 3:23 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/777 - Release Date: 26/04/2007 3:23 PM From jwcolby at colbyconsulting.com Sat Apr 28 07:07:41 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 08:07:41 -0400 Subject: [dba-VB] Combo box In-Reply-To: <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> Message-ID: <013401c7898d$d5881d90$657aa8c0@m6805> LOL, and it only gets better (worse). John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Saturday, April 28, 2007 2:56 AM To: ebarro at verizon.net; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. From jwcolby at colbyconsulting.com Sat Apr 28 08:58:42 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 09:58:42 -0400 Subject: [dba-VB] Moving through an ADO recordset Message-ID: <013501c7899d$57d0f010$657aa8c0@m6805> In Access (because I was a DAO kinda guy) for smallish recordsets I would often create a class to hold a record (properties for each field I needed to work with) and a class to hold a collection of these classes. I would then read the data out into the record class instances, storing each record class instance in a collection in a "table" class. For example, I have an application already built in Access which calculates the population in all the zips which fall within a radius around a zip code. My brute force approach was to read about 42 thousand records from a table of zip codes, pulling just the zip, city, lat, long, population and house hold count. I would then store each record in a zip class instance which has a property for each of those fields in the record. The ZIPS (plural) class has a collection to hold the zip (singular) class. The ZIPS class opens the recordset and enters a loop creating zip class instances and passing the recordset off to the zip class instance which loads the fields into the properties, and on return the ZIPS class stores the populated zip class instance into a collection. Once loaded I have 42K zip class instances in a collection in a ZIPS class, keyed on the zipcode. Having done that I can now ask the user for a zip code and a radius. Using a formula which calculates the distance between two points (lat/long) I iterate through each and every zip class in the ZIPS collection storing in an "InRadius" collection all the zip classes where the distance between the user supplied zip's lat / long and the zip class being evaluated is less than the radius. Having done that, when I have examined every zip class in the big zip collection, I now have a collection containing pointers to only those zips within the radius. I now iterate that collection adding up the populations and house hold count of each zip class and display it in text boxes in the calculator form. It is a trivial application to write and other than the initial load of the zip classes from the recordset is pretty darned fast to calc the populations - of course depending on the radius. As an exercise in .Net I decided to port that application. There is one huge difference however, DAO is gone and I am faced with the ADO object (s) etc. The upside is that the ADO widget is actually a "disconnected" recordset, i.e. it reads it all into memory for me. This is a "read only" recordset, i.e. I am not updating records and writing them back to the table. This leads me to question whether it makes any sense to do the Zip/ZIPS class thing or just sweep through the ADO recordset itself. Are there record objects? Could I run directly through the recordset pulling pointers to record objects and storing those pointers in my collection? Could I add a field to my recordset called selected and sweep through the ADO recordset setting the SELECTED flag in each record that is within the radius, and then just apply a filter to the ADO recordset to "pull out" only the SELECTED records to sum them? And importantly, if doing it this way is possible, is it faster or slower than iterating my own collection? I would have to clear a selected flag between uses whereas a collection is just re-dimed to empty it and get it ready to fill again. Moving from one tool to another means re-examining the method used to ensure that it is still an efficient method in the new tool. Does anyone have any experience in iterating a ADO recordset in this manner? John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Sat Apr 28 09:41:17 2007 From: ebarro at verizon.net (Eric Barro) Date: Sat, 28 Apr 2007 07:41:17 -0700 Subject: [dba-VB] Moving through an ADO recordset In-Reply-To: <013501c7899d$57d0f010$657aa8c0@m6805> Message-ID: <0JH700CZ1Q4UL2A3@vms046.mailsrvcs.net> In ADO.NET you can mirror your database in datasets. Datasets are different from recordsets in that they are more similar to database containers. Recordsets in DAO are the table equivalents in ADO.NET. Thus, in one dataset object you can have multiple tables contained inside that dataset. You can define relations between those tables and you can perform filtering, sorting and yes update the records in the Dataset. The approach I have taken in .NET is to connect to the database and retrieve records from a table and fill a table object in a dataset object. I can then return the dataset object to my app or return a single table. I use collections such as Hashtables and Arraylists to iterate through the records. Here's a link that explains datasets in ADO.NET http://builder.com.com/5100-6388-1050109-2.html -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 6:59 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Moving through an ADO recordset In Access (because I was a DAO kinda guy) for smallish recordsets I would often create a class to hold a record (properties for each field I needed to work with) and a class to hold a collection of these classes. I would then read the data out into the record class instances, storing each record class instance in a collection in a "table" class. For example, I have an application already built in Access which calculates the population in all the zips which fall within a radius around a zip code. My brute force approach was to read about 42 thousand records from a table of zip codes, pulling just the zip, city, lat, long, population and house hold count. I would then store each record in a zip class instance which has a property for each of those fields in the record. The ZIPS (plural) class has a collection to hold the zip (singular) class. The ZIPS class opens the recordset and enters a loop creating zip class instances and passing the recordset off to the zip class instance which loads the fields into the properties, and on return the ZIPS class stores the populated zip class instance into a collection. Once loaded I have 42K zip class instances in a collection in a ZIPS class, keyed on the zipcode. Having done that I can now ask the user for a zip code and a radius. Using a formula which calculates the distance between two points (lat/long) I iterate through each and every zip class in the ZIPS collection storing in an "InRadius" collection all the zip classes where the distance between the user supplied zip's lat / long and the zip class being evaluated is less than the radius. Having done that, when I have examined every zip class in the big zip collection, I now have a collection containing pointers to only those zips within the radius. I now iterate that collection adding up the populations and house hold count of each zip class and display it in text boxes in the calculator form. It is a trivial application to write and other than the initial load of the zip classes from the recordset is pretty darned fast to calc the populations - of course depending on the radius. As an exercise in .Net I decided to port that application. There is one huge difference however, DAO is gone and I am faced with the ADO object (s) etc. The upside is that the ADO widget is actually a "disconnected" recordset, i.e. it reads it all into memory for me. This is a "read only" recordset, i.e. I am not updating records and writing them back to the table. This leads me to question whether it makes any sense to do the Zip/ZIPS class thing or just sweep through the ADO recordset itself. Are there record objects? Could I run directly through the recordset pulling pointers to record objects and storing those pointers in my collection? Could I add a field to my recordset called selected and sweep through the ADO recordset setting the SELECTED flag in each record that is within the radius, and then just apply a filter to the ADO recordset to "pull out" only the SELECTED records to sum them? And importantly, if doing it this way is possible, is it faster or slower than iterating my own collection? I would have to clear a selected flag between uses whereas a collection is just re-dimed to empty it and get it ready to fill again. Moving from one tool to another means re-examining the method used to ensure that it is still an efficient method in the new tool. Does anyone have any experience in iterating a ADO recordset in this manner? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/778 - Release Date: 4/27/2007 1:39 PM From bheid at sc.rr.com Sun Apr 29 17:18:07 2007 From: bheid at sc.rr.com (Bobby Heid) Date: Sun, 29 Apr 2007 18:18:07 -0400 Subject: [dba-VB] Combo box In-Reply-To: <013401c7898d$d5881d90$657aa8c0@m6805> References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> <013401c7898d$d5881d90$657aa8c0@m6805> Message-ID: <000901c78aac$4418ea40$2c01a8c0@bhxp> John, If you load a table in a dataset with all of the desired fields in it (zip & Name, zip, name, ID, etc.), then bind a binding source to the table in the dataset, then bind the combo box to the ID and the zip & name fields. When the user selects an item in the combo box, you can use something like the bindingsource.currentrow (or something like that, I can not remember the name of it right now), to get all of the data in the current row, not just what is in the combo box. So check out the binding source and see if that will give you what you need. Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 8:08 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box LOL, and it only gets better (worse). John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Saturday, April 28, 2007 2:56 AM To: ebarro at verizon.net; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Apr 30 10:49:27 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 30 Apr 2007 08:49:27 -0700 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: Combos in .Net are actually a kind of datagrid, so just binding the combo to a multicolumn source (or array or listview, etc.) should give you multiple columns. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 10:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From chizotz at mchsi.com Mon Apr 30 17:36:36 2007 From: chizotz at mchsi.com (Ron Allen) Date: Mon, 30 Apr 2007 22:36:36 +0000 Subject: [dba-VB] Combo box Message-ID: <043020072236.3859.46366F740003174200000F13219791299503010CD2079C080C03BF969B019607080C@mchsi.com> Or concatenate the information you want displayed in the dataset for the display member of the combo box, and set the value member to the field you need to use to get other data. That will easily and quickly give you a drop- down display that looks like: 63005 CHESTERFIELD 63011 BALLWIN 63012 BARNHART 63014 BERGER 63017 CHESTERFIELD 63021 BALLWIN 63025 EUREKA 63026 FENTON 63028 FESTUS 63031 FLORISSANT and will return either the zip or the city name as needed. You can also change the value member at run time to pull either the zip or the city name if that's needed; a little more work, but I don't think all that much. If that still doesn't work for you, you can create your own multiline combo box that inherits from the comboBox class. Here's a link to one example of how you might go about it: http://www.codeproject.com/cs/combobox/multicolumncombo.asp Ron > John, > > If you load a table in a dataset with all of the desired fields in it (zip & > Name, zip, name, ID, etc.), then bind a binding source to the table in the > dataset, then bind the combo box to the ID and the zip & name fields. When > the user selects an item in the combo box, you can use something like the > bindingsource.currentrow (or something like that, I can not remember the > name of it right now), to get all of the data in the current row, not just > what is in the combo box. > > So check out the binding source and see if that will give you what you need. > > Bobby > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Saturday, April 28, 2007 8:08 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Combo box > > LOL, and it only gets better (worse). > > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman > Sent: Saturday, April 28, 2007 2:56 AM > To: ebarro at verizon.net; dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Combo box > > ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, > what in the heck is the world coming to when there is no such thing as a > simple d&d combo available ...y'all give me a headache, you do ...turning > off the lights :( > > William Hindman > > ----- Original Message ----- > From: "Eric Barro" > To: > Sent: Saturday, April 28, 2007 2:14 AM > Subject: Re: [dba-VB] Combo box > > > > This is my snippet of code should give you an idea...it is however in C# > > and > > specific to ASP.NET (web-based). It should be fairly easy to port it over > > to > > VB.NET and change a couple of lines to be Win32 specific. > > > > The function is a public method stored in my Data class... > > > > public static int BindDropDownList(DropDownList ddl, > > string sql, string sqlConnect, Hashtable > > sqlParameters, > > string ddlTextField, string ddlValueField, bool > > showDefaultSelection) > > { > > DataSet sqlDs; > > > > //count of records returned > > int totalRecords; > > //grab the connection string > > string ConnectionString = > > ConfigurationSettings.AppSettings.Get(sqlConnect); > > //define and initialize the connection object > > SqlConnection sqlConn = new > > SqlConnection(ConnectionString); > > //define and initialize the command object > > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > > //define the command type > > sqlCmd.CommandType = CommandType.StoredProcedure; > > > > if (sqlParameters.Count > 0) > > { > > //get a collection of the keys > > ICollection sqlParams = sqlParameters.Keys; > > foreach (string key in sqlParams) > > { > > // add parameters to pass to the > > sproc > > sqlCmd.Parameters.Add(new > > SqlParameter(key, sqlParameters[key].ToString())); > > } > > } > > //open the connection > > sqlConn.Open(); > > //define the data adapter > > SqlDataAdapter sqlDa = new SqlDataAdapter(); > > //define the select command > > sqlDa.SelectCommand = sqlCmd; > > //initialize the dataset > > sqlDs = new DataSet("MyList"); > > //fill the dataset > > sqlDa.Fill(sqlDs, "MyList"); > > //define a session variable containing our dataset > > System.Web.HttpContext.Current.Session["MyList"] = > > sqlDs; > > //grab the total number of records returned by the > > sproc > > totalRecords = sqlDs.Tables[0].Rows.Count; > > if (totalRecords > 0) > > { > > if (showDefaultSelection) > > { > > DataRow newListRow = > > sqlDs.Tables[0].NewRow(); > > //this is the value that shows on > > the dropdownlist > > //specify an option that will be the > > default selection > > newListRow[ddlTextField] = "--Please > > select one--"; > > //this is the value that will be > > posted to the database > > newListRow[ddlValueField] = 0; > > //add the new row > > > > sqlDs.Tables[0].Rows.Add(newListRow); > > //specify a sort order based on > > ddlValueField; this ensures that the newly added row will show up at the > > top > > sqlDs.Tables[0].DefaultView.Sort = > > ddlValueField; > > } > > //close the connection > > ddl.DataSource = > > sqlDs.Tables[0].DefaultView; > > ddl.DataTextField = ddlTextField; > > ddl.DataValueField = ddlValueField; > > ddl.DataBind(); > > sqlConn.Close(); > > } > > return totalRecords; > > } //end BindDropDownList > > > > > > This is how I call it... > > > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > > "ZipCity", "ZipCode", true); > > > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > > use to lookup and store values. I believe this is referred to as > > DisplayMember and ValueMember in Win32 comboboxes. > > > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > > with whatever value I want to show in the dropdownlist. > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > 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 listmaster at databaseadvisors.com Fri Apr 6 08:40:34 2007 From: listmaster at databaseadvisors.com (Bryan Carbonnell) Date: Fri, 06 Apr 2007 09:40:34 -0400 Subject: [dba-VB] Administrivia - Server Upgrades Message-ID: <46161592.19068.306522A@listmaster.databaseadvisors.com> Hello all, I hope you are all having a good Easter Weekend and that you won't miss the lists too much. I have to do an upgrade on the server, so it will be mostly up, but at some points going down over this weekend. If, at the end of the day, you are having problems, please e-mail me at listmaster at databaseadvisors.com or IF THAT DOES NOT WORK, e-mail me at bryan at carbonnell.ca The main reason for this upgrade is for spam control. We are getting hammered at the server and I need to implement a spam control solution. Again, if you have any problems, contact me at listmaster at databaseadvisors.com or bryan at carbonnell.ca -- Bryan Carbonnell - listmaster at databaseadvisors.com From listmaster at databaseadvisors.com Fri Apr 6 19:17:16 2007 From: listmaster at databaseadvisors.com (Bryan Carbonnell) Date: Fri, 06 Apr 2007 20:17:16 -0400 Subject: [dba-VB] Administrivia - Server Upgrade Complete Message-ID: <4616AACC.16681.54D3C94@listmaster.databaseadvisors.com> Well, the server upgrade has been completed. Hopefully you didn't notice too much of a disruption through out the day today. If you run across anything out of the ordinary, please e-mail me at listmaster at databaseadvisors.com or if that does not work, bryan at carbonnell.ca -- Bryan Carbonnell - listmaster at databaseadvisors.com From Jdemarco at hudsonhealthplan.org Thu Apr 19 10:38:59 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Thu, 19 Apr 2007 11:38:59 -0400 Subject: [dba-VB] XQuery in VB 6 In-Reply-To: <200704191517.l3JFHOx19027@smarthost.yourcomms.net> References: <20070419144605.592A82B8B5C@smtp.nildram.co.uk><1C2084FD2472124AB1812A5476EA3B7A015A0E0B@msgswbmnmsp04.wellsfargo.com> <200704191517.l3JFHOx19027@smarthost.yourcomms.net> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB375@TTNEXCHSVR.hshhp.com> X-posted AccessD, VB Hello All, I've been absent for a while but an issue has just come up that I hope someone can help with. Does anyone have any VB 6 code that uses XQuery to return a set of nodes? I find plenty of XQuery examples that show the query and the returned nodes but no VB 6 implementation. Any short code snip will do. TIA, Jim DeMarco From jwcolby at colbyconsulting.com Sun Apr 22 22:56:21 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sun, 22 Apr 2007 23:56:21 -0400 Subject: [dba-VB] using a saved SSIS with VB.Net Message-ID: <000301c7855b$5c12e9d0$657aa8c0@m6805> I saved an import spec from the import wizard in SQL Server 2005. I now need to use that import spec in VB.Net, but I need to modify it. I need to change the source file, make it an append instead of a make table / append, and I need to modify the datatype from NVarchar to varchar. Of course I can simply go back in to SQL Server and run the import wizard again, however this is a fixed width file which means recreating all of the field name / field width info a second time. Is it possible to just do these mods on the existing import spec or should I just bite the bullet and rebuild. I have ~ sixty more files to import into the table and I really don't want to do this 60 times. The last time I did this I actually built an Access app to create .csv files from the original fixed width files. It seems like the long way around the barn but then again I do not see how this wizard is really very useful in this case. Anyone? John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Thu Apr 26 21:51:19 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Thu, 26 Apr 2007 22:51:19 -0400 Subject: [dba-VB] Deploying .net solutions Message-ID: <00bd01c78876$f00d7240$657aa8c0@m6805> I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Thu Apr 26 22:12:11 2007 From: ebarro at verizon.net (Eric Barro) Date: Thu, 26 Apr 2007 20:12:11 -0700 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00bd01c78876$f00d7240$657aa8c0@m6805> Message-ID: <0JH400FF1ZK97U33@vms040.mailsrvcs.net> .NET desktop apps are no different from any non .NET app. You have several options such as creating a setup or .MSI project for your application. Or you can have the app check for updates everytime it starts http://windowsforms.net/articles/appupdater.aspx -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 7:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/776 - Release Date: 4/25/2007 12:19 PM From Jdemarco at hudsonhealthplan.org Fri Apr 27 06:59:41 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 07:59:41 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00bd01c78876$f00d7240$657aa8c0@m6805> References: <00bd01c78876$f00d7240$657aa8c0@m6805> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Fri Apr 27 07:31:22 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 08:31:22 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805> <0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 07:39:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 08:39:44 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com> <0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> Message-ID: <00d601c788c9$22beeb90$657aa8c0@m6805> I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Fri Apr 27 07:55:10 2007 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Fri, 27 Apr 2007 08:55:10 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <00d601c788c9$22beeb90$657aa8c0@m6805> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com><0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com> <00d601c788c9$22beeb90$657aa8c0@m6805> Message-ID: <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> There were certainly security issues in VS 2003 but I'm under the impression they've been dealt with in 2005 but this is M$ we're talking about. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 8:40 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 08:34:32 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 09:34:32 -0400 Subject: [dba-VB] Deploying .net solutions In-Reply-To: <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> References: <00bd01c78876$f00d7240$657aa8c0@m6805><0B8880A20E2CF24280FA60901E108FB05AB705@TTNEXCHSVR.hshhp.com><0B8880A20E2CF24280FA60901E108FB05AB709@TTNEXCHSVR.hshhp.com><00d601c788c9$22beeb90$657aa8c0@m6805> <0B8880A20E2CF24280FA60901E108FB05AB70B@TTNEXCHSVR.hshhp.com> Message-ID: <00da01c788d0$ca6f37d0$657aa8c0@m6805> Incredibly, application distribution is a subject that is not much in the news. I googled around trying to find out "the how" and there is not a lot out there. My books do not even have the word "deployment" in the index. Simply incredible. I work on a computer at my office. I want to install the application on a server at my client. What do I do? Apparently there is a "project" that wraps the project that is to be installed that builds an installer (MSA?). That is fine, except that the installation onto the server may or may not be the end of the subject. Some things may be a server based application, the server actually runs the application. This would be things like an application that watches an FTP directory, when files appear they are downloaded to the local hard disk, unzipped / unencrypted and then the files are imported to the database. Likewise an application (in fact very likely the SAME application) pulls data out of the database, encrypts / zips it and uploads it to an FTP directory somewhere. With other things, the movement to the server is just the first step. From there, the user needs to execute the application, i.e. needs to download the application to their desktop and run it. If there are changes then somehow the changes need to be automatically pulled down as well. It could be something as simple as copying the whole darned directory and all of its subdirectories but I certainly hope not. Of course if that is not huge then why not? So far these are little applications, as opposed to the main call center app which is an Access FE with hundreds of tables, queries, reports, modules and reports. These are applications such as the report generators that create data feeds to the mainframes. They take a certain amount of setup - selecting product types and date ranges before clicking the button. All of these applications may change on a daily / weekly basis. I am a one man show for the client so they have a huge list of "things to do" which include but are not limited to these applets, and of course there are bug fixes. Each of these things may get a new report this week, a fix to some specific field today and so forth. Updates are relatively easy with Access since it is at most a library mda and the fe. How do I do all this in vb.net? I need to be able to make changes and push it out whenever it is ready, quickly and conveniently. And of course I often times remote in and work local to the machine because it saves the hassle of the FTP up / down to get things back and forth. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:55 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions There were certainly security issues in VS 2003 but I'm under the impression they've been dealt with in 2005 but this is M$ we're talking about. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 8:40 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions I read about that on the internet last night, and it looks like it might be a viable method. I also read that it has some issues, particularly in the presence of different versions of the .Net framework on the desktop, and also IIRC something about security issues and what the app is allowed to do. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:31 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions ClickOnce is the technology I was referring to. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco Sent: Friday, April 27, 2007 8:00 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Deploying .net solutions John, If you mean how are you going to get updates to users you should look at "smart client" applications where the client is aware of changes and downloads them from a central location before the app starts. I don't have much experience with it but I expect I will soon as we're moving a major client/server app to .NET this year. Jim DeMarco -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Thursday, April 26, 2007 10:51 PM To: 'Access Developers discussion and problem solving'; dba-vb at databaseadvisors.com Subject: [dba-VB] Deploying .net solutions I have a bunch of processes that are not particularly suited to Access for one reason or another. These include things like * doing what I call "directory watching" and performing some action when a file appears. * FTP transfers between local drives and FTP sites * Building complex data feeds between a database and a remote mainframe To take an example, I regularly build data feeds which look like: Header Rec Detail Rec Detail Rec Detail Rec . . Trailer Rec The header rec has some specific set of data in it such as who it is coming from, the date of the file etc. The detail recs have repetitive data such as payments to clients, payment dates, from/to dates that the payment is for, the amount, the check number etc. The footer rec has some specific data in it such as the number of checks, the bank account number that the checks are drawn against etc. I have built a report generator in VBA, inside of access, and it works, but it is really rather patchwork by nature. I have to reference specific libs, go outside of VBA to handle things like the file system and text streams (in an object oriented manner) and so forth. There are no threads so a single error can hang the system, and things that should happen in parallel have to happen sequentially. So, I would like to take one of these systems and move it to .Net. What I am trying to discover is how .Net systems are (reliably) deployed to the desktop. Often times these applets are used by more than one person, often at the same time. At the moment, because they are Access / vba based, I just do a copy down to the desktop (a single file) and open the mdb. A form opens and the user goes to work. These applets are under constant development, literally daily as I finish one report another is started. Bug fixes are done. I assume (but am not sure) that a VB.Net applet would be distributed as well, downloaded to the desktop and run from there. What is the vehicle for this distribution? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Apr 27 09:30:17 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 10:30:17 -0400 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: References: Message-ID: <00f101c788d8$946eeec0$657aa8c0@m6805> Gustav, I am at the same place. I own a copy of VS2005 and SQL Server 2005 (got it at the coming out party) so I can go there if I wish. I have it installed and have played with it quite a bit over the last two years or so. I am actually considering working in the VB.Net express until I come up to speed on that, then make the move to VS2005. The express stuff is free and provides all the functionality that I can understand for the moment anyway. Once I get that down, then I will be ready to learn the stuff that the express versions do not provide. As for reporting, that is a show stopper, especially when you come from Access which is one of the better report generators out there. I am actually considering simply using automation to continue using Access as a report generator for the moment. Again, once I come up to speed on the .Net stuff, then I can re-examine my options. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Friday, April 27, 2007 10:10 AM To: accessd at databaseadvisors.com Subject: [AccessD] Dot Net, where to start? Hi all It seems to be the time for me to get into the Dot Net stuff. But where to start? The only books on Access I've ever had are the original references and handbooks for Access 1 and 2 and the Application Development book for Access 97 so I'm reluctant to buy books - I just don't have the patience ... In the Action Pack - which we subscribe to - I've noticed two discs for VS 2005 Express, "Corbis Image Disc" and "Getting Started". Are these tutorials worth the effort to study? I browsed our vb list archive, which I don't subsribe to, and traffic seems to be low, so where to discuss Dot Net matters at the same level as we discuss Access here? One thing I think I've understood is that report design in VS is poor and third party tools or Report Design Service of SQL Server 2005 are to be preferred if you need reports on a level that match that of Access. Of course, my main interest is anything related to databases - pure web development is second, and game development won't come into play. Any advice will be greatly appreciated. /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From chizotz at mchsi.com Fri Apr 27 11:29:34 2007 From: chizotz at mchsi.com (Ron Allen) Date: Fri, 27 Apr 2007 16:29:34 +0000 Subject: [dba-VB] Deploying .net solutions Message-ID: <042720071629.19344.463224ED000DC91300004B90219792474103010CD2079C080C03BF969B019607080C@mchsi.com> John, It can be as easy as copying the new .NET exe file to the user computers, overwriting the old version. This is how I handle upgrades and bug fixes in my shop, and it works fine. I was also amazed at the sparse information available on deployment. I couldn't find anything substantial or truly useful when I was exploring these issues some time back. Finally, I reasoned that all an installer really does is: *copy the needed files to the target machine *register any library files as needed *set up any necessary directory structures *add any necessary registry entries *create icons The installer built in to VS is not particularly intuitive to use if you want to do anything fancy, even though it appears to have a fair amount of power if you know how to harness it; there is very little useful documentation on how to anything that I have been able to find. But what I have found is that once the initial install is done, unless you need to add additional library files that must be registered on the user system, upgrades can be done by simply copying the new .exe file over the old version on the user machine. One caveat, if you want to upgrade in this manner you can not use the built-in auto-increment versioning because the internal version of the .exe file is registered on the system and replacing the file with one that has a different internal version will cause it to fail. I work in a relatively small shop, with responsibility for 19 users and direct access to all machines. The path of least resistance for me is to stick the new version out on a common location on one of the servers, then go to each workstation and simply copy the new version over the old. However, in the past I have used a DOS batch file with a shortcut on each desktop, and notified everyone by email to run the upgrade; that also works, if your users are responsible enough to follow instructions. We've also discussed having upgrades performed on each machine reboot, checking for new versions and copying only if a new version exists; that would work because we mandate that all machines except mine (I occasionally have to remote in) are turned off at night, and my machine is irrelevant because it is the development machine. Don't know if this helped at all, but I guess the real point is that there are many ways to get this accomplished and it needn't be a huge hassle. Ron ps to all you book-writing gurus out there: I'd say that the world is way ready for a good solid and *usable* book on deployment. > Incredibly, application distribution is a subject that is not much in the > news. I googled around trying to find out "the how" and there is not a lot > out there. My books do not even have the word "deployment" in the index. > Simply incredible. > > I work on a computer at my office. I want to install the application on a > server at my client. What do I do? Apparently there is a "project" that > wraps the project that is to be installed that builds an installer (MSA?). > That is fine, except that the installation onto the server may or may not be > the end of the subject. > > Some things may be a server based application, the server actually runs the > application. This would be things like an application that watches an FTP > directory, when files appear they are downloaded to the local hard disk, > unzipped / unencrypted and then the files are imported to the database. > Likewise an application (in fact very likely the SAME application) pulls > data out of the database, encrypts / zips it and uploads it to an FTP > directory somewhere. > > With other things, the movement to the server is just the first step. From > there, the user needs to execute the application, i.e. needs to download the > application to their desktop and run it. If there are changes then somehow > the changes need to be automatically pulled down as well. It could be > something as simple as copying the whole darned directory and all of its > subdirectories but I certainly hope not. Of course if that is not huge then > why not? So far these are little applications, as opposed to the main call > center app which is an Access FE with hundreds of tables, queries, reports, > modules and reports. > > These are applications such as the report generators that create data feeds > to the mainframes. They take a certain amount of setup - selecting product > types and date ranges before clicking the button. > > All of these applications may change on a daily / weekly basis. I am a one > man show for the client so they have a huge list of "things to do" which > include but are not limited to these applets, and of course there are bug > fixes. Each of these things may get a new report this week, a fix to some > specific field today and so forth. Updates are relatively easy with Access > since it is at most a library mda and the fe. > > How do I do all this in vb.net? I need to be able to make changes and push > it out whenever it is ready, quickly and conveniently. And of course I > often times remote in and work local to the machine because it saves the > hassle of the FTP up / down to get things back and forth. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:55 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > There were certainly security issues in VS 2003 but I'm under the impression > they've been dealt with in 2005 but this is M$ we're talking about. > > > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Friday, April 27, 2007 8:40 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > I read about that on the internet last night, and it looks like it might be > a viable method. I also read that it has some issues, particularly in the > presence of different versions of the .Net framework on the desktop, and > also IIRC something about security issues and what the app is allowed to do. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:31 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > ClickOnce is the technology I was referring to. > > > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco > Sent: Friday, April 27, 2007 8:00 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Deploying .net solutions > > John, > > If you mean how are you going to get updates to users you should look at > "smart client" applications where the client is aware of changes and > downloads them from a central location before the app starts. I don't have > much experience with it but I expect I will soon as we're moving a major > client/server app to .NET this year. > > > Jim DeMarco > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Thursday, April 26, 2007 10:51 PM > To: 'Access Developers discussion and problem solving'; > dba-vb at databaseadvisors.com > Subject: [dba-VB] Deploying .net solutions > > I have a bunch of processes that are not particularly suited to Access for > one reason or another. These include things like > > * doing what I call "directory watching" and performing some action when a > file appears. > * FTP transfers between local drives and FTP sites > * Building complex data feeds between a database and a remote mainframe > > To take an example, I regularly build data feeds which look like: > > Header Rec > Detail Rec > Detail Rec > Detail Rec > . > . > Trailer Rec > > The header rec has some specific set of data in it such as who it is coming > from, the date of the file etc. > > The detail recs have repetitive data such as payments to clients, payment > dates, from/to dates that the payment is for, the amount, the check number > etc. > > The footer rec has some specific data in it such as the number of checks, > the bank account number that the checks are drawn against etc. > > I have built a report generator in VBA, inside of access, and it works, but > it is really rather patchwork by nature. I have to reference specific libs, > go outside of VBA to handle things like the file system and text streams (in > an object oriented manner) and so forth. There are no threads so a single > error can hang the system, and things that should happen in parallel have to > happen sequentially. > > So, I would like to take one of these systems and move it to .Net. What I > am trying to discover is how .Net systems are (reliably) deployed to the > desktop. Often times these applets are used by more than one person, often > at the same time. At the moment, because they are Access / vba based, I > just do a copy down to the desktop (a single file) and open the mdb. A form > opens and the user goes to work. These applets are under constant > development, literally daily as I finish one report another is started. Bug > fixes are done. > > I assume (but am not sure) that a VB.Net applet would be distributed as > well, downloaded to the desktop and run from there. What is the vehicle for > this distribution? > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > 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 chizotz at mchsi.com Fri Apr 27 11:47:42 2007 From: chizotz at mchsi.com (Ron Allen) Date: Fri, 27 Apr 2007 16:47:42 +0000 Subject: [dba-VB] [AccessD] Dot Net, where to start? Message-ID: <042720071647.4471.4632292E000BDC6500001177219792474103010CD2079C080C03BF969B019607080C@mchsi.com> Gustav, We use (shudder) Crystal Reports. Crystal is bug-ridden, or perhaps I should say bug-riddled, and although they fix seemingly thousands of bugs between versions (at least according to their lists of changes), they never seem to bother to fix many basic problems. There are many bugs in Crystal that have been around so long (years) that long-time Crystal developers tend to think of them as "quirky features" rather than the maddening bugs they actually are. That said, overall Crystal does a good job and, in truth, is far more powerful than Access as a reporting tool. And despite it's obscene cost, it's cheaper than most other solutions. I haven't looked at the reporting tool in 2005 yet, but the version I looked at a couple of years ago was not at all intuitive, not nearly as powerful as Crystal, and had many problems of it's own. Ron > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Friday, April 27, 2007 10:10 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Dot Net, where to start? > > Hi all > > It seems to be the time for me to get into the Dot Net stuff. But where to > start? > The only books on Access I've ever had are the original references and > handbooks for Access 1 and 2 and the Application Development book for Access > 97 so I'm reluctant to buy books - I just don't have the patience ... > > In the Action Pack - which we subscribe to - I've noticed two discs for VS > 2005 Express, "Corbis Image Disc" and "Getting Started". Are these tutorials > worth the effort to study? > > I browsed our vb list archive, which I don't subsribe to, and traffic seems > to be low, so where to discuss Dot Net matters at the same level as we > discuss Access here? > > One thing I think I've understood is that report design in VS is poor and > third party tools or Report Design Service of SQL Server 2005 are to be > preferred if you need reports on a level that match that of Access. > > Of course, my main interest is anything related to databases - pure web > development is second, and game development won't come into play. > Any advice will be greatly appreciated. > > /gustav From jwcolby at colbyconsulting.com Fri Apr 27 15:33:27 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 16:33:27 -0400 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: References: Message-ID: <011901c7890b$504911c0$657aa8c0@m6805> In playing around with the VB Express I discovered that you can reference an Access FE in a dataset. Doing that allows you to see not only all linked tables, but also all of the queries in the FE. Theoretically this will allow me to build, save and use queries there where I am comfortable until such time as you guys teach me how to build queries inside of VB.Net One thing I am still struggling to figure out is how to move a table from an MDB to SQL Server Express. I have one specific table which is causing heartaches in Access. It uses memo fields and there are LOTS of "locking issues" when users are trying to edit / add these memos. This is a key table, where the user adds dated notes about the claim, so users are in there viewing old notes and adding new notes about phone conversations and other stuff. Microsoft's party line is that these locking issues are often caused by the way memos are stored in pages on the disk and how JET locks these pages during edits. Thus I believe (hope, pray) that if I move that table out to SQL Server the locking issues will go away since SQL Server handles such things entirely differently. A related benefit is that the BE will slim down considerably. These memos constitute well over 250 megabytes of data in a (consolidated) 700 mbyte BE. I could of course simply build the table by hand but I would really like to "just move it", data and all. John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Fri Apr 27 15:51:59 2007 From: ebarro at verizon.net (Eric Barro) Date: Fri, 27 Apr 2007 13:51:59 -0700 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: <011901c7890b$504911c0$657aa8c0@m6805> Message-ID: <0JH600LNFCMY68YE@vms048.mailsrvcs.net> Using SQL Management Studio you connect to your SQL Express database where you want the tables to live and then right click the database name and select Tasks->Import Data from the drop down menu. After you select the data source (Microsoft Access) and the file location for the source and the SQL database for the destination, it will create the tables for you. You might have to check indexes and copy and paste your queries (views in SQL). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 1:33 PM To: 'Access Developers discussion and problem solving' Cc: dba-vb at databaseadvisors.com Subject: Re: [AccessD] Dot Net, where to start? In playing around with the VB Express I discovered that you can reference an Access FE in a dataset. Doing that allows you to see not only all linked tables, but also all of the queries in the FE. Theoretically this will allow me to build, save and use queries there where I am comfortable until such time as you guys teach me how to build queries inside of VB.Net One thing I am still struggling to figure out is how to move a table from an MDB to SQL Server Express. I have one specific table which is causing heartaches in Access. It uses memo fields and there are LOTS of "locking issues" when users are trying to edit / add these memos. This is a key table, where the user adds dated notes about the claim, so users are in there viewing old notes and adding new notes about phone conversations and other stuff. Microsoft's party line is that these locking issues are often caused by the way memos are stored in pages on the disk and how JET locks these pages during edits. Thus I believe (hope, pray) that if I move that table out to SQL Server the locking issues will go away since SQL Server handles such things entirely differently. A related benefit is that the BE will slim down considerably. These memos constitute well over 250 megabytes of data in a (consolidated) 700 mbyte BE. I could of course simply build the table by hand but I would really like to "just move it", data and all. John W. Colby Colby Consulting www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 3:23 PM From ridermark at gmail.com Fri Apr 27 16:33:40 2007 From: ridermark at gmail.com (Mark Rider) Date: Fri, 27 Apr 2007 16:33:40 -0500 Subject: [dba-VB] [AccessD] Dot Net, where to start? In-Reply-To: <0JH600LNFCMY68YE@vms048.mailsrvcs.net> References: <011901c7890b$504911c0$657aa8c0@m6805> <0JH600LNFCMY68YE@vms048.mailsrvcs.net> Message-ID: SQL Server 2005 Express Manager does not offer Import/Export functionality as it is dependent on SQL Server Integration Services (SSIS) and SQL Server Agent. You will need to obtain the full version of SQL Server Management Studio. See the thread at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=157773&SiteId=1 On 4/27/07, Eric Barro wrote: > Using SQL Management Studio you connect to your SQL Express database where > you want the tables to live and then right click the database name and > select Tasks->Import Data from the drop down menu. -- Mark Rider http://dfwmdug.org Don't anthropomorphize computers. They don't like it. From jwcolby at colbyconsulting.com Fri Apr 27 18:45:34 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Fri, 27 Apr 2007 19:45:34 -0400 Subject: [dba-VB] Moving your table to SQL Server In-Reply-To: <7d60f23a0704271348k215adach120403fbf818efef@mail.gmail.com> References: <7d60f23a0704271348k215adach120403fbf818efef@mail.gmail.com> Message-ID: <012301c78926$274def50$657aa8c0@m6805> Martin, Really it is just a matter of "how do you do it". I am the kind of person who needs to know the "how it is done" so that I can do it the next time. In SQL Server 2005 Standard Edition there is a wizard that I use but it pretty much sucks (at least how I have used it). Data types are lost, indexes are lost etc. HOLY SMOKE batman! I just ran the SQL Server Migration Assistant for Access and it WORKED! I imported my entire billing database into SQL Server Express. The wizard would not "find" the SQL Server Express database, but if I typed it in "m6805\SQLExpress" it found it. I went out there in advance and created the database itself (no tables). I am IMPRESSED!!! I am actually using my billing database hooked to SQL Server expressed now! WOW! John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Apr 27 23:42:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 00:42:44 -0400 Subject: [dba-VB] VB.Net - UnhandledException Message-ID: <012601c7894f$b023b3e0$657aa8c0@m6805> I am reading about the top level "unhandled exception" error handler. This makes me wonder what the experienced .Net developers do for logging errors. Is there already an error logger object somewhere in the bowels of this beast? If so how is it used? I would dearly love to log all errors that I don't explicitly handle and even some that I do explicitly handle. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Apr 28 00:34:35 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 01:34:35 -0400 Subject: [dba-VB] Combo box Message-ID: <012b01c78956$ec798c50$657aa8c0@m6805> I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Apr 28 01:05:44 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 02:05:44 -0400 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <013001c7895b$44be7430$657aa8c0@m6805> Many years ago I designed (in Access) a text box / list box pair of controls to emulate a combo box. The idea was to take each character in the text box and use the characters to narrow down the remaining values displayed in the list. IOW filter a query over and over as more characters were typed in the text box. In order to make it look like a combo, I created a list box, positioned it under the text box, shrank the vertical size up to a single line and the width to the same width as the text box. When the user clicked in the text box I dropped down the list (expanded it vertically and horizontally) and displayed the entire list. As the user typed characters I requeried the list, with fewer and fewer remaining records being displayed. If the user deleted characters I also requeried the list. When the user had selected the correct data and left the text box, the OnExit resized the list to a single line / same width as the text box. It worked quite well. Do you think a strategy such as this could be used to implement an "access type" combo box substitute. It wasn't an exact duplicate of the combo functionality but it did work and was easy to implement. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 1:35 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ebarro at verizon.net Sat Apr 28 01:14:24 2007 From: ebarro at verizon.net (Eric Barro) Date: Fri, 27 Apr 2007 23:14:24 -0700 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> This is my snippet of code should give you an idea...it is however in C# and specific to ASP.NET (web-based). It should be fairly easy to port it over to VB.NET and change a couple of lines to be Win32 specific. The function is a public method stored in my Data class... public static int BindDropDownList(DropDownList ddl, string sql, string sqlConnect, Hashtable sqlParameters, string ddlTextField, string ddlValueField, bool showDefaultSelection) { DataSet sqlDs; //count of records returned int totalRecords; //grab the connection string string ConnectionString = ConfigurationSettings.AppSettings.Get(sqlConnect); //define and initialize the connection object SqlConnection sqlConn = new SqlConnection(ConnectionString); //define and initialize the command object SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); //define the command type sqlCmd.CommandType = CommandType.StoredProcedure; if (sqlParameters.Count > 0) { //get a collection of the keys ICollection sqlParams = sqlParameters.Keys; foreach (string key in sqlParams) { // add parameters to pass to the sproc sqlCmd.Parameters.Add(new SqlParameter(key, sqlParameters[key].ToString())); } } //open the connection sqlConn.Open(); //define the data adapter SqlDataAdapter sqlDa = new SqlDataAdapter(); //define the select command sqlDa.SelectCommand = sqlCmd; //initialize the dataset sqlDs = new DataSet("MyList"); //fill the dataset sqlDa.Fill(sqlDs, "MyList"); //define a session variable containing our dataset System.Web.HttpContext.Current.Session["MyList"] = sqlDs; //grab the total number of records returned by the sproc totalRecords = sqlDs.Tables[0].Rows.Count; if (totalRecords > 0) { if (showDefaultSelection) { DataRow newListRow = sqlDs.Tables[0].NewRow(); //this is the value that shows on the dropdownlist //specify an option that will be the default selection newListRow[ddlTextField] = "--Please select one--"; //this is the value that will be posted to the database newListRow[ddlValueField] = 0; //add the new row sqlDs.Tables[0].Rows.Add(newListRow); //specify a sort order based on ddlValueField; this ensures that the newly added row will show up at the top sqlDs.Tables[0].DefaultView.Sort = ddlValueField; } //close the connection ddl.DataSource = sqlDs.Tables[0].DefaultView; ddl.DataTextField = ddlTextField; ddl.DataValueField = ddlValueField; ddl.DataBind(); sqlConn.Close(); } return totalRecords; } //end BindDropDownList This is how I call it... Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, "ZipCity", "ZipCode", true); ZipCity is what I use to display in the dropdownlist and ZipCode is what I use to lookup and store values. I believe this is referred to as DisplayMember and ValueMember in Win32 comboboxes. In my SQL stored procedure I simply make sure that ZipCity is concatenated with whatever value I want to show in the dropdownlist. -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 10:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 3:23 PM From wdhindman at dejpolsystems.com Sat Apr 28 01:55:48 2007 From: wdhindman at dejpolsystems.com (William Hindman) Date: Sat, 28 Apr 2007 02:55:48 -0400 Subject: [dba-VB] Combo box References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> Message-ID: <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. > > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Friday, April 27, 2007 10:35 PM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Combo box > > I am running into the issue of how to display multiple lines in a combo > box. > IIRC this is a "no can do" in the combos in VB.Net but there must be > common > workarounds. > > For example I need to allow the user to select a zip code, but he really > needs to see the zip AND the city. Furthermore my code is going to need > to > load a record based on that zip code to get lat/long. > > So, is there a way other than using a concatenation of the zip and the > city > to display both in the combo? If I do a concatenation, then I can no > longer > use the zip to lookup a record in a recordset since it now has city data > in > the string. > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.467 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 > 3:23 PM > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From mjrobertson at iinet.net.au Sat Apr 28 02:31:08 2007 From: mjrobertson at iinet.net.au (Mike) Date: Sat, 28 Apr 2007 17:31:08 +1000 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: <000001c78967$30cf3070$0600a8c0@D3NSLB1S> John, This was a very annoying issue when I started the move to .NET Apart from buying custom controls, the only way I found to reproduce multi-column combo/list boxes was to use a datagrid. Individual elements of the datagrid can then be accessed when a row or cell is selected. Regards, Mike Robertson -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, 28 April 2007 3:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/777 - Release Date: 26/04/2007 3:23 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/777 - Release Date: 26/04/2007 3:23 PM From jwcolby at colbyconsulting.com Sat Apr 28 07:07:41 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 08:07:41 -0400 Subject: [dba-VB] Combo box In-Reply-To: <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> Message-ID: <013401c7898d$d5881d90$657aa8c0@m6805> LOL, and it only gets better (worse). John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Saturday, April 28, 2007 2:56 AM To: ebarro at verizon.net; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. From jwcolby at colbyconsulting.com Sat Apr 28 08:58:42 2007 From: jwcolby at colbyconsulting.com (JWColby) Date: Sat, 28 Apr 2007 09:58:42 -0400 Subject: [dba-VB] Moving through an ADO recordset Message-ID: <013501c7899d$57d0f010$657aa8c0@m6805> In Access (because I was a DAO kinda guy) for smallish recordsets I would often create a class to hold a record (properties for each field I needed to work with) and a class to hold a collection of these classes. I would then read the data out into the record class instances, storing each record class instance in a collection in a "table" class. For example, I have an application already built in Access which calculates the population in all the zips which fall within a radius around a zip code. My brute force approach was to read about 42 thousand records from a table of zip codes, pulling just the zip, city, lat, long, population and house hold count. I would then store each record in a zip class instance which has a property for each of those fields in the record. The ZIPS (plural) class has a collection to hold the zip (singular) class. The ZIPS class opens the recordset and enters a loop creating zip class instances and passing the recordset off to the zip class instance which loads the fields into the properties, and on return the ZIPS class stores the populated zip class instance into a collection. Once loaded I have 42K zip class instances in a collection in a ZIPS class, keyed on the zipcode. Having done that I can now ask the user for a zip code and a radius. Using a formula which calculates the distance between two points (lat/long) I iterate through each and every zip class in the ZIPS collection storing in an "InRadius" collection all the zip classes where the distance between the user supplied zip's lat / long and the zip class being evaluated is less than the radius. Having done that, when I have examined every zip class in the big zip collection, I now have a collection containing pointers to only those zips within the radius. I now iterate that collection adding up the populations and house hold count of each zip class and display it in text boxes in the calculator form. It is a trivial application to write and other than the initial load of the zip classes from the recordset is pretty darned fast to calc the populations - of course depending on the radius. As an exercise in .Net I decided to port that application. There is one huge difference however, DAO is gone and I am faced with the ADO object (s) etc. The upside is that the ADO widget is actually a "disconnected" recordset, i.e. it reads it all into memory for me. This is a "read only" recordset, i.e. I am not updating records and writing them back to the table. This leads me to question whether it makes any sense to do the Zip/ZIPS class thing or just sweep through the ADO recordset itself. Are there record objects? Could I run directly through the recordset pulling pointers to record objects and storing those pointers in my collection? Could I add a field to my recordset called selected and sweep through the ADO recordset setting the SELECTED flag in each record that is within the radius, and then just apply a filter to the ADO recordset to "pull out" only the SELECTED records to sum them? And importantly, if doing it this way is possible, is it faster or slower than iterating my own collection? I would have to clear a selected flag between uses whereas a collection is just re-dimed to empty it and get it ready to fill again. Moving from one tool to another means re-examining the method used to ensure that it is still an efficient method in the new tool. Does anyone have any experience in iterating a ADO recordset in this manner? John W. Colby Colby Consulting www.ColbyConsulting.com From ebarro at verizon.net Sat Apr 28 09:41:17 2007 From: ebarro at verizon.net (Eric Barro) Date: Sat, 28 Apr 2007 07:41:17 -0700 Subject: [dba-VB] Moving through an ADO recordset In-Reply-To: <013501c7899d$57d0f010$657aa8c0@m6805> Message-ID: <0JH700CZ1Q4UL2A3@vms046.mailsrvcs.net> In ADO.NET you can mirror your database in datasets. Datasets are different from recordsets in that they are more similar to database containers. Recordsets in DAO are the table equivalents in ADO.NET. Thus, in one dataset object you can have multiple tables contained inside that dataset. You can define relations between those tables and you can perform filtering, sorting and yes update the records in the Dataset. The approach I have taken in .NET is to connect to the database and retrieve records from a table and fill a table object in a dataset object. I can then return the dataset object to my app or return a single table. I use collections such as Hashtables and Arraylists to iterate through the records. Here's a link that explains datasets in ADO.NET http://builder.com.com/5100-6388-1050109-2.html -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 6:59 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Moving through an ADO recordset In Access (because I was a DAO kinda guy) for smallish recordsets I would often create a class to hold a record (properties for each field I needed to work with) and a class to hold a collection of these classes. I would then read the data out into the record class instances, storing each record class instance in a collection in a "table" class. For example, I have an application already built in Access which calculates the population in all the zips which fall within a radius around a zip code. My brute force approach was to read about 42 thousand records from a table of zip codes, pulling just the zip, city, lat, long, population and house hold count. I would then store each record in a zip class instance which has a property for each of those fields in the record. The ZIPS (plural) class has a collection to hold the zip (singular) class. The ZIPS class opens the recordset and enters a loop creating zip class instances and passing the recordset off to the zip class instance which loads the fields into the properties, and on return the ZIPS class stores the populated zip class instance into a collection. Once loaded I have 42K zip class instances in a collection in a ZIPS class, keyed on the zipcode. Having done that I can now ask the user for a zip code and a radius. Using a formula which calculates the distance between two points (lat/long) I iterate through each and every zip class in the ZIPS collection storing in an "InRadius" collection all the zip classes where the distance between the user supplied zip's lat / long and the zip class being evaluated is less than the radius. Having done that, when I have examined every zip class in the big zip collection, I now have a collection containing pointers to only those zips within the radius. I now iterate that collection adding up the populations and house hold count of each zip class and display it in text boxes in the calculator form. It is a trivial application to write and other than the initial load of the zip classes from the recordset is pretty darned fast to calc the populations - of course depending on the radius. As an exercise in .Net I decided to port that application. There is one huge difference however, DAO is gone and I am faced with the ADO object (s) etc. The upside is that the ADO widget is actually a "disconnected" recordset, i.e. it reads it all into memory for me. This is a "read only" recordset, i.e. I am not updating records and writing them back to the table. This leads me to question whether it makes any sense to do the Zip/ZIPS class thing or just sweep through the ADO recordset itself. Are there record objects? Could I run directly through the recordset pulling pointers to record objects and storing those pointers in my collection? Could I add a field to my recordset called selected and sweep through the ADO recordset setting the SELECTED flag in each record that is within the radius, and then just apply a filter to the ADO recordset to "pull out" only the SELECTED records to sum them? And importantly, if doing it this way is possible, is it faster or slower than iterating my own collection? I would have to clear a selected flag between uses whereas a collection is just re-dimed to empty it and get it ready to fill again. Moving from one tool to another means re-examining the method used to ensure that it is still an efficient method in the new tool. Does anyone have any experience in iterating a ADO recordset in this manner? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.1/778 - Release Date: 4/27/2007 1:39 PM From bheid at sc.rr.com Sun Apr 29 17:18:07 2007 From: bheid at sc.rr.com (Bobby Heid) Date: Sun, 29 Apr 2007 18:18:07 -0400 Subject: [dba-VB] Combo box In-Reply-To: <013401c7898d$d5881d90$657aa8c0@m6805> References: <0JH700CN42O0L2I2@vms046.mailsrvcs.net> <001501c78962$41775b50$7d7d6c4c@jisshowsbs.local> <013401c7898d$d5881d90$657aa8c0@m6805> Message-ID: <000901c78aac$4418ea40$2c01a8c0@bhxp> John, If you load a table in a dataset with all of the desired fields in it (zip & Name, zip, name, ID, etc.), then bind a binding source to the table in the dataset, then bind the combo box to the ID and the zip & name fields. When the user selects an item in the combo box, you can use something like the bindingsource.currentrow (or something like that, I can not remember the name of it right now), to get all of the data in the current row, not just what is in the combo box. So check out the binding source and see if that will give you what you need. Bobby -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Saturday, April 28, 2007 8:08 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box LOL, and it only gets better (worse). John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Saturday, April 28, 2007 2:56 AM To: ebarro at verizon.net; dba-vb at databaseadvisors.com Subject: Re: [dba-VB] Combo box ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, what in the heck is the world coming to when there is no such thing as a simple d&d combo available ...y'all give me a headache, you do ...turning off the lights :( William Hindman ----- Original Message ----- From: "Eric Barro" To: Sent: Saturday, April 28, 2007 2:14 AM Subject: Re: [dba-VB] Combo box > This is my snippet of code should give you an idea...it is however in C# > and > specific to ASP.NET (web-based). It should be fairly easy to port it over > to > VB.NET and change a couple of lines to be Win32 specific. > > The function is a public method stored in my Data class... > > public static int BindDropDownList(DropDownList ddl, > string sql, string sqlConnect, Hashtable > sqlParameters, > string ddlTextField, string ddlValueField, bool > showDefaultSelection) > { > DataSet sqlDs; > > //count of records returned > int totalRecords; > //grab the connection string > string ConnectionString = > ConfigurationSettings.AppSettings.Get(sqlConnect); > //define and initialize the connection object > SqlConnection sqlConn = new > SqlConnection(ConnectionString); > //define and initialize the command object > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > //define the command type > sqlCmd.CommandType = CommandType.StoredProcedure; > > if (sqlParameters.Count > 0) > { > //get a collection of the keys > ICollection sqlParams = sqlParameters.Keys; > foreach (string key in sqlParams) > { > // add parameters to pass to the > sproc > sqlCmd.Parameters.Add(new > SqlParameter(key, sqlParameters[key].ToString())); > } > } > //open the connection > sqlConn.Open(); > //define the data adapter > SqlDataAdapter sqlDa = new SqlDataAdapter(); > //define the select command > sqlDa.SelectCommand = sqlCmd; > //initialize the dataset > sqlDs = new DataSet("MyList"); > //fill the dataset > sqlDa.Fill(sqlDs, "MyList"); > //define a session variable containing our dataset > System.Web.HttpContext.Current.Session["MyList"] = > sqlDs; > //grab the total number of records returned by the > sproc > totalRecords = sqlDs.Tables[0].Rows.Count; > if (totalRecords > 0) > { > if (showDefaultSelection) > { > DataRow newListRow = > sqlDs.Tables[0].NewRow(); > //this is the value that shows on > the dropdownlist > //specify an option that will be the > default selection > newListRow[ddlTextField] = "--Please > select one--"; > //this is the value that will be > posted to the database > newListRow[ddlValueField] = 0; > //add the new row > > sqlDs.Tables[0].Rows.Add(newListRow); > //specify a sort order based on > ddlValueField; this ensures that the newly added row will show up at the > top > sqlDs.Tables[0].DefaultView.Sort = > ddlValueField; > } > //close the connection > ddl.DataSource = > sqlDs.Tables[0].DefaultView; > ddl.DataTextField = ddlTextField; > ddl.DataValueField = ddlValueField; > ddl.DataBind(); > sqlConn.Close(); > } > return totalRecords; > } //end BindDropDownList > > > This is how I call it... > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > "ZipCity", "ZipCode", true); > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > use to lookup and store values. I believe this is referred to as > DisplayMember and ValueMember in Win32 comboboxes. > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > with whatever value I want to show in the dropdownlist. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Apr 30 10:49:27 2007 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 30 Apr 2007 08:49:27 -0700 Subject: [dba-VB] Combo box In-Reply-To: <012b01c78956$ec798c50$657aa8c0@m6805> References: <012b01c78956$ec798c50$657aa8c0@m6805> Message-ID: Combos in .Net are actually a kind of datagrid, so just binding the combo to a multicolumn source (or array or listview, etc.) should give you multiple columns. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Friday, April 27, 2007 10:35 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Combo box I am running into the issue of how to display multiple lines in a combo box. IIRC this is a "no can do" in the combos in VB.Net but there must be common workarounds. For example I need to allow the user to select a zip code, but he really needs to see the zip AND the city. Furthermore my code is going to need to load a record based on that zip code to get lat/long. So, is there a way other than using a concatenation of the zip and the city to display both in the combo? If I do a concatenation, then I can no longer use the zip to lookup a record in a recordset since it now has city data in the string. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From chizotz at mchsi.com Mon Apr 30 17:36:36 2007 From: chizotz at mchsi.com (Ron Allen) Date: Mon, 30 Apr 2007 22:36:36 +0000 Subject: [dba-VB] Combo box Message-ID: <043020072236.3859.46366F740003174200000F13219791299503010CD2079C080C03BF969B019607080C@mchsi.com> Or concatenate the information you want displayed in the dataset for the display member of the combo box, and set the value member to the field you need to use to get other data. That will easily and quickly give you a drop- down display that looks like: 63005 CHESTERFIELD 63011 BALLWIN 63012 BARNHART 63014 BERGER 63017 CHESTERFIELD 63021 BALLWIN 63025 EUREKA 63026 FENTON 63028 FESTUS 63031 FLORISSANT and will return either the zip or the city name as needed. You can also change the value member at run time to pull either the zip or the city name if that's needed; a little more work, but I don't think all that much. If that still doesn't work for you, you can create your own multiline combo box that inherits from the comboBox class. Here's a link to one example of how you might go about it: http://www.codeproject.com/cs/combobox/multicolumncombo.asp Ron > John, > > If you load a table in a dataset with all of the desired fields in it (zip & > Name, zip, name, ID, etc.), then bind a binding source to the table in the > dataset, then bind the combo box to the ID and the zip & name fields. When > the user selects an item in the combo box, you can use something like the > bindingsource.currentrow (or something like that, I can not remember the > name of it right now), to get all of the data in the current row, not just > what is in the combo box. > > So check out the binding source and see if that will give you what you need. > > Bobby > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of JWColby > Sent: Saturday, April 28, 2007 8:08 AM > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Combo box > > LOL, and it only gets better (worse). > > > John W. Colby > Colby Consulting > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of William Hindman > Sent: Saturday, April 28, 2007 2:56 AM > To: ebarro at verizon.net; dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] Combo box > > ...sigh ...shakes head ...closes "VB.Net for Dummies" ...mumbles to self, > what in the heck is the world coming to when there is no such thing as a > simple d&d combo available ...y'all give me a headache, you do ...turning > off the lights :( > > William Hindman > > ----- Original Message ----- > From: "Eric Barro" > To: > Sent: Saturday, April 28, 2007 2:14 AM > Subject: Re: [dba-VB] Combo box > > > > This is my snippet of code should give you an idea...it is however in C# > > and > > specific to ASP.NET (web-based). It should be fairly easy to port it over > > to > > VB.NET and change a couple of lines to be Win32 specific. > > > > The function is a public method stored in my Data class... > > > > public static int BindDropDownList(DropDownList ddl, > > string sql, string sqlConnect, Hashtable > > sqlParameters, > > string ddlTextField, string ddlValueField, bool > > showDefaultSelection) > > { > > DataSet sqlDs; > > > > //count of records returned > > int totalRecords; > > //grab the connection string > > string ConnectionString = > > ConfigurationSettings.AppSettings.Get(sqlConnect); > > //define and initialize the connection object > > SqlConnection sqlConn = new > > SqlConnection(ConnectionString); > > //define and initialize the command object > > SqlCommand sqlCmd = new SqlCommand(sql, sqlConn); > > //define the command type > > sqlCmd.CommandType = CommandType.StoredProcedure; > > > > if (sqlParameters.Count > 0) > > { > > //get a collection of the keys > > ICollection sqlParams = sqlParameters.Keys; > > foreach (string key in sqlParams) > > { > > // add parameters to pass to the > > sproc > > sqlCmd.Parameters.Add(new > > SqlParameter(key, sqlParameters[key].ToString())); > > } > > } > > //open the connection > > sqlConn.Open(); > > //define the data adapter > > SqlDataAdapter sqlDa = new SqlDataAdapter(); > > //define the select command > > sqlDa.SelectCommand = sqlCmd; > > //initialize the dataset > > sqlDs = new DataSet("MyList"); > > //fill the dataset > > sqlDa.Fill(sqlDs, "MyList"); > > //define a session variable containing our dataset > > System.Web.HttpContext.Current.Session["MyList"] = > > sqlDs; > > //grab the total number of records returned by the > > sproc > > totalRecords = sqlDs.Tables[0].Rows.Count; > > if (totalRecords > 0) > > { > > if (showDefaultSelection) > > { > > DataRow newListRow = > > sqlDs.Tables[0].NewRow(); > > //this is the value that shows on > > the dropdownlist > > //specify an option that will be the > > default selection > > newListRow[ddlTextField] = "--Please > > select one--"; > > //this is the value that will be > > posted to the database > > newListRow[ddlValueField] = 0; > > //add the new row > > > > sqlDs.Tables[0].Rows.Add(newListRow); > > //specify a sort order based on > > ddlValueField; this ensures that the newly added row will show up at the > > top > > sqlDs.Tables[0].DefaultView.Sort = > > ddlValueField; > > } > > //close the connection > > ddl.DataSource = > > sqlDs.Tables[0].DefaultView; > > ddl.DataTextField = ddlTextField; > > ddl.DataValueField = ddlValueField; > > ddl.DataBind(); > > sqlConn.Close(); > > } > > return totalRecords; > > } //end BindDropDownList > > > > > > This is how I call it... > > > > Data.BindDropDownList(uxZipCodeList, sql, connectionString, sqlParameters, > > "ZipCity", "ZipCode", true); > > > > ZipCity is what I use to display in the dropdownlist and ZipCode is what I > > use to lookup and store values. I believe this is referred to as > > DisplayMember and ValueMember in Win32 comboboxes. > > > > In my SQL stored procedure I simply make sure that ZipCity is concatenated > > with whatever value I want to show in the dropdownlist. > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com >