From Gustav at cactus.dk Wed Feb 3 04:45:49 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 03 Feb 2010 11:45:49 +0100 Subject: [dba-VB] MonoTouch: Develop in .Net for iPad, iPhone, iPod Message-ID: Hi all Interesting: Novell to support Apple iPad application development http://www.novell.com/prblogs/?p=1827 MonoTouch is a software development kit that will enable iPad developers to utilize code and libraries written for the .NET development framework and easier-to-use programming languages such as C#. Microsoft .NET developers will be able to use MonoTouch while fully complying with Apple's license terms. MonoTouch: http://monotouch.net/ From shamil at smsconsulting.spb.ru Tue Feb 16 14:38:38 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 16 Feb 2010 23:38:38 +0300 Subject: [dba-VB] Visio Automation Message-ID: <008001caaf48$05e99260$11bcb720$@spb.ru> Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil From wdhindman at dejpolsystems.com Tue Feb 16 15:54:40 2010 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 16 Feb 2010 16:54:40 -0500 Subject: [dba-VB] Visio Automation In-Reply-To: <008001caaf48$05e99260$11bcb720$@spb.ru> References: <008001caaf48$05e99260$11bcb720$@spb.ru> Message-ID: <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> ...the problem I have with Visio is that there is no runtime available for deploying an application ...each user has to have Visio installed if they do anything other than view the results ...it's a very nice tool if your clients can afford it ...but not in my world. William -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Tuesday, February 16, 2010 3:38 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Visio Automation > Hi All - > > > > FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: > > > > http://visioautomation.codeplex.com/ > > > > and here is a sample video clip about what can be done with this tool: > > > > http://www.vimeo.com/6783783 > > > > Automation via command line custom tool's commands, imagine that! > > > > What real life business use case scenarios that tool is intended to be > used > at? > > > > Thank you. > > > > -- > > Shamil > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From davidmcafee at gmail.com Tue Feb 16 16:00:39 2010 From: davidmcafee at gmail.com (David McAfee) Date: Tue, 16 Feb 2010 14:00:39 -0800 Subject: [dba-VB] Visio Automation In-Reply-To: <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> Message-ID: <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From accessd at shaw.ca Tue Feb 16 16:02:31 2010 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 16 Feb 2010 14:02:31 -0800 Subject: [dba-VB] Visio Automation In-Reply-To: <008001caaf48$05e99260$11bcb720$@spb.ru> References: <008001caaf48$05e99260$11bcb720$@spb.ru> Message-ID: <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> Hi Shamil: Very Useful... good link. I can not imagine how long it took to write. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, February 16, 2010 12:39 PM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: [dba-VB] Visio Automation Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at smsconsulting.spb.ru Wed Feb 17 00:10:37 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 17 Feb 2010 09:10:37 +0300 Subject: [dba-VB] Visio Automation In-Reply-To: <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> Message-ID: <009a01caaf97$eedbdfb0$cc939f10$@spb.ru> Hi Jim -- In fact using System.Reflection and a COM interop classlib DLL generated by .NET, one can write some code to automate creation of many parts of the code of this Visio PowerShell - I'm guessing it was done like that, I can be wrong... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Wednesday, February 17, 2010 1:03 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Visio Automation Hi Shamil: Very Useful... good link. I can not imagine how long it took to write. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, February 16, 2010 12:39 PM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: [dba-VB] Visio Automation Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From Gustav at cactus.dk Wed Feb 17 02:31:09 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 17 Feb 2010 09:31:09 +0100 Subject: [dba-VB] Visio Automation Message-ID: Hi Shamil Interesting and impressive, and also an example of using PowerShell but - as you note - what to use it for? I could think of one purpose: If you have a large and changing network you could use some kind of network scanner and feed the collected info to this tool to dynamically modify drawings of the network. But if you administer such a network and have this need, I guess you would prefer an integrated tool and you would have the budget necessary. /gustav >>> shamil at smsconsulting.spb.ru 16-02-2010 21:38 >>> Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil From cfoust at infostatsystems.com Wed Feb 17 11:28:33 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 17 Feb 2010 11:28:33 -0600 Subject: [dba-VB] Visio Automation In-Reply-To: <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> Message-ID: Different versions of Visio have different capabilities, but it's an awesome program overall. Flow charts are merely the tip of the iceberg. You can document and keep track of networks, equipment, systems. You can create interactive graphics that allow the user to drill down to more information. It can use Access as a datastore. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Tuesday, February 16, 2010 2:01 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From dwaters at usinternet.com Wed Feb 17 11:44:57 2010 From: dwaters at usinternet.com (Dan Waters) Date: Wed, 17 Feb 2010 11:44:57 -0600 Subject: [dba-VB] Visio Automation In-Reply-To: References: <008001caaf48$05e99260$11bcb720$@spb.ru><6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev><8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> Message-ID: If you have a copy, take a look at the Brainstorming template - it's a great tool to use in a problem-solving meeting to document clearly what was discussed! Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Wednesday, February 17, 2010 11:29 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation Different versions of Visio have different capabilities, but it's an awesome program overall. Flow charts are merely the tip of the iceberg. You can document and keep track of networks, equipment, systems. You can create interactive graphics that allow the user to drill down to more information. It can use Access as a datastore. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Tuesday, February 16, 2010 2:01 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From gustav at cactus.dk Thu Feb 18 16:11:27 2010 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 18 Feb 2010 23:11:27 +0100 Subject: [dba-VB] From .NET to Linux in Five Easy Steps Message-ID: Hi all A brief and good article on starting cross-platform development with Visual Studio and .Net is out: Step 1: Prepare Your Workstation Step 2: Analyze the Application with MoMA, the Mono Migration Analyzer Step 3: Run the Application Locally Step 4: Run and Debug the Application on a Remote Linux Machine Step 5: Deploy the Application With Mono and Mono Tools for Visual Studio, .NET-skilled developers can easily migrate .NET applications to Linux. What's more, they can develop, debug, test and deploy new .NET applications for Linux as well as other platforms, all without leaving their Visual Studio comfort zone. This article presents a straightforward, five-step process for using Mono and Mono Tools for Visual Studio to move from .NET to Linux. The Mono Tools automate much of the work. http://www.novell.com/connectionmagazine/2010/02/mono_tools.html?sourceid=NCM_0110_tt12 /gustav From jwcolby at colbyconsulting.com Fri Feb 19 13:21:15 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 14:21:15 -0500 Subject: [dba-VB] C# edit and continue Message-ID: <4B7EE4AB.3030407@colbyconsulting.com> Does anyone know if the 64 bit edit and continue is fixed in Visual Studio 2010? -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Feb 19 13:28:09 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 14:28:09 -0500 Subject: [dba-VB] c# - manipulating datasets in memory Message-ID: <4B7EE649.9020106@colbyconsulting.com> I have written a C# fixed width file export for a specific purpose, exporting name / address orders for a client. The data comes from a specific view of a SQL Server order database. I need to insert a small set of additional "seed names" in the result set. For technical reasons I really want to do this as I am writing the file to disk. IOW it would be good if I could pull the order names into a data reader, union the seed names, sort on zip and write the data reader out to disk (fixed width file). The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back in the database to get the seed names in before the writer ever gets the list of names to write. So... I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. How would I go about pulling two datasets with the exact same fields (order and seed names) and then union them in memory before writing that union to file? Any ideas? -- John W. Colby www.ColbyConsulting.com From dwaters at usinternet.com Fri Feb 19 13:31:09 2010 From: dwaters at usinternet.com (Dan Waters) Date: Fri, 19 Feb 2010 13:31:09 -0600 Subject: [dba-VB] C# edit and continue In-Reply-To: <4B7EE4AB.3030407@colbyconsulting.com> References: <4B7EE4AB.3030407@colbyconsulting.com> Message-ID: I've read a headline that there is (or will soon be) at patch for VS 2010 RC. Perhaps that's included. -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, February 19, 2010 1:21 PM To: VBA Subject: [dba-VB] C# edit and continue Does anyone know if the 64 bit edit and continue is fixed in Visual Studio 2010? -- John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From davidmcafee at gmail.com Fri Feb 19 13:33:25 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 19 Feb 2010 11:33:25 -0800 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EE649.9020106@colbyconsulting.com> References: <4B7EE649.9020106@colbyconsulting.com> Message-ID: <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> Why not pass the seeds to a SPROC and call the sproc instead of the view? CREATE PROCEDURE stpMySProc (@SeedName1, @SeedName2) AS SELECT @SeedName1 AS SeedName1, @SeedName2 AS SeedName2, A.* FROM vwMyView AS A Now, instead of calling vwMyView, call stpMySproc. D On Fri, Feb 19, 2010 at 11:28 AM, jwcolby wrote: > I have written a C# fixed width file export for a specific purpose, exporting name / address orders > for a client. > > The data comes from a specific view of a SQL Server order database. ?I need to insert a small set of > additional "seed names" in the result set. ?For technical reasons I really want to do this as I am > writing the file to disk. ?IOW it would be good if I could pull the order names into a data reader, > union the seed names, sort on zip and write the data reader out to disk (fixed width file). > > The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back > in the database to get the seed names in before the writer ever gets the list of names to write. > > So... > > I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. > How would I go about pulling two datasets with the exact same fields (order and seed names) and then > union them in memory before writing that union to file? > > Any ideas? > > -- > John W. Colby > www.ColbyConsulting.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From james at fcidms.com Fri Feb 19 14:05:34 2010 From: james at fcidms.com (James Barash) Date: Fri, 19 Feb 2010 15:05:34 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EE649.9020106@colbyconsulting.com> Message-ID: <12D2F894654B53498DEF840AE12B7BB3706E586D@fciexchange.fcidms.com> John: I don't have the syntax for C# but in VB, you can use LINQ to create a union of two datatables in memory. Assuming you have the two datatables dt1 and dt2: Dim unionqry = (From p1 In dt1 Select p1).Union(From p2 In dt2 Select p2) You should be able to use unionqry in your fixed width writer, or you could convert it to a datatable using its method: CopyToDataTable. Hopefully, that should give you a good starting point. James Barash -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, February 19, 2010 2:28 PM To: VBA Subject: [dba-VB] c# - manipulating datasets in memory I have written a C# fixed width file export for a specific purpose, exporting name / address orders for a client. The data comes from a specific view of a SQL Server order database. I need to insert a small set of additional "seed names" in the result set. For technical reasons I really want to do this as I am writing the file to disk. IOW it would be good if I could pull the order names into a data reader, union the seed names, sort on zip and write the data reader out to disk (fixed width file). The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back in the database to get the seed names in before the writer ever gets the list of names to write. So... I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. How would I go about pulling two datasets with the exact same fields (order and seed names) and then union them in memory before writing that union to file? Any ideas? -- John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Feb 19 14:07:47 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 15:07:47 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> References: <4B7EE649.9020106@colbyconsulting.com> <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> Message-ID: <4B7EEF93.7090507@colbyconsulting.com> "There's more ways to kill a cat (than choking it to death on butter)" as my momma used to say. I have never used an sproc to return a dataset. That would certainly solve the problem but it may not be flexible enough. The client sometimes specifies sets of records. "Age in (2,3,4)" will be set 1, "Age in (5,6,7)" will be set 2 etc. All exported data has keycodes inserted in a specific position in the fixed width file. Sometimes the keycodes change based on the set. Sometimes the sets have to go in a single file, sometimes in separate files. You get the picture. In all cases, the seed names need to get in the file once. If the sets have different keycodes but all go in a single file, then the seeds go in the only file. If the sets have different keycodes but go in separate files then the seeds go in each file. It is a heck of a job getting it all straight and all out into the correct files. In the past I always used Access. Access has certain advantages, such as the ability to generate queries right in Access and then use those queries for the export. In the past I would copy an access template database into the target directory (where the files are going) and then open it, prepare queries, export, modify, export and so forth. I am now writing a C# program to handle all things for this client and was looking to build this export piece as one of the modules in this shiny new application. It is kinda sorta working but my "messing around" has been moved backwards into the SQL Server order database instead of in Access. That is OK, but I really want to try and get this whole thing much more point-and-click. As an example, I am told as part of the order that Group A has keycode W, Group B has keycode X etc. ATM I am having to manually write update queries back in SQL Server to update the actual order table, setting the keycode field to the right thing for the correct group. That kind of thing. I am trying to move that stuff out of the order database and into code / form in C#. In my Access database FE for doing this, I had controls where I could specify values, keycodes etc. and then I build SQL on-the-fly. VBA is much more friendly than C# for writing / troubleshooting, especially when I am running this all on a x64 server and don't have C# edit and continue. John W. Colby www.ColbyConsulting.com David McAfee wrote: > Why not pass the seeds to a SPROC and call the sproc instead of the view? > > CREATE PROCEDURE stpMySProc (@SeedName1, @SeedName2) AS > SELECT @SeedName1 AS SeedName1, @SeedName2 AS SeedName2, A.* > FROM vwMyView AS A > > Now, instead of calling vwMyView, call stpMySproc. > > D From jwcolby at colbyconsulting.com Fri Feb 19 23:21:38 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 20 Feb 2010 00:21:38 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EEF93.7090507@colbyconsulting.com> References: <4B7EE649.9020106@colbyconsulting.com> <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> <4B7EEF93.7090507@colbyconsulting.com> Message-ID: <4B7F7162.8000108@colbyconsulting.com> Woa doggie! I have just created a dataset, two data tables - dtOrder and dtSeed, merged dtSeed into dtOrder, set the dtOrder.defaultview.Filter and dtOrder.DefaultView.Sort properties, then iterated the .DefaultView to print the rows. All in all a fairly minor modification to my existing code and voila, I have my order out. I can now set a filter right in code, and sort on any column or combination of columns in the defaultview object. I am jazzed! Of course now I need to see how it works on a large table. John W. Colby www.ColbyConsulting.com From Gustav at cactus.dk Wed Feb 3 04:45:49 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 03 Feb 2010 11:45:49 +0100 Subject: [dba-VB] MonoTouch: Develop in .Net for iPad, iPhone, iPod Message-ID: Hi all Interesting: Novell to support Apple iPad application development http://www.novell.com/prblogs/?p=1827 MonoTouch is a software development kit that will enable iPad developers to utilize code and libraries written for the .NET development framework and easier-to-use programming languages such as C#. Microsoft .NET developers will be able to use MonoTouch while fully complying with Apple's license terms. MonoTouch: http://monotouch.net/ From shamil at smsconsulting.spb.ru Tue Feb 16 14:38:38 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 16 Feb 2010 23:38:38 +0300 Subject: [dba-VB] Visio Automation Message-ID: <008001caaf48$05e99260$11bcb720$@spb.ru> Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil From wdhindman at dejpolsystems.com Tue Feb 16 15:54:40 2010 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 16 Feb 2010 16:54:40 -0500 Subject: [dba-VB] Visio Automation In-Reply-To: <008001caaf48$05e99260$11bcb720$@spb.ru> References: <008001caaf48$05e99260$11bcb720$@spb.ru> Message-ID: <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> ...the problem I have with Visio is that there is no runtime available for deploying an application ...each user has to have Visio installed if they do anything other than view the results ...it's a very nice tool if your clients can afford it ...but not in my world. William -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Tuesday, February 16, 2010 3:38 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Visio Automation > Hi All - > > > > FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: > > > > http://visioautomation.codeplex.com/ > > > > and here is a sample video clip about what can be done with this tool: > > > > http://www.vimeo.com/6783783 > > > > Automation via command line custom tool's commands, imagine that! > > > > What real life business use case scenarios that tool is intended to be > used > at? > > > > Thank you. > > > > -- > > Shamil > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From davidmcafee at gmail.com Tue Feb 16 16:00:39 2010 From: davidmcafee at gmail.com (David McAfee) Date: Tue, 16 Feb 2010 14:00:39 -0800 Subject: [dba-VB] Visio Automation In-Reply-To: <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> Message-ID: <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From accessd at shaw.ca Tue Feb 16 16:02:31 2010 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 16 Feb 2010 14:02:31 -0800 Subject: [dba-VB] Visio Automation In-Reply-To: <008001caaf48$05e99260$11bcb720$@spb.ru> References: <008001caaf48$05e99260$11bcb720$@spb.ru> Message-ID: <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> Hi Shamil: Very Useful... good link. I can not imagine how long it took to write. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, February 16, 2010 12:39 PM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: [dba-VB] Visio Automation Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at smsconsulting.spb.ru Wed Feb 17 00:10:37 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 17 Feb 2010 09:10:37 +0300 Subject: [dba-VB] Visio Automation In-Reply-To: <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> Message-ID: <009a01caaf97$eedbdfb0$cc939f10$@spb.ru> Hi Jim -- In fact using System.Reflection and a COM interop classlib DLL generated by .NET, one can write some code to automate creation of many parts of the code of this Visio PowerShell - I'm guessing it was done like that, I can be wrong... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Wednesday, February 17, 2010 1:03 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Visio Automation Hi Shamil: Very Useful... good link. I can not imagine how long it took to write. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, February 16, 2010 12:39 PM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: [dba-VB] Visio Automation Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From Gustav at cactus.dk Wed Feb 17 02:31:09 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 17 Feb 2010 09:31:09 +0100 Subject: [dba-VB] Visio Automation Message-ID: Hi Shamil Interesting and impressive, and also an example of using PowerShell but - as you note - what to use it for? I could think of one purpose: If you have a large and changing network you could use some kind of network scanner and feed the collected info to this tool to dynamically modify drawings of the network. But if you administer such a network and have this need, I guess you would prefer an integrated tool and you would have the budget necessary. /gustav >>> shamil at smsconsulting.spb.ru 16-02-2010 21:38 >>> Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil From cfoust at infostatsystems.com Wed Feb 17 11:28:33 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 17 Feb 2010 11:28:33 -0600 Subject: [dba-VB] Visio Automation In-Reply-To: <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> Message-ID: Different versions of Visio have different capabilities, but it's an awesome program overall. Flow charts are merely the tip of the iceberg. You can document and keep track of networks, equipment, systems. You can create interactive graphics that allow the user to drill down to more information. It can use Access as a datastore. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Tuesday, February 16, 2010 2:01 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From dwaters at usinternet.com Wed Feb 17 11:44:57 2010 From: dwaters at usinternet.com (Dan Waters) Date: Wed, 17 Feb 2010 11:44:57 -0600 Subject: [dba-VB] Visio Automation In-Reply-To: References: <008001caaf48$05e99260$11bcb720$@spb.ru><6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev><8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> Message-ID: If you have a copy, take a look at the Brainstorming template - it's a great tool to use in a problem-solving meeting to document clearly what was discussed! Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Wednesday, February 17, 2010 11:29 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation Different versions of Visio have different capabilities, but it's an awesome program overall. Flow charts are merely the tip of the iceberg. You can document and keep track of networks, equipment, systems. You can create interactive graphics that allow the user to drill down to more information. It can use Access as a datastore. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Tuesday, February 16, 2010 2:01 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From gustav at cactus.dk Thu Feb 18 16:11:27 2010 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 18 Feb 2010 23:11:27 +0100 Subject: [dba-VB] From .NET to Linux in Five Easy Steps Message-ID: Hi all A brief and good article on starting cross-platform development with Visual Studio and .Net is out: Step 1: Prepare Your Workstation Step 2: Analyze the Application with MoMA, the Mono Migration Analyzer Step 3: Run the Application Locally Step 4: Run and Debug the Application on a Remote Linux Machine Step 5: Deploy the Application With Mono and Mono Tools for Visual Studio, .NET-skilled developers can easily migrate .NET applications to Linux. What's more, they can develop, debug, test and deploy new .NET applications for Linux as well as other platforms, all without leaving their Visual Studio comfort zone. This article presents a straightforward, five-step process for using Mono and Mono Tools for Visual Studio to move from .NET to Linux. The Mono Tools automate much of the work. http://www.novell.com/connectionmagazine/2010/02/mono_tools.html?sourceid=NCM_0110_tt12 /gustav From jwcolby at colbyconsulting.com Fri Feb 19 13:21:15 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 14:21:15 -0500 Subject: [dba-VB] C# edit and continue Message-ID: <4B7EE4AB.3030407@colbyconsulting.com> Does anyone know if the 64 bit edit and continue is fixed in Visual Studio 2010? -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Feb 19 13:28:09 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 14:28:09 -0500 Subject: [dba-VB] c# - manipulating datasets in memory Message-ID: <4B7EE649.9020106@colbyconsulting.com> I have written a C# fixed width file export for a specific purpose, exporting name / address orders for a client. The data comes from a specific view of a SQL Server order database. I need to insert a small set of additional "seed names" in the result set. For technical reasons I really want to do this as I am writing the file to disk. IOW it would be good if I could pull the order names into a data reader, union the seed names, sort on zip and write the data reader out to disk (fixed width file). The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back in the database to get the seed names in before the writer ever gets the list of names to write. So... I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. How would I go about pulling two datasets with the exact same fields (order and seed names) and then union them in memory before writing that union to file? Any ideas? -- John W. Colby www.ColbyConsulting.com From dwaters at usinternet.com Fri Feb 19 13:31:09 2010 From: dwaters at usinternet.com (Dan Waters) Date: Fri, 19 Feb 2010 13:31:09 -0600 Subject: [dba-VB] C# edit and continue In-Reply-To: <4B7EE4AB.3030407@colbyconsulting.com> References: <4B7EE4AB.3030407@colbyconsulting.com> Message-ID: I've read a headline that there is (or will soon be) at patch for VS 2010 RC. Perhaps that's included. -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, February 19, 2010 1:21 PM To: VBA Subject: [dba-VB] C# edit and continue Does anyone know if the 64 bit edit and continue is fixed in Visual Studio 2010? -- John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From davidmcafee at gmail.com Fri Feb 19 13:33:25 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 19 Feb 2010 11:33:25 -0800 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EE649.9020106@colbyconsulting.com> References: <4B7EE649.9020106@colbyconsulting.com> Message-ID: <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> Why not pass the seeds to a SPROC and call the sproc instead of the view? CREATE PROCEDURE stpMySProc (@SeedName1, @SeedName2) AS SELECT @SeedName1 AS SeedName1, @SeedName2 AS SeedName2, A.* FROM vwMyView AS A Now, instead of calling vwMyView, call stpMySproc. D On Fri, Feb 19, 2010 at 11:28 AM, jwcolby wrote: > I have written a C# fixed width file export for a specific purpose, exporting name / address orders > for a client. > > The data comes from a specific view of a SQL Server order database. ?I need to insert a small set of > additional "seed names" in the result set. ?For technical reasons I really want to do this as I am > writing the file to disk. ?IOW it would be good if I could pull the order names into a data reader, > union the seed names, sort on zip and write the data reader out to disk (fixed width file). > > The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back > in the database to get the seed names in before the writer ever gets the list of names to write. > > So... > > I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. > How would I go about pulling two datasets with the exact same fields (order and seed names) and then > union them in memory before writing that union to file? > > Any ideas? > > -- > John W. Colby > www.ColbyConsulting.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From james at fcidms.com Fri Feb 19 14:05:34 2010 From: james at fcidms.com (James Barash) Date: Fri, 19 Feb 2010 15:05:34 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EE649.9020106@colbyconsulting.com> Message-ID: <12D2F894654B53498DEF840AE12B7BB3706E586D@fciexchange.fcidms.com> John: I don't have the syntax for C# but in VB, you can use LINQ to create a union of two datatables in memory. Assuming you have the two datatables dt1 and dt2: Dim unionqry = (From p1 In dt1 Select p1).Union(From p2 In dt2 Select p2) You should be able to use unionqry in your fixed width writer, or you could convert it to a datatable using its method: CopyToDataTable. Hopefully, that should give you a good starting point. James Barash -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, February 19, 2010 2:28 PM To: VBA Subject: [dba-VB] c# - manipulating datasets in memory I have written a C# fixed width file export for a specific purpose, exporting name / address orders for a client. The data comes from a specific view of a SQL Server order database. I need to insert a small set of additional "seed names" in the result set. For technical reasons I really want to do this as I am writing the file to disk. IOW it would be good if I could pull the order names into a data reader, union the seed names, sort on zip and write the data reader out to disk (fixed width file). The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back in the database to get the seed names in before the writer ever gets the list of names to write. So... I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. How would I go about pulling two datasets with the exact same fields (order and seed names) and then union them in memory before writing that union to file? Any ideas? -- John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Feb 19 14:07:47 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 15:07:47 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> References: <4B7EE649.9020106@colbyconsulting.com> <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> Message-ID: <4B7EEF93.7090507@colbyconsulting.com> "There's more ways to kill a cat (than choking it to death on butter)" as my momma used to say. I have never used an sproc to return a dataset. That would certainly solve the problem but it may not be flexible enough. The client sometimes specifies sets of records. "Age in (2,3,4)" will be set 1, "Age in (5,6,7)" will be set 2 etc. All exported data has keycodes inserted in a specific position in the fixed width file. Sometimes the keycodes change based on the set. Sometimes the sets have to go in a single file, sometimes in separate files. You get the picture. In all cases, the seed names need to get in the file once. If the sets have different keycodes but all go in a single file, then the seeds go in the only file. If the sets have different keycodes but go in separate files then the seeds go in each file. It is a heck of a job getting it all straight and all out into the correct files. In the past I always used Access. Access has certain advantages, such as the ability to generate queries right in Access and then use those queries for the export. In the past I would copy an access template database into the target directory (where the files are going) and then open it, prepare queries, export, modify, export and so forth. I am now writing a C# program to handle all things for this client and was looking to build this export piece as one of the modules in this shiny new application. It is kinda sorta working but my "messing around" has been moved backwards into the SQL Server order database instead of in Access. That is OK, but I really want to try and get this whole thing much more point-and-click. As an example, I am told as part of the order that Group A has keycode W, Group B has keycode X etc. ATM I am having to manually write update queries back in SQL Server to update the actual order table, setting the keycode field to the right thing for the correct group. That kind of thing. I am trying to move that stuff out of the order database and into code / form in C#. In my Access database FE for doing this, I had controls where I could specify values, keycodes etc. and then I build SQL on-the-fly. VBA is much more friendly than C# for writing / troubleshooting, especially when I am running this all on a x64 server and don't have C# edit and continue. John W. Colby www.ColbyConsulting.com David McAfee wrote: > Why not pass the seeds to a SPROC and call the sproc instead of the view? > > CREATE PROCEDURE stpMySProc (@SeedName1, @SeedName2) AS > SELECT @SeedName1 AS SeedName1, @SeedName2 AS SeedName2, A.* > FROM vwMyView AS A > > Now, instead of calling vwMyView, call stpMySproc. > > D From jwcolby at colbyconsulting.com Fri Feb 19 23:21:38 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 20 Feb 2010 00:21:38 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EEF93.7090507@colbyconsulting.com> References: <4B7EE649.9020106@colbyconsulting.com> <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> <4B7EEF93.7090507@colbyconsulting.com> Message-ID: <4B7F7162.8000108@colbyconsulting.com> Woa doggie! I have just created a dataset, two data tables - dtOrder and dtSeed, merged dtSeed into dtOrder, set the dtOrder.defaultview.Filter and dtOrder.DefaultView.Sort properties, then iterated the .DefaultView to print the rows. All in all a fairly minor modification to my existing code and voila, I have my order out. I can now set a filter right in code, and sort on any column or combination of columns in the defaultview object. I am jazzed! Of course now I need to see how it works on a large table. John W. Colby www.ColbyConsulting.com From Gustav at cactus.dk Wed Feb 3 04:45:49 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 03 Feb 2010 11:45:49 +0100 Subject: [dba-VB] MonoTouch: Develop in .Net for iPad, iPhone, iPod Message-ID: Hi all Interesting: Novell to support Apple iPad application development http://www.novell.com/prblogs/?p=1827 MonoTouch is a software development kit that will enable iPad developers to utilize code and libraries written for the .NET development framework and easier-to-use programming languages such as C#. Microsoft .NET developers will be able to use MonoTouch while fully complying with Apple's license terms. MonoTouch: http://monotouch.net/ From shamil at smsconsulting.spb.ru Tue Feb 16 14:38:38 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 16 Feb 2010 23:38:38 +0300 Subject: [dba-VB] Visio Automation Message-ID: <008001caaf48$05e99260$11bcb720$@spb.ru> Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil From wdhindman at dejpolsystems.com Tue Feb 16 15:54:40 2010 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 16 Feb 2010 16:54:40 -0500 Subject: [dba-VB] Visio Automation In-Reply-To: <008001caaf48$05e99260$11bcb720$@spb.ru> References: <008001caaf48$05e99260$11bcb720$@spb.ru> Message-ID: <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> ...the problem I have with Visio is that there is no runtime available for deploying an application ...each user has to have Visio installed if they do anything other than view the results ...it's a very nice tool if your clients can afford it ...but not in my world. William -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Tuesday, February 16, 2010 3:38 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Visio Automation > Hi All - > > > > FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: > > > > http://visioautomation.codeplex.com/ > > > > and here is a sample video clip about what can be done with this tool: > > > > http://www.vimeo.com/6783783 > > > > Automation via command line custom tool's commands, imagine that! > > > > What real life business use case scenarios that tool is intended to be > used > at? > > > > Thank you. > > > > -- > > Shamil > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From davidmcafee at gmail.com Tue Feb 16 16:00:39 2010 From: davidmcafee at gmail.com (David McAfee) Date: Tue, 16 Feb 2010 14:00:39 -0800 Subject: [dba-VB] Visio Automation In-Reply-To: <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> Message-ID: <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From accessd at shaw.ca Tue Feb 16 16:02:31 2010 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 16 Feb 2010 14:02:31 -0800 Subject: [dba-VB] Visio Automation In-Reply-To: <008001caaf48$05e99260$11bcb720$@spb.ru> References: <008001caaf48$05e99260$11bcb720$@spb.ru> Message-ID: <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> Hi Shamil: Very Useful... good link. I can not imagine how long it took to write. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, February 16, 2010 12:39 PM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: [dba-VB] Visio Automation Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at smsconsulting.spb.ru Wed Feb 17 00:10:37 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 17 Feb 2010 09:10:37 +0300 Subject: [dba-VB] Visio Automation In-Reply-To: <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> Message-ID: <009a01caaf97$eedbdfb0$cc939f10$@spb.ru> Hi Jim -- In fact using System.Reflection and a COM interop classlib DLL generated by .NET, one can write some code to automate creation of many parts of the code of this Visio PowerShell - I'm guessing it was done like that, I can be wrong... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Wednesday, February 17, 2010 1:03 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Visio Automation Hi Shamil: Very Useful... good link. I can not imagine how long it took to write. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, February 16, 2010 12:39 PM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: [dba-VB] Visio Automation Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From Gustav at cactus.dk Wed Feb 17 02:31:09 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 17 Feb 2010 09:31:09 +0100 Subject: [dba-VB] Visio Automation Message-ID: Hi Shamil Interesting and impressive, and also an example of using PowerShell but - as you note - what to use it for? I could think of one purpose: If you have a large and changing network you could use some kind of network scanner and feed the collected info to this tool to dynamically modify drawings of the network. But if you administer such a network and have this need, I guess you would prefer an integrated tool and you would have the budget necessary. /gustav >>> shamil at smsconsulting.spb.ru 16-02-2010 21:38 >>> Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil From cfoust at infostatsystems.com Wed Feb 17 11:28:33 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 17 Feb 2010 11:28:33 -0600 Subject: [dba-VB] Visio Automation In-Reply-To: <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> Message-ID: Different versions of Visio have different capabilities, but it's an awesome program overall. Flow charts are merely the tip of the iceberg. You can document and keep track of networks, equipment, systems. You can create interactive graphics that allow the user to drill down to more information. It can use Access as a datastore. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Tuesday, February 16, 2010 2:01 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From dwaters at usinternet.com Wed Feb 17 11:44:57 2010 From: dwaters at usinternet.com (Dan Waters) Date: Wed, 17 Feb 2010 11:44:57 -0600 Subject: [dba-VB] Visio Automation In-Reply-To: References: <008001caaf48$05e99260$11bcb720$@spb.ru><6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev><8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> Message-ID: If you have a copy, take a look at the Brainstorming template - it's a great tool to use in a problem-solving meeting to document clearly what was discussed! Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Wednesday, February 17, 2010 11:29 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation Different versions of Visio have different capabilities, but it's an awesome program overall. Flow charts are merely the tip of the iceberg. You can document and keep track of networks, equipment, systems. You can create interactive graphics that allow the user to drill down to more information. It can use Access as a datastore. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Tuesday, February 16, 2010 2:01 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From gustav at cactus.dk Thu Feb 18 16:11:27 2010 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 18 Feb 2010 23:11:27 +0100 Subject: [dba-VB] From .NET to Linux in Five Easy Steps Message-ID: Hi all A brief and good article on starting cross-platform development with Visual Studio and .Net is out: Step 1: Prepare Your Workstation Step 2: Analyze the Application with MoMA, the Mono Migration Analyzer Step 3: Run the Application Locally Step 4: Run and Debug the Application on a Remote Linux Machine Step 5: Deploy the Application With Mono and Mono Tools for Visual Studio, .NET-skilled developers can easily migrate .NET applications to Linux. What's more, they can develop, debug, test and deploy new .NET applications for Linux as well as other platforms, all without leaving their Visual Studio comfort zone. This article presents a straightforward, five-step process for using Mono and Mono Tools for Visual Studio to move from .NET to Linux. The Mono Tools automate much of the work. http://www.novell.com/connectionmagazine/2010/02/mono_tools.html?sourceid=NCM_0110_tt12 /gustav From jwcolby at colbyconsulting.com Fri Feb 19 13:21:15 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 14:21:15 -0500 Subject: [dba-VB] C# edit and continue Message-ID: <4B7EE4AB.3030407@colbyconsulting.com> Does anyone know if the 64 bit edit and continue is fixed in Visual Studio 2010? -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Feb 19 13:28:09 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 14:28:09 -0500 Subject: [dba-VB] c# - manipulating datasets in memory Message-ID: <4B7EE649.9020106@colbyconsulting.com> I have written a C# fixed width file export for a specific purpose, exporting name / address orders for a client. The data comes from a specific view of a SQL Server order database. I need to insert a small set of additional "seed names" in the result set. For technical reasons I really want to do this as I am writing the file to disk. IOW it would be good if I could pull the order names into a data reader, union the seed names, sort on zip and write the data reader out to disk (fixed width file). The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back in the database to get the seed names in before the writer ever gets the list of names to write. So... I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. How would I go about pulling two datasets with the exact same fields (order and seed names) and then union them in memory before writing that union to file? Any ideas? -- John W. Colby www.ColbyConsulting.com From dwaters at usinternet.com Fri Feb 19 13:31:09 2010 From: dwaters at usinternet.com (Dan Waters) Date: Fri, 19 Feb 2010 13:31:09 -0600 Subject: [dba-VB] C# edit and continue In-Reply-To: <4B7EE4AB.3030407@colbyconsulting.com> References: <4B7EE4AB.3030407@colbyconsulting.com> Message-ID: I've read a headline that there is (or will soon be) at patch for VS 2010 RC. Perhaps that's included. -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, February 19, 2010 1:21 PM To: VBA Subject: [dba-VB] C# edit and continue Does anyone know if the 64 bit edit and continue is fixed in Visual Studio 2010? -- John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From davidmcafee at gmail.com Fri Feb 19 13:33:25 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 19 Feb 2010 11:33:25 -0800 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EE649.9020106@colbyconsulting.com> References: <4B7EE649.9020106@colbyconsulting.com> Message-ID: <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> Why not pass the seeds to a SPROC and call the sproc instead of the view? CREATE PROCEDURE stpMySProc (@SeedName1, @SeedName2) AS SELECT @SeedName1 AS SeedName1, @SeedName2 AS SeedName2, A.* FROM vwMyView AS A Now, instead of calling vwMyView, call stpMySproc. D On Fri, Feb 19, 2010 at 11:28 AM, jwcolby wrote: > I have written a C# fixed width file export for a specific purpose, exporting name / address orders > for a client. > > The data comes from a specific view of a SQL Server order database. ?I need to insert a small set of > additional "seed names" in the result set. ?For technical reasons I really want to do this as I am > writing the file to disk. ?IOW it would be good if I could pull the order names into a data reader, > union the seed names, sort on zip and write the data reader out to disk (fixed width file). > > The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back > in the database to get the seed names in before the writer ever gets the list of names to write. > > So... > > I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. > How would I go about pulling two datasets with the exact same fields (order and seed names) and then > union them in memory before writing that union to file? > > Any ideas? > > -- > John W. Colby > www.ColbyConsulting.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From james at fcidms.com Fri Feb 19 14:05:34 2010 From: james at fcidms.com (James Barash) Date: Fri, 19 Feb 2010 15:05:34 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EE649.9020106@colbyconsulting.com> Message-ID: <12D2F894654B53498DEF840AE12B7BB3706E586D@fciexchange.fcidms.com> John: I don't have the syntax for C# but in VB, you can use LINQ to create a union of two datatables in memory. Assuming you have the two datatables dt1 and dt2: Dim unionqry = (From p1 In dt1 Select p1).Union(From p2 In dt2 Select p2) You should be able to use unionqry in your fixed width writer, or you could convert it to a datatable using its method: CopyToDataTable. Hopefully, that should give you a good starting point. James Barash -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, February 19, 2010 2:28 PM To: VBA Subject: [dba-VB] c# - manipulating datasets in memory I have written a C# fixed width file export for a specific purpose, exporting name / address orders for a client. The data comes from a specific view of a SQL Server order database. I need to insert a small set of additional "seed names" in the result set. For technical reasons I really want to do this as I am writing the file to disk. IOW it would be good if I could pull the order names into a data reader, union the seed names, sort on zip and write the data reader out to disk (fixed width file). The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back in the database to get the seed names in before the writer ever gets the list of names to write. So... I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. How would I go about pulling two datasets with the exact same fields (order and seed names) and then union them in memory before writing that union to file? Any ideas? -- John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Feb 19 14:07:47 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 15:07:47 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> References: <4B7EE649.9020106@colbyconsulting.com> <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> Message-ID: <4B7EEF93.7090507@colbyconsulting.com> "There's more ways to kill a cat (than choking it to death on butter)" as my momma used to say. I have never used an sproc to return a dataset. That would certainly solve the problem but it may not be flexible enough. The client sometimes specifies sets of records. "Age in (2,3,4)" will be set 1, "Age in (5,6,7)" will be set 2 etc. All exported data has keycodes inserted in a specific position in the fixed width file. Sometimes the keycodes change based on the set. Sometimes the sets have to go in a single file, sometimes in separate files. You get the picture. In all cases, the seed names need to get in the file once. If the sets have different keycodes but all go in a single file, then the seeds go in the only file. If the sets have different keycodes but go in separate files then the seeds go in each file. It is a heck of a job getting it all straight and all out into the correct files. In the past I always used Access. Access has certain advantages, such as the ability to generate queries right in Access and then use those queries for the export. In the past I would copy an access template database into the target directory (where the files are going) and then open it, prepare queries, export, modify, export and so forth. I am now writing a C# program to handle all things for this client and was looking to build this export piece as one of the modules in this shiny new application. It is kinda sorta working but my "messing around" has been moved backwards into the SQL Server order database instead of in Access. That is OK, but I really want to try and get this whole thing much more point-and-click. As an example, I am told as part of the order that Group A has keycode W, Group B has keycode X etc. ATM I am having to manually write update queries back in SQL Server to update the actual order table, setting the keycode field to the right thing for the correct group. That kind of thing. I am trying to move that stuff out of the order database and into code / form in C#. In my Access database FE for doing this, I had controls where I could specify values, keycodes etc. and then I build SQL on-the-fly. VBA is much more friendly than C# for writing / troubleshooting, especially when I am running this all on a x64 server and don't have C# edit and continue. John W. Colby www.ColbyConsulting.com David McAfee wrote: > Why not pass the seeds to a SPROC and call the sproc instead of the view? > > CREATE PROCEDURE stpMySProc (@SeedName1, @SeedName2) AS > SELECT @SeedName1 AS SeedName1, @SeedName2 AS SeedName2, A.* > FROM vwMyView AS A > > Now, instead of calling vwMyView, call stpMySproc. > > D From jwcolby at colbyconsulting.com Fri Feb 19 23:21:38 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 20 Feb 2010 00:21:38 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EEF93.7090507@colbyconsulting.com> References: <4B7EE649.9020106@colbyconsulting.com> <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> <4B7EEF93.7090507@colbyconsulting.com> Message-ID: <4B7F7162.8000108@colbyconsulting.com> Woa doggie! I have just created a dataset, two data tables - dtOrder and dtSeed, merged dtSeed into dtOrder, set the dtOrder.defaultview.Filter and dtOrder.DefaultView.Sort properties, then iterated the .DefaultView to print the rows. All in all a fairly minor modification to my existing code and voila, I have my order out. I can now set a filter right in code, and sort on any column or combination of columns in the defaultview object. I am jazzed! Of course now I need to see how it works on a large table. John W. Colby www.ColbyConsulting.com From Gustav at cactus.dk Wed Feb 3 04:45:49 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 03 Feb 2010 11:45:49 +0100 Subject: [dba-VB] MonoTouch: Develop in .Net for iPad, iPhone, iPod Message-ID: Hi all Interesting: Novell to support Apple iPad application development http://www.novell.com/prblogs/?p=1827 MonoTouch is a software development kit that will enable iPad developers to utilize code and libraries written for the .NET development framework and easier-to-use programming languages such as C#. Microsoft .NET developers will be able to use MonoTouch while fully complying with Apple's license terms. MonoTouch: http://monotouch.net/ From shamil at smsconsulting.spb.ru Tue Feb 16 14:38:38 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 16 Feb 2010 23:38:38 +0300 Subject: [dba-VB] Visio Automation Message-ID: <008001caaf48$05e99260$11bcb720$@spb.ru> Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil From wdhindman at dejpolsystems.com Tue Feb 16 15:54:40 2010 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 16 Feb 2010 16:54:40 -0500 Subject: [dba-VB] Visio Automation In-Reply-To: <008001caaf48$05e99260$11bcb720$@spb.ru> References: <008001caaf48$05e99260$11bcb720$@spb.ru> Message-ID: <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> ...the problem I have with Visio is that there is no runtime available for deploying an application ...each user has to have Visio installed if they do anything other than view the results ...it's a very nice tool if your clients can afford it ...but not in my world. William -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Tuesday, February 16, 2010 3:38 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Visio Automation > Hi All - > > > > FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: > > > > http://visioautomation.codeplex.com/ > > > > and here is a sample video clip about what can be done with this tool: > > > > http://www.vimeo.com/6783783 > > > > Automation via command line custom tool's commands, imagine that! > > > > What real life business use case scenarios that tool is intended to be > used > at? > > > > Thank you. > > > > -- > > Shamil > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From davidmcafee at gmail.com Tue Feb 16 16:00:39 2010 From: davidmcafee at gmail.com (David McAfee) Date: Tue, 16 Feb 2010 14:00:39 -0800 Subject: [dba-VB] Visio Automation In-Reply-To: <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> Message-ID: <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From accessd at shaw.ca Tue Feb 16 16:02:31 2010 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 16 Feb 2010 14:02:31 -0800 Subject: [dba-VB] Visio Automation In-Reply-To: <008001caaf48$05e99260$11bcb720$@spb.ru> References: <008001caaf48$05e99260$11bcb720$@spb.ru> Message-ID: <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> Hi Shamil: Very Useful... good link. I can not imagine how long it took to write. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, February 16, 2010 12:39 PM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: [dba-VB] Visio Automation Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From shamil at smsconsulting.spb.ru Wed Feb 17 00:10:37 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 17 Feb 2010 09:10:37 +0300 Subject: [dba-VB] Visio Automation In-Reply-To: <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <94E624584BA64FB3925F078C718E12D0@creativesystemdesigns.com> Message-ID: <009a01caaf97$eedbdfb0$cc939f10$@spb.ru> Hi Jim -- In fact using System.Reflection and a COM interop classlib DLL generated by .NET, one can write some code to automate creation of many parts of the code of this Visio PowerShell - I'm guessing it was done like that, I can be wrong... -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Wednesday, February 17, 2010 1:03 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Visio Automation Hi Shamil: Very Useful... good link. I can not imagine how long it took to write. Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, February 16, 2010 12:39 PM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: [dba-VB] Visio Automation Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From Gustav at cactus.dk Wed Feb 17 02:31:09 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 17 Feb 2010 09:31:09 +0100 Subject: [dba-VB] Visio Automation Message-ID: Hi Shamil Interesting and impressive, and also an example of using PowerShell but - as you note - what to use it for? I could think of one purpose: If you have a large and changing network you could use some kind of network scanner and feed the collected info to this tool to dynamically modify drawings of the network. But if you administer such a network and have this need, I guess you would prefer an integrated tool and you would have the budget necessary. /gustav >>> shamil at smsconsulting.spb.ru 16-02-2010 21:38 >>> Hi All - FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: http://visioautomation.codeplex.com/ and here is a sample video clip about what can be done with this tool: http://www.vimeo.com/6783783 Automation via command line custom tool's commands, imagine that! What real life business use case scenarios that tool is intended to be used at? Thank you. -- Shamil From cfoust at infostatsystems.com Wed Feb 17 11:28:33 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 17 Feb 2010 11:28:33 -0600 Subject: [dba-VB] Visio Automation In-Reply-To: <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> References: <008001caaf48$05e99260$11bcb720$@spb.ru> <6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev> <8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> Message-ID: Different versions of Visio have different capabilities, but it's an awesome program overall. Flow charts are merely the tip of the iceberg. You can document and keep track of networks, equipment, systems. You can create interactive graphics that allow the user to drill down to more information. It can use Access as a datastore. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Tuesday, February 16, 2010 2:01 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From dwaters at usinternet.com Wed Feb 17 11:44:57 2010 From: dwaters at usinternet.com (Dan Waters) Date: Wed, 17 Feb 2010 11:44:57 -0600 Subject: [dba-VB] Visio Automation In-Reply-To: References: <008001caaf48$05e99260$11bcb720$@spb.ru><6B1DAF214D744534A48DE1B9B33BEE8C@jislaptopdev><8786a4c01002161400y18a5e0a0xadfb1929006e216@mail.gmail.com> Message-ID: If you have a copy, take a look at the Brainstorming template - it's a great tool to use in a problem-solving meeting to document clearly what was discussed! Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Wednesday, February 17, 2010 11:29 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation Different versions of Visio have different capabilities, but it's an awesome program overall. Flow charts are merely the tip of the iceberg. You can document and keep track of networks, equipment, systems. You can create interactive graphics that allow the user to drill down to more information. It can use Access as a datastore. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Tuesday, February 16, 2010 2:01 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Visio Automation What is Vizio used for besides making flow charts? On Tue, Feb 16, 2010 at 1:54 PM, William Hindman wrote: > ...the problem I have with Visio is that there is no runtime available for > deploying an application ...each user has to have Visio installed if they do > anything other than view the results ...it's a very nice tool if your > clients can afford it ...but not in my world. > > William > > -------------------------------------------------- > From: "Shamil Salakhetdinov" > Sent: Tuesday, February 16, 2010 3:38 PM > To: "'Discussion concerning Visual Basic and related programming issues.'" > > Subject: [dba-VB] Visio Automation > >> Hi All - >> >> >> >> FYI: Here is a good and large C# code base/tool for Visio 2007 Automation: >> >> >> >> http://visioautomation.codeplex.com/ >> >> >> >> and here is a sample video clip about what can be done with this tool: >> >> >> >> http://www.vimeo.com/6783783 >> >> >> >> Automation via command line custom tool's commands, imagine that! >> >> >> >> What real life business use case scenarios that tool is intended to be >> used >> at? >> >> >> >> Thank you. >> >> >> >> -- >> >> Shamil >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From gustav at cactus.dk Thu Feb 18 16:11:27 2010 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 18 Feb 2010 23:11:27 +0100 Subject: [dba-VB] From .NET to Linux in Five Easy Steps Message-ID: Hi all A brief and good article on starting cross-platform development with Visual Studio and .Net is out: Step 1: Prepare Your Workstation Step 2: Analyze the Application with MoMA, the Mono Migration Analyzer Step 3: Run the Application Locally Step 4: Run and Debug the Application on a Remote Linux Machine Step 5: Deploy the Application With Mono and Mono Tools for Visual Studio, .NET-skilled developers can easily migrate .NET applications to Linux. What's more, they can develop, debug, test and deploy new .NET applications for Linux as well as other platforms, all without leaving their Visual Studio comfort zone. This article presents a straightforward, five-step process for using Mono and Mono Tools for Visual Studio to move from .NET to Linux. The Mono Tools automate much of the work. http://www.novell.com/connectionmagazine/2010/02/mono_tools.html?sourceid=NCM_0110_tt12 /gustav From jwcolby at colbyconsulting.com Fri Feb 19 13:21:15 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 14:21:15 -0500 Subject: [dba-VB] C# edit and continue Message-ID: <4B7EE4AB.3030407@colbyconsulting.com> Does anyone know if the 64 bit edit and continue is fixed in Visual Studio 2010? -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Feb 19 13:28:09 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 14:28:09 -0500 Subject: [dba-VB] c# - manipulating datasets in memory Message-ID: <4B7EE649.9020106@colbyconsulting.com> I have written a C# fixed width file export for a specific purpose, exporting name / address orders for a client. The data comes from a specific view of a SQL Server order database. I need to insert a small set of additional "seed names" in the result set. For technical reasons I really want to do this as I am writing the file to disk. IOW it would be good if I could pull the order names into a data reader, union the seed names, sort on zip and write the data reader out to disk (fixed width file). The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back in the database to get the seed names in before the writer ever gets the list of names to write. So... I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. How would I go about pulling two datasets with the exact same fields (order and seed names) and then union them in memory before writing that union to file? Any ideas? -- John W. Colby www.ColbyConsulting.com From dwaters at usinternet.com Fri Feb 19 13:31:09 2010 From: dwaters at usinternet.com (Dan Waters) Date: Fri, 19 Feb 2010 13:31:09 -0600 Subject: [dba-VB] C# edit and continue In-Reply-To: <4B7EE4AB.3030407@colbyconsulting.com> References: <4B7EE4AB.3030407@colbyconsulting.com> Message-ID: I've read a headline that there is (or will soon be) at patch for VS 2010 RC. Perhaps that's included. -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, February 19, 2010 1:21 PM To: VBA Subject: [dba-VB] C# edit and continue Does anyone know if the 64 bit edit and continue is fixed in Visual Studio 2010? -- John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From davidmcafee at gmail.com Fri Feb 19 13:33:25 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 19 Feb 2010 11:33:25 -0800 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EE649.9020106@colbyconsulting.com> References: <4B7EE649.9020106@colbyconsulting.com> Message-ID: <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> Why not pass the seeds to a SPROC and call the sproc instead of the view? CREATE PROCEDURE stpMySProc (@SeedName1, @SeedName2) AS SELECT @SeedName1 AS SeedName1, @SeedName2 AS SeedName2, A.* FROM vwMyView AS A Now, instead of calling vwMyView, call stpMySproc. D On Fri, Feb 19, 2010 at 11:28 AM, jwcolby wrote: > I have written a C# fixed width file export for a specific purpose, exporting name / address orders > for a client. > > The data comes from a specific view of a SQL Server order database. ?I need to insert a small set of > additional "seed names" in the result set. ?For technical reasons I really want to do this as I am > writing the file to disk. ?IOW it would be good if I could pull the order names into a data reader, > union the seed names, sort on zip and write the data reader out to disk (fixed width file). > > The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back > in the database to get the seed names in before the writer ever gets the list of names to write. > > So... > > I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. > How would I go about pulling two datasets with the exact same fields (order and seed names) and then > union them in memory before writing that union to file? > > Any ideas? > > -- > John W. Colby > www.ColbyConsulting.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From james at fcidms.com Fri Feb 19 14:05:34 2010 From: james at fcidms.com (James Barash) Date: Fri, 19 Feb 2010 15:05:34 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EE649.9020106@colbyconsulting.com> Message-ID: <12D2F894654B53498DEF840AE12B7BB3706E586D@fciexchange.fcidms.com> John: I don't have the syntax for C# but in VB, you can use LINQ to create a union of two datatables in memory. Assuming you have the two datatables dt1 and dt2: Dim unionqry = (From p1 In dt1 Select p1).Union(From p2 In dt2 Select p2) You should be able to use unionqry in your fixed width writer, or you could convert it to a datatable using its method: CopyToDataTable. Hopefully, that should give you a good starting point. James Barash -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, February 19, 2010 2:28 PM To: VBA Subject: [dba-VB] c# - manipulating datasets in memory I have written a C# fixed width file export for a specific purpose, exporting name / address orders for a client. The data comes from a specific view of a SQL Server order database. I need to insert a small set of additional "seed names" in the result set. For technical reasons I really want to do this as I am writing the file to disk. IOW it would be good if I could pull the order names into a data reader, union the seed names, sort on zip and write the data reader out to disk (fixed width file). The fixed width writer code is written and functions just fine but ATM I am doing a klugy merge back in the database to get the seed names in before the writer ever gets the list of names to write. So... I know that supposedly .Net and SQL Server is all about disconnected recordsets and all of that. How would I go about pulling two datasets with the exact same fields (order and seed names) and then union them in memory before writing that union to file? Any ideas? -- John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Feb 19 14:07:47 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 19 Feb 2010 15:07:47 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> References: <4B7EE649.9020106@colbyconsulting.com> <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> Message-ID: <4B7EEF93.7090507@colbyconsulting.com> "There's more ways to kill a cat (than choking it to death on butter)" as my momma used to say. I have never used an sproc to return a dataset. That would certainly solve the problem but it may not be flexible enough. The client sometimes specifies sets of records. "Age in (2,3,4)" will be set 1, "Age in (5,6,7)" will be set 2 etc. All exported data has keycodes inserted in a specific position in the fixed width file. Sometimes the keycodes change based on the set. Sometimes the sets have to go in a single file, sometimes in separate files. You get the picture. In all cases, the seed names need to get in the file once. If the sets have different keycodes but all go in a single file, then the seeds go in the only file. If the sets have different keycodes but go in separate files then the seeds go in each file. It is a heck of a job getting it all straight and all out into the correct files. In the past I always used Access. Access has certain advantages, such as the ability to generate queries right in Access and then use those queries for the export. In the past I would copy an access template database into the target directory (where the files are going) and then open it, prepare queries, export, modify, export and so forth. I am now writing a C# program to handle all things for this client and was looking to build this export piece as one of the modules in this shiny new application. It is kinda sorta working but my "messing around" has been moved backwards into the SQL Server order database instead of in Access. That is OK, but I really want to try and get this whole thing much more point-and-click. As an example, I am told as part of the order that Group A has keycode W, Group B has keycode X etc. ATM I am having to manually write update queries back in SQL Server to update the actual order table, setting the keycode field to the right thing for the correct group. That kind of thing. I am trying to move that stuff out of the order database and into code / form in C#. In my Access database FE for doing this, I had controls where I could specify values, keycodes etc. and then I build SQL on-the-fly. VBA is much more friendly than C# for writing / troubleshooting, especially when I am running this all on a x64 server and don't have C# edit and continue. John W. Colby www.ColbyConsulting.com David McAfee wrote: > Why not pass the seeds to a SPROC and call the sproc instead of the view? > > CREATE PROCEDURE stpMySProc (@SeedName1, @SeedName2) AS > SELECT @SeedName1 AS SeedName1, @SeedName2 AS SeedName2, A.* > FROM vwMyView AS A > > Now, instead of calling vwMyView, call stpMySproc. > > D From jwcolby at colbyconsulting.com Fri Feb 19 23:21:38 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 20 Feb 2010 00:21:38 -0500 Subject: [dba-VB] c# - manipulating datasets in memory In-Reply-To: <4B7EEF93.7090507@colbyconsulting.com> References: <4B7EE649.9020106@colbyconsulting.com> <8786a4c01002191133gb56b850v5216b5c001625c53@mail.gmail.com> <4B7EEF93.7090507@colbyconsulting.com> Message-ID: <4B7F7162.8000108@colbyconsulting.com> Woa doggie! I have just created a dataset, two data tables - dtOrder and dtSeed, merged dtSeed into dtOrder, set the dtOrder.defaultview.Filter and dtOrder.DefaultView.Sort properties, then iterated the .DefaultView to print the rows. All in all a fairly minor modification to my existing code and voila, I have my order out. I can now set a filter right in code, and sort on any column or combination of columns in the defaultview object. I am jazzed! Of course now I need to see how it works on a large table. John W. Colby www.ColbyConsulting.com