From jwcolby at colbyconsulting.com Mon Jan 4 11:05:56 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 04 Jan 2010 12:05:56 -0500 Subject: [dba-VB] Version control Message-ID: <4B421FF4.2040003@colbyconsulting.com> What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- John W. Colby www.ColbyConsulting.com From Gustav at cactus.dk Mon Jan 4 11:53:41 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jan 2010 18:53:41 +0100 Subject: [dba-VB] Version control Message-ID: Hi John Those of us, including you, who attend the Northwind.NET project (Shamil's SCRUM project) obtained a developer license for VisualSVN: Hi Gustav, Here is the VisualSVN license for Northwind.NET project. You can forward this license key to all members of your project but please don't distribute it outside of the project team. -------------------------------------------------- -------------------------------------------------- If you like to provide a reference to VisualSVN on your web site please get the logo at http://www.visualsvn.com/company/logos. Good luck with your project :) -- Regards, Olga Dolidze VisualSVN Support I have planed to set up the server for this (free) server for VisualSVN but I haven't had the server capacity until recently: http://www.visualsvn.com/server/ Should be piece of cake ... /gustav >>> jwcolby at colbyconsulting.com 04-01-2010 18:05 >>> What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Jan 4 12:45:40 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 4 Jan 2010 12:45:40 -0600 Subject: [dba-VB] Version control In-Reply-To: <4B421FF4.2040003@colbyconsulting.com> References: <4B421FF4.2040003@colbyconsulting.com> Message-ID: We just switched to SourceGear's Vault. It is an easy transition from SourceSafe and has some very nice features. The only thing I've found it lacking is the sourcesafe properties from the VS Files submenu. Have to go to VaultClient to see the links. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 04, 2010 9:06 AM To: VBA Subject: [dba-VB] Version control What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- 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 Tue Jan 5 09:57:35 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jan 2010 10:57:35 -0500 Subject: [dba-VB] Microsoft partner Message-ID: <4B43616F.5050509@colbyconsulting.com> I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- John W. Colby www.ColbyConsulting.com From garykjos at gmail.com Tue Jan 5 10:26:52 2010 From: garykjos at gmail.com (Gary Kjos) Date: Tue, 5 Jan 2010 10:26:52 -0600 Subject: [dba-VB] [dba-SQLServer] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> References: <4B43616F.5050509@colbyconsulting.com> Message-ID: I'm a Microsoft partner on my own too. Had to come up with a company name the last time. Gary Kjos Consulting Services. I guess I would be interested in at least looking at the idea of combining with some DBA people. GK On Tue, Jan 5, 2010 at 9:57 AM, jwcolby wrote: > I am getting calls from Microsoft re my partnership. ?The caller today gave me a free certificate > for a training course on server virtualization. ?It is for the Server 2008 Hyper V virtualization > stuff. ?I just clicked through to see what it is and it looks interesting. ?This is the only > certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to > convince me how valuable my membership is. ?My membership is expiring this month. > > If you have a membership and are interested in such stuff, you might want to call and ask if you are > eligible for this. > > BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of > obtaining the credentials for partner companies, please speak up. ?As a "sole proprietor" it is > difficult for me to get enough of these credentials to qualify. ?However I am told that we as a > group could form a virtual organization and do this. ?Each member would need to get one (or more) > credentials, then we would need to band together and present as an organization. > > It might be worth doing. > > -- > John W. Colby > www.ColbyConsulting.com > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- Gary Kjos garykjos at gmail.com From mmattys at rochester.rr.com Tue Jan 5 10:39:49 2010 From: mmattys at rochester.rr.com (Michael R Mattys) Date: Tue, 5 Jan 2010 11:39:49 -0500 Subject: [dba-VB] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> Message-ID: Hi John, My brother and I are looking for such opportunities also. So ... count us in. Let us know what information will be required. Michael R Mattys Business Process Developers www.mattysconsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of jwcolby Sent: Tuesday, January 05, 2010 10:58 AM To: Access Developers discussion and problem solving; VBA; Dba-Sqlserver Subject: [dba-VB] Microsoft partner I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- 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 shamil at smsconsulting.spb.ru Tue Jan 5 11:01:49 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 5 Jan 2010 20:01:49 +0300 Subject: [dba-VB] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> References: <4B43616F.5050509@colbyconsulting.com> Message-ID: <000901ca8e28$c742cbc0$55c86340$@spb.ru> Hi John -- I would be interested to join such a virtual organization (if it could be international) to get MS Partner Status: I'm MCP, MCAD.NET and MCSD.NET. As far as I know MS Partner Status lets to purchase MSDN Prof. subscription (5 licenses?) for about USD400-500? - I'd be interested to participate in sharing of the costs of such MSDN subscription... Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, January 05, 2010 6:58 PM To: Access Developers discussion and problem solving; VBA; Dba-Sqlserver Subject: [dba-VB] Microsoft partner I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- 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 __________ Information from ESET NOD32 Antivirus, version of virus signature database 4745 (20100105) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4745 (20100105) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 5 17:15:22 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 6 Jan 2010 02:15:22 +0300 Subject: [dba-VB] SCRUM/Agile Teamwork: The Leadership - Self-management Dilemma Message-ID: <000901ca8e5c$f62b2ac0$e2818040$@spb.ru> Hi All - I suppose the subject article is one of the best on Agile Teamwork I've ever read - the best in fact IMO: http://www.infoq.com/articles/agile-teamwork;jsessionid=F3CDBBECDB2B79035FC5 F417CE5757B8 I went through a free quiz/questionnaire they handle to evaluate Agile Teams: http://quiz.brightgreenprojects.com/agile_team_report And I have got the following results as I perceived them for our Northwind.NET agile teamwork project: ==== 75% - Advising team performance factor. 91% - Innovating team performance factor. 83% - Promoting team performance factor. 91% - Developing team performance factor. 58% - Organizing team performance factor. 83% - Producing team performance factor. 75% - Inspecting team performance factor. 85% - Maintaining team performance factor. You scored over 80% for the Linking team performance factor. ==== If your score on all sectors is over 80% then you consider your agile team to be well on the way to high performance. If your score is in the range 60-80% for all sectors then your team is probably doing some things well but there is definite scope for improvement. If your score on any sector is below 50% then this is an area where your team can make substantial improvements to the way it is working. These sectors should be an immediate development priority for your team. === It would be interesting to get results of your passing through this quiz to find out how well our results will correlate. Not urgent. Thank you. -- Shamil From Gustav at cactus.dk Wed Jan 6 02:33:20 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jan 2010 09:33:20 +0100 Subject: [dba-VB] Microsoft partner Message-ID: Hi John and the Board of Directors Could such an organisation be Database Advisors Inc? /gustav >>> jwcolby at colbyconsulting.com 05-01-2010 16:57 >>> BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Wed Jan 6 06:54:32 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 07:54:32 -0500 Subject: [dba-VB] Microsoft partner In-Reply-To: References: Message-ID: <4B448808.8050401@colbyconsulting.com> It could be. There are pros and cons from Database Advisor's perspective. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi John and the Board of Directors > > Could such an organisation be Database Advisors Inc? > > /gustav > > >>>> jwcolby at colbyconsulting.com 05-01-2010 16:57 >>> > > BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of > obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is > difficult for me to get enough of these credentials to qualify. However I am told that we as a > group could form a virtual organization and do this. Each member would need to get one (or more) > credentials, then we would need to band together and present as an organization. > > It might be worth doing. > From jwcolby at colbyconsulting.com Wed Jan 6 07:28:11 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 08:28:11 -0500 Subject: [dba-VB] [AccessD] Microsoft partner In-Reply-To: <034a01ca8e5a$131eb1e0$0701a8c0@MSIMMSWS> References: <4B43616F.5050509@colbyconsulting.com> <034a01ca8e5a$131eb1e0$0701a8c0@MSIMMSWS> Message-ID: <4B448FEB.70602@colbyconsulting.com> Mark, Understand that I am NOT a very active "partner", in fact as far as I can tell I am more an "associate". I have never made any effort to do the qualifications etc. From what I can tell, for various reasons it is not a good idea to approach the "partnership" from a "how many referrals" angle. While MS does have a "referral" process, if you are going to pursue the partnership it would probably work best to approach it from a "what can I learn" and "what software can I get" all for a reduced price. If you ever get any referrals that is a bonus. All of that said with the understanding that I am not really active in their program. I would like to be, but more in order to get trained up a little. There are areas that I would like to know more about. Personally, I have never had much use for Microsoft's "credentials", but many people do get them. I have always been about "what do I know" more than "what strings of characters can I put after my name". OTOH if I had spent 10 years getting a "doctor" title that would probably be important to me. In terms of my proposal however I think forming a "virtual consulting company" would be about referrals, however the referrals would likely come from other members of the company. If there are 10 guys from this list, we would undoubtedly have a wide range of backgrounds and expertise. If someone asks if I can do virtualization, I would be able to say "I'll get back to you" and go see if any of you are strong in that area. Or maybe even have a spreadsheet or word document that would tell me "Member XYZ claims to be an 'expert' in these areas". That kind of thing. AND... those "strings of characters" are important to some clients. Thus being able to put a whole string of Microsoft credentials on my web site might attract business. I would not necessarily perform the work, it might go to another partner in the company. More and more, where you live affects your ability to perform your work very little. We can remote in to do programming, database design or maintenance and so forth. If you don't have to physically touch something then it can often be done remotely. A "virtual" company consisting of highly skilled people scattered around the world could work well. John W. Colby www.ColbyConsulting.com Mark Simms wrote: > John - I'm just kind of curious about the MSFT Partnership program.... > Do you get any decent leads or referals from them ? > > > From jwcolby at colbyconsulting.com Wed Jan 6 07:31:38 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 08:31:38 -0500 Subject: [dba-VB] Transfer database schema objects and data to another server/database with SMO Message-ID: <4B4490BA.6050006@colbyconsulting.com> http://www.mssqltips.com/tip.asp?tip=1910&home -- John W. Colby www.ColbyConsulting.com From marklbreen at gmail.com Fri Jan 15 03:16:44 2010 From: marklbreen at gmail.com (Mark Breen) Date: Fri, 15 Jan 2010 09:16:44 +0000 Subject: [dba-VB] Django Anyone? Message-ID: Hello All, I recently heard about a framework named Django. As some that is only really a MS person, and little exposure to outside that world, has anyone any experience of this project? Any feedback or reviews? Does anyone have a perspective on how, or on which levels it compares to DotNetNuke (VB.Net)? http://www.djangoproject.com/ http://docs.djangoproject.com/en/dev/intro/overview/ I took the opinion that the vb list is for programmers and that this is programming related, hope that is OK? thanks Mark From DWUTKA at Marlow.com Fri Jan 15 12:40:25 2010 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 15 Jan 2010 12:40:25 -0600 Subject: [dba-VB] VB 6 quirk In-Reply-To: References: Message-ID: Ok, I'm sure not many of you are using VB 6 anymore. I really don't develop much anymore myself. However, I have a user that is running into a quirk with Adobe. It's a form pdf, that creates an XFDF extension. Inside this 'data file' (that she receives in email), it's got a tag that shows a full URL of what the user used to view the pdf form. This is an http://.... URL. On her full version of Acrobat, it has a problem dealing with the URLs, it just keeps prompting if you want to allow access to http://... Now, if you go into that .xfdf data file, and just change that href property to the actual network path (\\server\share\...), then it opens just fine. It seems that Acrobat Reader is adding the URL on the end users end, so it's not something we can fix in the pdf form. (At least we can't find a property to do so). Since it's a pretty simple fix to change the URL to the UNC path, I figured I'd whip up a little VB program to do that. Did that, piece of cake. Wanted to make it an 'invisible process', by having the program just monitor a folder where she could save these emailed .xfdf data files too. When a new file is added to the monitored folder, it does it's job, and saves the new file as 'converted_.....xfdf'. Program works like a charm..IN DEBUG mode. Compile it, and run it, and the CreateFile API which gets the handle to start the monitoring process kicks back a DLLError 998. Now, why would code work perfectly in debug mode, but not work in a compiled state. Here is my file monitoring class: The line 'If hDir=-1' is getting skipped in debug mode (because it's getting a valid handle), and in a compiled state, it dumps out the LastDllError as 998 (actually, it was doing 998, until I added the strPathToMonitor variable,a nd now it's doing 1305. I'm stumped. Anyone have any ideas? Option Explicit Event FileActivity(strFileName As String, Action As FS_File_Actions) Public PathToMonitor As String Dim blKeepMonitoring As Boolean Private Declare Function FS_CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long Private Declare Function FS_ReadDirChanges Lib "kernel32" Alias "ReadDirectoryChangesW" (ByVal hDir As Long, ByVal lpBuffer As Long, ByVal lenBuffer As Long, ByVal bWatchSubtree As Boolean, ByVal dwNotifyFilter As Long, ByRef dwBytesReturned As Long, ByVal lpOverLapped As Long, ByVal dwCallBack As Long) As Long Private Declare Function FS_CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Long) As Long Private Declare Function FS_CreateEvent Lib "kernel32" Alias "CreateEventA" (lpEventAttributes As Any, ByVal bManualReset As Long, ByVal bInitialState As Long, ByVal lpName As String) As Long Private Declare Function FS_ResetEvent Lib "kernel32" Alias "ResetEvent" (ByVal hEvent As Long) As Long Private Declare Sub FS_CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Long, ByVal Source As Long, ByVal Length As Long) Private Declare Function FS_WaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Private Const FILE_LIST_DIRECTORY = (&H1) Private Const FILE_SHARE_DELETE = &H4 Private Const FILE_SHARE_READ = &H1 Private Const FILE_SHARE_WRITE = &H2 Private Const OPEN_EXISTING = 3 Private Const FILE_FLAG_BACKUP_SEMANTICS = &H2000000 Private Const FILE_FLAG_OVERLAPPED = &H40000000 Private Const FILE_NOTIFY_CHANGE_ATTRIBUTES = &H4 Private Const FILE_NOTIFY_CHANGE_CREATION = &H40 Private Const FILE_NOTIFY_CHANGE_DIR_NAME = &H2 Private Const FILE_NOTIFY_CHANGE_FILE_NAME = &H1 Private Const FILE_NOTIFY_CHANGE_LAST_ACCESS = &H20 Private Const FILE_NOTIFY_CHANGE_LAST_WRITE = &H10 Private Const FILE_NOTIFY_CHANGE_SECURITY = &H100 Private Const FILE_NOTIFY_CHANGE_SIZE = &H8 Private Const WAIT_TIMEOUT = 258& Public Enum FS_File_Actions FILE_ACTION_ADDED = &H1 FILE_ACTION_MODIFIED = &H3 FILE_ACTION_REMOVED = &H2 FILE_ACTION_RENAMED_NEW_NAME = &H5 FILE_ACTION_RENAMED_OLD_NAME = &H4 End Enum Private Type FS_FILE_NOTIFY_INFORMATION NextEntryOffset As Long Action As FS_File_Actions FileNameLength As Long FileName(1024 - 1) As Byte End Type Private Type FS_OVERLAPPED Internal As Long InternalHigh As Long Offset As Long OffsetHigh As Long hEvent As Long End Type Public Function StartMonitoring() 'On Error GoTo ErrorHandler Dim hDir As Long Dim dwReturn As Long Dim intReturnSize As Long Dim ovr As FS_OVERLAPPED Dim hEvent As Long Dim intWatchFilter As Long Dim fni As FS_FILE_NOTIFY_INFORMATION Dim fniBuf(0 To 1024 * 5 - 1) As Byte Dim BufferPos As Long Dim strFileName As String Dim strPathToMonitor As String strPathToMonitor = PathToMonitor blKeepMonitoring = True intWatchFilter = FILE_NOTIFY_CHANGE_ATTRIBUTES + FILE_NOTIFY_CHANGE_CREATION + FILE_NOTIFY_CHANGE_DIR_NAME + FILE_NOTIFY_CHANGE_FILE_NAME + FILE_NOTIFY_CHANGE_LAST_ACCESS + FILE_NOTIFY_CHANGE_LAST_WRITE + FILE_NOTIFY_CHANGE_SECURITY + FILE_NOTIFY_CHANGE_SIZE hDir = FS_CreateFile(strPathToMonitor, FILE_LIST_DIRECTORY, FILE_SHARE_READ Or FILE_SHARE_DELETE Or FILE_SHARE_WRITE, Null, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS Or FILE_FLAG_OVERLAPPED, 0) If hDir = -1 Then MsgBox "Invalid Handle Value...Error: " & Err.LastDllError End If hEvent = FS_CreateEvent(0&, True, True, "FS_IOEvent") ovr.hEvent = hEvent dwReturn = FS_ReadDirChanges(hDir, VarPtr(fniBuf(0)), UBound(fniBuf) + 1, True, intWatchFilter, intReturnSize, VarPtr(ovr), 0&) If dwReturn = 0 Then MsgBox "Error Calling ReadDirChanges" MsgBox Err.LastDllError MsgBox ovr.hEvent MsgBox hDir End If Do Until blKeepMonitoring = False BufferPos = 0 dwReturn = FS_WaitForSingleObject(hEvent, 100) If dwReturn <> WAIT_TIMEOUT Then 'MsgBox fniBuf(0) FS_CopyMemory VarPtr(fni), VarPtr(fniBuf(BufferPos)), Len(fni) strFileName = fni.FileName strFileName = Left(strFileName, fni.FileNameLength / 2) RaiseEvent FileActivity(strFileName, fni.Action) While fni.NextEntryOffset <> 0 BufferPos = BufferPos + fni.NextEntryOffset FS_CopyMemory VarPtr(fni), VarPtr(fniBuf(BufferPos)), Len(fni) strFileName = fni.FileName strFileName = Left(strFileName, fni.FileNameLength / 2) RaiseEvent FileActivity(strFileName, fni.Action) Wend FS_ResetEvent hEvent dwReturn = FS_ReadDirChanges(hDir, VarPtr(fniBuf(0)), UBound(fniBuf) + 1, True, intWatchFilter, intReturnSize, VarPtr(ovr), 0&) End If DoEvents Loop ErrorHandler: FS_CloseHandle hEvent FS_CloseHandle hDir End Function Public Function StopMonitoring() blKeepMonitoring = False End Function Private Sub Class_Initialize() blKeepMonitoring = False End Sub The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From jwcolby at colbyconsulting.com Mon Jan 18 14:40:19 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jan 2010 15:40:19 -0500 Subject: [dba-VB] 2008 backup / restore scripts Message-ID: <4B54C733.5060006@colbyconsulting.com> I obtained a developer copy of SQL Server 2008, which has full backup / restore with compression if I understand correctly. I had been using Idera's SQL Safe free version but that is no longer free. Of course now all of my backups are locked away in a version of a program that I can no longer use. Free is only free until it's not, whereupon it is a liability. Sigh. Anyway... I am wondering if anyone has a stored procedure that will use the 2008 built-in backup to do a full backup with compression. I built a C# program to use the Idera scripts to do my backups and restores. I am hoping that I can get a similar native 2008 stored procedure that I can call to do the same thing. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Tue Jan 19 08:05:51 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 19 Jan 2010 09:05:51 -0500 Subject: [dba-VB] SQL Server: An interesting data load article Message-ID: <4B55BC3F.20304@colbyconsulting.com> http://msdn.microsoft.com/en-us/library/dd537533.aspx -- John W. Colby www.ColbyConsulting.com From davidmcafee at gmail.com Wed Jan 20 16:28:20 2010 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 20 Jan 2010 14:28:20 -0800 Subject: [dba-VB] VB.Net Wait for file to Download before launching Message-ID: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> Does anyone know how to do this? I have this program that checks for updates : If IsUpdateAvailable() Then DownloadUpdate() LaunchUpdateInstaller() LaunchApp() Else LaunchApp() End If The Update detection and Download work great: Private Sub DownloadUpdate() If Directory.Exists(InstallFilesPath) Then 'if the local path exists then check for the actual file If File.Exists(InstallFilesPath + InstallFile) Then 'Check to see if the new file is already installed 'Delete file File.Delete(InstallFilesPath + InstallFile) 'Then download it DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) Else ' If the source file can't be found, Download new copy DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If Else 'Directory did not exist, so create it and copy new file over Directory.CreateDirectory(InstallFilesPath) DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If End Sub Private Sub LaunchApp() 'This sub launches the actual Program System.Diagnostics.Process.Start(AppPath + AppName) End Sub The trouble is that it wants to run the LaunchApp() sub immediatley after calling the LaunchUpdateInstaller() sub. I was thinking of putting in a timer of some sort, but I was wondering if there is some quicker/better way of doing this. MTIA, David McAfee From cfoust at infostatsystems.com Wed Jan 20 17:26:52 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 20 Jan 2010 17:26:52 -0600 Subject: [dba-VB] VB.Net Wait for file to Download before launching In-Reply-To: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> References: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> Message-ID: You can use a small text file on the drive as a flag. Start it when you call the installer and then keep checking for it at intervals. When it's no longer there (the installer removes it), launch the application. Or you could do it the other way around and have the installer remove a file you create just before you call it. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Wednesday, January 20, 2010 2:28 PM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] VB.Net Wait for file to Download before launching Does anyone know how to do this? I have this program that checks for updates : If IsUpdateAvailable() Then DownloadUpdate() LaunchUpdateInstaller() LaunchApp() Else LaunchApp() End If The Update detection and Download work great: Private Sub DownloadUpdate() If Directory.Exists(InstallFilesPath) Then 'if the local path exists then check for the actual file If File.Exists(InstallFilesPath + InstallFile) Then 'Check to see if the new file is already installed 'Delete file File.Delete(InstallFilesPath + InstallFile) 'Then download it DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) Else ' If the source file can't be found, Download new copy DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If Else 'Directory did not exist, so create it and copy new file over Directory.CreateDirectory(InstallFilesPath) DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If End Sub Private Sub LaunchApp() 'This sub launches the actual Program System.Diagnostics.Process.Start(AppPath + AppName) End Sub The trouble is that it wants to run the LaunchApp() sub immediatley after calling the LaunchUpdateInstaller() sub. I was thinking of putting in a timer of some sort, but I was wondering if there is some quicker/better way of doing this. MTIA, David McAfee _______________________________________________ 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 Jan 21 06:52:16 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 21 Jan 2010 13:52:16 +0100 Subject: [dba-VB] Webcast: ADO.NET Entity Framework 4 Message-ID: Hi all Tour the Top 10 Treats in Entity Framework 4: http://www.oreillynet.com/pub/e/1517 by EF guru, Julie Lerman. /gustav From jwcolby at colbyconsulting.com Thu Jan 21 07:58:41 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 21 Jan 2010 08:58:41 -0500 Subject: [dba-VB] How unique are SQL Server error numbers? Message-ID: <4B585D91.4010604@colbyconsulting.com> I am calling stored procedures and passing back the error number and error string to my C# program. I am doing things like "create field, create index" etc. If I am trying to create a field and it already exists I get an error: pErrorDesc "Column names in each table must be unique. Column name 'AddrValid' in table '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." And pErrorNo "2705" So my question is, can I count on a 2705 being this "column name must be unique"? If so, in my C# program, I can count that as a successful field creation rather than a failure of the stored procedure. ATM I am saying that a failure occurred and not performing the next step, whereas I really can do the next step (update that field). TIA for your assistance. -- John W. Colby www.ColbyConsulting.com From davidmcafee at gmail.com Thu Jan 21 08:41:37 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 06:41:37 -0800 Subject: [dba-VB] How unique are SQL Server error numbers? In-Reply-To: <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> References: <4B585D91.4010604@colbyconsulting.com> <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> Message-ID: <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> John, you can trap for built in errors (such as 2705) in TSQL, or you can raise your own if/when certain conditions are met. Sent from my Droid phone. On Jan 21, 2010 6:00 AM, "jwcolby" wrote: I am calling stored procedures and passing back the error number and error string to my C# program. I am doing things like "create field, create index" etc. If I am trying to create a field and it already exists I get an error: pErrorDesc "Column names in each table must be unique. Column name 'AddrValid' in table '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." And pErrorNo "2705" So my question is, can I count on a 2705 being this "column name must be unique"? If so, in my C# program, I can count that as a successful field creation rather than a failure of the stored procedure. ATM I am saying that a failure occurred and not performing the next step, whereas I really can do the next step (update that field). TIA for your assistance. -- 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 Thu Jan 21 10:49:59 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 21 Jan 2010 11:49:59 -0500 Subject: [dba-VB] How unique are SQL Server error numbers? In-Reply-To: <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> References: <4B585D91.4010604@colbyconsulting.com> <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> Message-ID: <4B5885B7.5030606@colbyconsulting.com> David, I have built up a library of stored procedures that I have, up to this point, executed manually or in another stored procedure. Being a programmer at heart, then next logical step is to execute these SPs from a C# program at the click of a button. That is what I am up to now. I am breaking the stored procedures down now that I can control them from C#. Where before I might Make a table Create a cover query in a source table. Append data from the source into the new table Create a couple of indexes in the new table I would do all of the above in a single stored procedure. I now want to be able to do each of these steps individually and know back in C# what happened. Perhaps the make table failed for some reason. Creating the cover index on the source failed, but it failed because the index already exists. Appending data from source to destination worked, but how many records went? Etc. Having a real programming environment from which to cause these to happen and log the results is a HUGE step up from what I was capable of directly in TSQL. I view it as the best of both worlds. John W. Colby www.ColbyConsulting.com David McAfee wrote: > John, you can trap for built in errors (such as 2705) in TSQL, or you can > raise your own if/when certain conditions are met. > > Sent from my Droid phone. > > On Jan 21, 2010 6:00 AM, "jwcolby" wrote: > > I am calling stored procedures and passing back the error number and error > string to my C# program. > I am doing things like "create field, create index" etc. If I am trying to > create a field and it > already exists I get an error: > > pErrorDesc "Column names in each table must be unique. Column name > 'AddrValid' in table > '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." > > And > > pErrorNo "2705" > > So my question is, can I count on a 2705 being this "column name must be > unique"? If so, in my C# > program, I can count that as a successful field creation rather than a > failure of the stored procedure. > > ATM I am saying that a failure occurred and not performing the next step, > whereas I really can do > the next step (update that field). > > TIA for your assistance. > > -- > 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 > _______________________________________________ > 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 Thu Jan 21 16:58:41 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 14:58:41 -0800 Subject: [dba-VB] .Net Setup, launch application after installation Message-ID: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> OK, am I the only one having a hard time with this? Visual Studio 2008 doesn't offer a simple method of launching the application after installation (via Setup/MSI), or at least provide an easy way to prompt the user if they want to launch the app on the finished screen. I used to be able to so this from Install Shield, Wise and hell, even via WinZip Self Extractor. I've been following tips from here: http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage But I still don't have the ability to launch the app that is being installed. Do any of you .Net gurus know of an easy way to do so? Thanks, David From cfoust at infostatsystems.com Thu Jan 21 17:22:24 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 21 Jan 2010 17:22:24 -0600 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> Message-ID: We use an installShield installer and it has provision for a file to execute when the installation ends. Is that what you mean? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, January 21, 2010 2:59 PM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] .Net Setup, launch application after installation OK, am I the only one having a hard time with this? Visual Studio 2008 doesn't offer a simple method of launching the application after installation (via Setup/MSI), or at least provide an easy way to prompt the user if they want to launch the app on the finished screen. I used to be able to so this from Install Shield, Wise and hell, even via WinZip Self Extractor. I've been following tips from here: http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage But I still don't have the ability to launch the app that is being installed. Do any of you .Net gurus know of an easy way to do so? Thanks, David _______________________________________________ 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 Thu Jan 21 17:39:30 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 15:39:30 -0800 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> Message-ID: <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Yes. I've used it before as well (also Wise and even WinZipSE). I'm trying to do this natively out of the VS2008 setup & deployment project. I can't believe there isn't anything natively built in to do so. On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust wrote: > We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee > Sent: Thursday, January 21, 2010 2:59 PM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] .Net Setup, launch application after installation > > OK, am I the only one having a hard time with this? > > Visual Studio 2008 doesn't offer a simple method of launching the > application after installation (via Setup/MSI), or at least provide an > easy way to prompt the user if they want to launch the app on the > finished screen. > > I used to be able to so this from Install Shield, Wise and hell, even > via WinZip Self Extractor. > > I've been following tips from here: > http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx > and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage > > But I still don't have the ability to launch the app that is being installed. > > Do any of you .Net gurus know of an easy way to do so? > > Thanks, > David > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Fri Jan 22 07:56:31 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 08:56:31 -0500 Subject: [dba-VB] Free SQL Server tools Message-ID: <4B59AE8F.2030206@colbyconsulting.com> For all the small shops out there, this just in: http://www.sqlservercentral.com/articles/Tools/64908/ -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Jan 22 08:03:33 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 09:03:33 -0500 Subject: [dba-VB] C# hot keys Message-ID: <4B59B035.5050806@colbyconsulting.com> In Visual Studio F6 and F5 were build and run. Suddenly F6 no longer does the build. Where do I go to troubleshoot this? -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Jan 22 10:33:53 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 22 Jan 2010 10:33:53 -0600 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Message-ID: Maybe you're looking at it from the wrong end. The .Net purpose is to give you control, but that doesn't mean you don't have to build your own tools. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, January 21, 2010 3:40 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] .Net Setup, launch application after installation Yes. I've used it before as well (also Wise and even WinZipSE). I'm trying to do this natively out of the VS2008 setup & deployment project. I can't believe there isn't anything natively built in to do so. On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust wrote: > We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? > > Charlotte Foust > From davidmcafee at gmail.com Fri Jan 22 11:52:54 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 09:52:54 -0800 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Message-ID: <8786a4c01001220952j668dae93rfd18d8a4a6f1456e@mail.gmail.com> I know, I just can't believe they didn't give that option in the MSI builder. I've followed this guys blog: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage It launches after install (if the checkbox remains checked) in all (XP32, Vista 64, Win 7 32/64) my supported OS's except Vista 32 bit. I think this guy had a similar proglem: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.platformsdk.msi&tid=1dbfd840-d667-47bc-bcd7-7fa4c615afb6&cat=&lang=&cr=&sloc=&p=1 My issue is that I don't know enough about Custom Actions or Jscript to modify the .JS file to alter the "no impersonation" bit setting. I can't believe such a trivial item is taking all of my time. David On Fri, Jan 22, 2010 at 8:33 AM, Charlotte Foust wrote: > Maybe you're looking at it from the wrong end. ?The .Net purpose is to give you control, but that doesn't mean you don't have to build your own tools. > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee > Sent: Thursday, January 21, 2010 3:40 PM > To: Discussion concerning Visual Basic and related programming issues. > Subject: Re: [dba-VB] .Net Setup, launch application after installation > > Yes. I've used it before as well (also Wise and even WinZipSE). > I'm trying to do this natively out of the VS2008 setup & deployment project. > I can't believe there isn't anything natively built in to do so. > > > On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust > wrote: >> We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? >> >> Charlotte Foust From davidmcafee at gmail.com Fri Jan 22 12:07:39 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 10:07:39 -0800 Subject: [dba-VB] C# hot keys In-Reply-To: <4B59B035.5050806@colbyconsulting.com> References: <4B59B035.5050806@colbyconsulting.com> Message-ID: <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> F5 still runs/debugs Ctrl+Shift+B to build On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: > In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go > to troubleshoot this? > > -- > John W. Colby From jwcolby at colbyconsulting.com Fri Jan 22 12:10:37 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 13:10:37 -0500 Subject: [dba-VB] C# automation of office Message-ID: <4B59EA1D.1080700@colbyconsulting.com> Does anyone have a good information source for automating office (specifically Excel) from C#? I have a spreadsheet which has code inside of it which pulls data out of SQL Server and dumps it into pages of the spreadsheet. I WAS using Access to do this but my Office 2007 install broke my forms (event properties no longer wire to the code behind form). Thus from C# I need to cause a spreadsheet to open, call a method of the code and pass a server / database string to it. Any help will be greatly appreciated. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Jan 22 12:25:20 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 13:25:20 -0500 Subject: [dba-VB] C# hot keys In-Reply-To: <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> Message-ID: <4B59ED90.30607@colbyconsulting.com> Are you saying that F6 no longer runs debug? What does F6 do instead? John W. Colby www.ColbyConsulting.com David McAfee wrote: > F5 still runs/debugs > > Ctrl+Shift+B to build > > On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >> In Visual Studio F6 and F5 were build and run. Suddenly F6 no longer does the build. Where do I go >> to troubleshoot this? >> >> -- >> John W. Colby > > _______________________________________________ > 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 Jan 22 12:32:33 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 10:32:33 -0800 Subject: [dba-VB] C# hot keys In-Reply-To: <4B59ED90.30607@colbyconsulting.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> <4B59ED90.30607@colbyconsulting.com> Message-ID: <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> Waste a keystroke? :P I don't know, I don't see it anywhere in the menus. On Fri, Jan 22, 2010 at 10:25 AM, jwcolby wrote: > Are you saying that F6 no longer runs debug? ?What does F6 do instead? > > John W. Colby > www.ColbyConsulting.com > > > David McAfee wrote: >> F5 still runs/debugs >> >> Ctrl+Shift+B to build >> >> On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >>> In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go >>> to troubleshoot this? >>> >>> -- >>> John W. Colby >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Fri Jan 22 15:53:59 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 16:53:59 -0500 Subject: [dba-VB] Visual Studio grinds to a halt Message-ID: <4B5A1E77.5060206@colbyconsulting.com> I am running an Access / Excel automation on my dev laptop. It is doing a set of long running queries to populate a spreadsheet with sets of counts, running VBA, accessing the SQL Server on another machine over my network etc. I am also running Visual Studio trying to get some work done. Suddenly VS halts and throws up a "waiting for Excel" message. No idea at what level. The entire system is not hung, i.e. I can use other open apps, just not Access / Excel and ... Visual Studio. 8( -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Jan 22 16:00:37 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 22 Jan 2010 16:00:37 -0600 Subject: [dba-VB] C# hot keys In-Reply-To: <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> <4B59ED90.30607@colbyconsulting.com> <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> Message-ID: You can change that by going to Tools -> Options -> Import and Export and reset your settings. It's nuts but it allows you to select the VB defaults again. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Friday, January 22, 2010 10:33 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] C# hot keys Waste a keystroke? :P I don't know, I don't see it anywhere in the menus. On Fri, Jan 22, 2010 at 10:25 AM, jwcolby wrote: > Are you saying that F6 no longer runs debug? ?What does F6 do instead? > > John W. Colby > www.ColbyConsulting.com > > > David McAfee wrote: >> F5 still runs/debugs >> >> Ctrl+Shift+B to build >> >> On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >>> In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go >>> to troubleshoot this? >>> >>> -- >>> John W. Colby >> From jwcolby at colbyconsulting.com Mon Jan 25 10:50:02 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 11:50:02 -0500 Subject: [dba-VB] C#: Raising events Message-ID: <4B5DCBBA.5070108@colbyconsulting.com> Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Jan 25 11:02:19 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 25 Jan 2010 11:02:19 -0600 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DCBBA.5070108@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 25, 2010 8:50 AM To: VBA Subject: [dba-VB] C#: Raising events Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- 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 Mon Jan 25 11:33:18 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 12:33:18 -0500 Subject: [dba-VB] C#: Raising events In-Reply-To: References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: <4B5DD5DE.7090704@colbyconsulting.com> Charlotte, > I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? LOL. Me too! And no, that is what I do not know how to do. clsAccuzipImportFrom raises an event evStoredProc in many different methods of clsAccuzipImportFrom. The intention is to pass the stored procedure object that it uses up to frmAccuzipImport. clsAccuzipImportFrom is dimensioned in frmAccuzipImport: clsAccuzipImportFrom clsAZImp; frmAccuzipImport need to sink evStoredProc raised in clsAZImp. John W. Colby www.ColbyConsulting.com Charlotte Foust wrote: > I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, January 25, 2010 8:50 AM > To: VBA > Subject: [dba-VB] C#: Raising events > > Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably > are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. > > What I want to do is execute stored procedures, and publish status information about each SP > executed on my form starts a process running. > > I have a class which encapsulates my stored procedure stuff for creating the command object, > capturing the parameters and eventually executing the stored procedure. > > I assume that this object might raise an event when the stored procedure returns i.e. > sCmd.ExecuteNonQuery() returns control to C# ? > > OTOH, I have other classes which USE the SP class. These are the classes that actually call > specific stored procedures, pass parameters, and control the program flow depending on whether the > called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which > passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure > and want to display on the form the name of the sp and whether it completed satisfactorily, how long > it took and so forth. > > I am going to go with the classes which execute sequences of SPs being the class that raises the > event. I am looking at this as an example: > > http://www.codeproject.com/KB/cs/csevents01.aspx > > clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. > > clsAZExport uses a sequence of stored procedures to perform an export process. > > So... I create an event delegate definition which defines the event I will raise. Where do I place > this? For the moment I have placed it inside of the container where clsStoredProc is defined. > > I now have to create evargStoredProcedure - a public class for the argument that this event will > pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where > is this class created? Do I just define a new class at the project level for this event argument. > It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so > placing it in the code container for that class seems appropriate. For the moment I have placed it > inside of the container where clsStoredProc is defined. > > > Now, in every method of clsAZExport I add two lines: > > evargStoredProcedure svargSP = new evargStoredProcedure(sp); > evStoredProc(this, svargSP); > > This apparently creates the arguments object and then raises the event. > > Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. > > So... back in the form which uses clsAZExport to export data from SQL Server... > > At this point their example breaks down entirely. I am not writing to the debug window, I am trying > to write to a control on a form. While the debug window can be written to from anywhere, a control > on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. > > And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared > in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I > did all this I would click on any object that raises an event and I would see a list of their > events, but I do not, or I do not know how to see them. As an example if I have a text box, it has > events. If I click on that I can see its events, select one and voila, a place to say what to do. > How do I do that for an event raised by my class dimensioned and used in my form? > > If anyone is following this and knows what I am trying to do and what to do next, please speak up. > From shamil at smsconsulting.spb.ru Mon Jan 25 11:34:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Mon, 25 Jan 2010 20:34:09 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DCBBA.5070108@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> Hi John -- Here is one of myriads possible solutions how to handle events in caller classes - for form's(/their controls') code behind it will be similar with an exception that you might have to use .Invoke while processing events in event sinks as the latter could run in a different thread than your form's main thread: using System; namespace ConsoleApplication { public class SpRunner { public class SpRunnerStatusReportEventArgs:EventArgs { public int CurrentCount {get; set;} public int MaxCount {get;set; } } public EventHandler StatusReport; public void Run() { const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { if (StatusReport != null) { SpRunnerStatusReportEventArgs e = new SpRunnerStatusReportEventArgs(); e.CurrentCount = i; e.MaxCount = MAX_COUNT; StatusReport(this, e); } } } } class Program { static void Main(string[] args) { SpRunner runner = new SpRunner(); runner.StatusReport += new EventHandler(statusReport); runner.Run(); } private static void statusReport(object sender, SpRunner.SpRunnerStatusReportEventArgs e) { System.Console.WriteLine("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); } } } Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 25, 2010 7:50 PM To: VBA Subject: [dba-VB] C#: Raising events Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Jan 25 12:32:21 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 13:32:21 -0500 Subject: [dba-VB] C#: Raising events In-Reply-To: <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> Message-ID: <4B5DE3B5.1050708@colbyconsulting.com> Shamil, Unfortunately you are doing the same thing every other example is doing, writing the data to the console. I need to write to a control on a form. What I can apparently see from this is that the delegate and the event args need to be in the class that raises the event? These exact same things (delegate and event args class) will be used over and over again in other classes / forms so I was TRYING to place them down in the class that actually implements my stored procedure class. IOW I have a completely separate project that implements the stored procedure class. In that I placed the eventargument class as well as the delegate. these three things will be used in many many different classes / forms. Everything needs to run stored procedures and I was TRYING to "encapsulate" the delegate as well as the eventargs class in the same container as the stored procedure class. What I am seeing you do is to encapsulate the eventargs class and the delegate in the object that raises the event? John W. Colby www.ColbyConsulting.com Shamil Salakhetdinov wrote: > Hi John -- > > Here is one of myriads possible solutions how to handle events in caller > classes - for form's(/their controls') code behind it will be similar with > an exception that you might have to use .Invoke while processing events in > event sinks as the latter could run in a different thread than your form's > main thread: > > using System; > > namespace ConsoleApplication > { > > public class SpRunner > { > public class SpRunnerStatusReportEventArgs:EventArgs > { > public int CurrentCount {get; set;} > public int MaxCount {get;set; } > } > > public EventHandler StatusReport; > public void Run() > { > const int MAX_COUNT = 5; > for (int i = 1; i <= MAX_COUNT; i++) > { > if (StatusReport != null) > { > SpRunnerStatusReportEventArgs e = new > SpRunnerStatusReportEventArgs(); > e.CurrentCount = i; > e.MaxCount = MAX_COUNT; > StatusReport(this, e); > } > } > } > } > > class Program > { > static void Main(string[] args) > { > SpRunner runner = new SpRunner(); > runner.StatusReport += > new > EventHandler(statusReport); > runner.Run(); > } > > private static void statusReport(object sender, > SpRunner.SpRunnerStatusReportEventArgs e) > { > System.Console.WriteLine("{0}: Processing {1} of {2}...", > sender.GetType(), e.CurrentCount, e.MaxCount); > } > } > } > > Thank you. > > -- > Shamil From Gustav at cactus.dk Mon Jan 25 13:38:38 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 25 Jan 2010 20:38:38 +0100 Subject: [dba-VB] C#: Raising events Message-ID: Hi John I lost you too somewhere down the line ... However, here's an example where a manual update at one form (Main) raises an event which requeries another form (Employees). Perhaps that can guide you a little. It writes to the console too but for debugging only. Some code has been snipped. Note the custom attributes. using System; using System.IO; using System.Windows.Forms; namespace DLMail { public partial class FormMain : Form { public DataSetDL DlDataSet = new DataSetDL(); public FormEmployer EmployerForm; public FormEmployee EmployeeForm; public FormPaySlip PaySlipForm; public FormSystem SystemForm; private string _dropFolder = @"Drop"; private string _dropPath; private string _execPath; private string _dataPath; private string _dataFileName = @"DLMail.xml"; private string _dataBaseFile; private int _employerId = -1; private string _employerName = String.Empty; private string _pdfPassword = String.Empty; public string ExecPath { get { return _execPath; } } public string DataPath { get { return _dataPath; } } public string DataBaseFile { get { return _dataBaseFile; } } /// /// The path to the folder where to copy new pay slip PDF files. /// public string DropPath { get { return _dropPath; } } public int EmployerId { get { return _employerId; } } public string EmployerName { get { return _employerName; } } public string PdfPassword { get { return _pdfPassword; } } // Delegate declaration. public delegate void ChangingHandler(object sender, EmployerArgs employerArgs); // Event declaration. public event ChangingHandler EmployerChanged; public void ChangeEmployer() { // Call the event. EmployerArgs employerArgs = new EmployerArgs(_employerId, _employerName, _pdfPassword, _dataPath); // Running on Windows Vista, first time run of EmployerChanged // raises a null reference error. try { EmployerChanged(this, employerArgs); } catch (Exception exception) { Console.WriteLine(exception.Source); } } public FormMain() { InitializeComponent(); InitializeDataSet(); InitializeFolders(); } private void FormMain_Load(object sender, EventArgs e) { FillEmployerComboBox(); this.EmployerChanged += new ChangingHandler(FormMain_EmployerChanged); } private void InitializeDataSet() { _execPath = Path.GetDirectoryName(Application.ExecutablePath); _dataBaseFile = Path.Combine(_execPath, _dataFileName); if (!File.Exists(_dataBaseFile)) { //snip } else { DlDataSet.ReadXml(_dataBaseFile); DataSetDL .DataTablePaySlipTypeDataTable paySlipTypeDataTable = DlDataSet .DataTablePaySlipType ; } } private void InitializeFolders() { string dropPath = Path.Combine(_execPath, _dropFolder); //snip _dropPath = dropPath; } private void FillEmployerComboBox() { int selectedIndex = -1; if (EmployerComboBox.SelectedIndex > -1) { selectedIndex = EmployerComboBox.SelectedIndex; } DataSetDL.DataTableEmployerDataTable dataTableEmployer = DlDataSet.DataTableEmployer; EmployerComboBox.SelectedItem = "Id"; EmployerComboBox.DisplayMember = "Organisation"; EmployerComboBox.DataSource = dataTableEmployer; if (selectedIndex != -1) { EmployerComboBox.SelectedIndex = selectedIndex; } } private void EmployerComboBox_SelectedIndexChanged(object sender, EventArgs e) { ComboBox comboBox = (ComboBox)sender; if (comboBox.SelectedItem != null) { int employerId = Convert.ToInt32(comboBox.SelectedValue); if (!employerId.Equals(_employerId)) { _employerId = employerId; _employerName = comboBox.Text; SetDataPath(); // Raise event. this.ChangeEmployer(); } } } void FormMain_EmployerChanged(object sender, EmployerArgs employerArgs) { Console.WriteLine("Change: " + employerArgs.EmployerId().ToString()); } private void SetDataPath() { DataSetDL.DataTableEmployerRow employerRow = DlDataSet.DataTableEmployer.FindById(_employerId); if (employerRow.IsPdfPasswordNull()) { _pdfPassword = string.Empty; } else { _pdfPassword = employerRow.PdfPassword.Trim(); } _dataPath = Path.Combine(_execPath, employerRow.DataPath); } private void EmployeeButton_Click(object sender, EventArgs e) { if (EmployeeForm == null) { EmployeeForm = new FormEmployee(); EmployeeForm.Show(); EmployeeForm.FormClosed += new FormClosedEventHandler(EmployeeForm_FormClosed); } else { EmployeeForm.Focus(); } } private void EmployeeForm_FormClosed(object sender, FormClosedEventArgs e) { EmployeeForm = null; SaveData(); } private void SaveData() { this.DlDataSet.WriteXml(_dataBaseFile); } } // Custom attributes. public class EmployerArgs : System.EventArgs { private int employerId = 0; private string employerName = String.Empty; private string pdfPassword = String.Empty; private string dataPath = String.Empty; public EmployerArgs(int id, string name, string password, string path) { this.employerId = id; this.employerName = name; this.pdfPassword = password; this.dataPath = path; } public int EmployerId() { return employerId; } public string EmployerName() { return employerName; } public string PdfPassword() { return pdfPassword; } public string DataPath() { return dataPath; } } } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace DLMail { public partial class FormEmployee : Form { private string _dataBaseFile; private int _employerId; public FormEmployee() { InitializeComponent(); InitializeDataSet(); } private void InitializeDataSet() { FormMain formMain = (FormMain)Application.OpenForms[0]; _dataBaseFile = formMain.DataBaseFile; _employerId = formMain.EmployerId; this.dataSetDL = formMain.DlDataSet; ChangeEmployer(); formMain.EmployerChanged += new FormMain.ChangingHandler(formMain_EmployerChanged); } void formMain_EmployerChanged(object sender, EmployerArgs formArgs) { _employerId = formArgs.EmployerId(); ChangeEmployer(); } private void ChangeEmployer() { string filter = String.Empty; // Select only employees of the selected employer. filter = "EmployerId = " + _employerId.ToString(); this.dataTableEmployeeBindingSource.Filter = filter; this.dataTableEmployeeBindingSource.DataSource = this.dataSetDL; } } } /gustav >>> jwcolby at colbyconsulting.com 25-01-2010 17:50:02 >>> Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. From shamil at smsconsulting.spb.ru Mon Jan 25 23:53:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 08:53:09 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7 Ultimate 64 bit Message-ID: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil From shamil at smsconsulting.spb.ru Tue Jan 26 00:20:46 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 09:20:46 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <002601ca9e4f$b3f6a050$1be3e0f0$@spb.ru> John -- As I noted my sample code was one of myriads possible variants - below it yet another one - just a sample. As for setting form controls' properties you have to use .InvokeRequired and .Invoke to check calling context and to properly set controls' properties - you can google/bing for such samples of wait here for some to appear in this or related threads. Thank you. -- Shamil P.S. using System; // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount ; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } // front-end namespace ConsoleApplication { class Program { static void Main(string[] args) { My.BusinessLayerClassLib.SpRunnerManager runner = new My.BusinessLayerClassLib.SpRunnerManager(); runner.StatusReport += new EventHandler(statusReport); runner.Run(); } private static void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { System.Console.WriteLine("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); } } } __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From bill_patten at embarqmail.com Tue Jan 26 01:03:53 2010 From: bill_patten at embarqmail.com (Bill Patten) Date: Mon, 25 Jan 2010 23:03:53 -0800 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002101ca9e4b$d80b3770$8821a650$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? 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 Tue Jan 26 01:31:34 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 10:31:34 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: <002701ca9e59$97cd42d0$c767c870$@spb.ru> Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 02:20:36 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 11:20:36 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Hi Bill -- I have posted my sample test executable here: http://sms-web.biz/jet/64BIT.zip BTW, AFAIU the following trick should help to run this sample app on 64bit system: http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? 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 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 03:14:14 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 12:14:14 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <002e01ca9e67$ef1aede0$cd50c9a0$@spb.ru> HI All -- Here is some information I collected related to the subject of this thread: Running .NET Apps in 32-bit mode on 64-bit Windows http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx 64 Bit Windows, IIS, and Microsoft Access (part 1 of 2) http://www.insideria.com/2009/09/64-bit-windows-iis-and-microso.html http://www.insideria.com/2009/09/64-bit-windows-iis-and-microso-1.html Microsoft Data Access Components (MDAC) 2.8 http://www.microsoft.com/downloads/details.aspx?familyid=6C050FE3-C795-4B7D- B037-185D0506396C&displaylang=en How to obtain the latest (SP8) service pack for the Microsoft Jet 4.0 Database Engine http://support.microsoft.com/kb/239114/en Microsoft Jet Database Engine http://en.wikipedia.org/wiki/Microsoft_Jet_Database_Engine Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, January 26, 2010 11:21 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Bill -- I have posted my sample test executable here: http://sms-web.biz/jet/64BIT.zip BTW, AFAIU the following trick should help to run this sample app on 64bit system: http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill <<< snip >>> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Tue Jan 26 06:16:00 2010 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 26 Jan 2010 12:16:00 +0000 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > From shamil at smsconsulting.spb.ru Tue Jan 26 08:10:39 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 17:10:39 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <003c01ca9e91$582840c0$0878c240$@spb.ru> Thank you, Mark, But did you have MS Jet 4.0 SP8 (and MDAC 2.8) installed on your system before you run my sample app? This PC costs here currently approx. 1000 euro or even more. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Tuesday, January 26, 2010 3:16 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > _______________________________________________ From shamil at smsconsulting.spb.ru Tue Jan 26 08:51:18 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 17:51:18 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <004301ca9e97$07026c10$15074430$@spb.ru> Hi Mark and all, I have posted another test here: http://sms-web.biz/jet/AnotherTest.zip It has Jet db communication within class library: - JetDbTest.ConsoleApp.exe - FE - JetDbTest.ClassLibrary.dll - classlib and it also has two versions of executables" - 1st - compiled for any CPU; - 2nd - compiled for x86 CPU - 32 bit Could you please test how that will work? Current hypothesis/expectation here are that: - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Tuesday, January 26, 2010 3:16 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From bill_patten at embarqmail.com Tue Jan 26 12:51:32 2010 From: bill_patten at embarqmail.com (Bill Patten) Date: Tue, 26 Jan 2010 10:51:32 -0800 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit In-Reply-To: <002701ca9e59$97cd42d0$c767c870$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002701ca9e59$97cd42d0$c767c870$@spb.ru> Message-ID: <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> Hi Shamil, I knew that when I offered to help I could get in over my head, I did. I did my best, but was not able to make the corFlag work, I'm sure it was me not the corflag. I saw that Mark was able to send you good information so hopefully that is what you needed. The x86 did work. I can send you the various log files if that will help you. As near as I can tell the computer parts comes out to about 1300 US. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 11:31 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows7Ultimate64 bit Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru _______________________________________________ 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 Tue Jan 26 10:00:33 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 19:00:33 +0300 Subject: [dba-VB] C#: Raising events (Part 2) In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004b01ca9ea0$b23193f0$1694bbd0$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke (Part 2) - you can put code from Part 1 and Part 1 into one code file replacing Program.cs in Console app, set references to System.Windows.Forms and System.Drawing and run it: // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } __________ Information from ESET NOD32 Antivirus, version of virus signature database 4807 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 09:59:29 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 18:59:29 +0300 Subject: [dba-VB] C#: Raising events (Part 1) In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004a01ca9ea0$8c5b2560$a5117020$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke (Part 1): using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsFormsApp { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new TestForm()); } } // TestForm Designer partial class TestForm { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.cmdTest = new System.Windows.Forms.Button(); this.txtTest = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // cmdTest // this.cmdTest.Location = new System.Drawing.Point(128, 205); this.cmdTest.Name = "cmdTest"; this.cmdTest.Size = new System.Drawing.Size(75, 23); this.cmdTest.TabIndex = 0; this.cmdTest.Text = "&Test"; this.cmdTest.UseVisualStyleBackColor = true; this.cmdTest.Click += new System.EventHandler(this.cmdTest_Click); // // txtTest // this.txtTest.Location = new System.Drawing.Point(12, 13); this.txtTest.Multiline = true; this.txtTest.Name = "txtTest"; this.txtTest.Size = new System.Drawing.Size(311, 175); this.txtTest.TabIndex = 1; // // TestForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(335, 240); this.Controls.Add(this.txtTest); this.Controls.Add(this.cmdTest); this.Name = "TestForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Test Form"; this.Load += new System.EventHandler(this.TestForm_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button cmdTest; private System.Windows.Forms.TextBox txtTest; } // TestForm Code Behind public partial class TestForm : Form { public TestForm() { InitializeComponent(); } private My.BusinessLayerClassLib.SpRunnerManager _runner; private void TestForm_Load(object sender, EventArgs e) { _runner = new My.BusinessLayerClassLib.SpRunnerManager(); _runner.StatusReport += new EventHandler(statusReport); } private void cmdTest_Click(object sender, EventArgs e) { txtTest.Text = null; _runner.Run(); } private void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { string message = string.Format("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); if (txtTest.InvokeRequired) { object[] args = { message }; this.Invoke(new logDelegate(log), args); } else log(message); } private delegate void logDelegate(string message); private void log(string message) { txtTest.Text = message + System.Environment.NewLine + txtTest.Text; } } } ...Continued in part 2.... From shamil at smsconsulting.spb.ru Tue Jan 26 09:16:55 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 18:16:55 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004901ca9e9a$99fbf920$cdf3eb60$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke: using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsFormsApp { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new TestForm()); } } // TestForm Designer partial class TestForm { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.cmdTest = new System.Windows.Forms.Button(); this.txtTest = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // cmdTest // this.cmdTest.Location = new System.Drawing.Point(128, 205); this.cmdTest.Name = "cmdTest"; this.cmdTest.Size = new System.Drawing.Size(75, 23); this.cmdTest.TabIndex = 0; this.cmdTest.Text = "&Test"; this.cmdTest.UseVisualStyleBackColor = true; this.cmdTest.Click += new System.EventHandler(this.cmdTest_Click); // // txtTest // this.txtTest.Location = new System.Drawing.Point(12, 13); this.txtTest.Multiline = true; this.txtTest.Name = "txtTest"; this.txtTest.Size = new System.Drawing.Size(311, 175); this.txtTest.TabIndex = 1; // // TestForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(335, 240); this.Controls.Add(this.txtTest); this.Controls.Add(this.cmdTest); this.Name = "TestForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Test Form"; this.Load += new System.EventHandler(this.TestForm_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button cmdTest; private System.Windows.Forms.TextBox txtTest; } // TestForm Code Behind public partial class TestForm : Form { public TestForm() { InitializeComponent(); } private My.BusinessLayerClassLib.SpRunnerManager _runner; private void TestForm_Load(object sender, EventArgs e) { _runner = new My.BusinessLayerClassLib.SpRunnerManager(); _runner.StatusReport += new EventHandler(statusReport); } private void cmdTest_Click(object sender, EventArgs e) { txtTest.Text = null; _runner.Run(); } private void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { string message = string.Format("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); if (txtTest.InvokeRequired) { object[] args = { message }; this.Invoke(new logDelegate(log), args); } else log(message); } private delegate void logDelegate(string message); private void log(string message) { txtTest.Text = message + System.Environment.NewLine + txtTest.Text; } } } // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } From marklbreen at gmail.com Tue Jan 26 16:54:00 2010 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 26 Jan 2010 22:54:00 +0000 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> Message-ID: Sorry for delay, it was held up due to size of message, I have truncated it here. Mark ---------- Forwarded message ---------- From: Mark Breen Date: 2010/1/26 Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit To: "Discussion concerning Visual Basic and related programming issues." < dba-vb at databaseadvisors.com> Hello Shamil, see below for results of tests, I only need to run it against, JetDbTest.ConsoleApp.exe I did not run against dll file 32 bit file worked well without corflag, - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. thanks Mark ======================= Here is result of x86 with no corflags ran ======================= LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:07:47 - Select test started. LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:07:47 - Select test finished. LOG: 26/01/2010 16:07:47 - Insert test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Insert test finished. LOG: 26/01/2010 16:07:47 - Update test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Update test finished. LOG: 26/01/2010 16:07:47 - Delete test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Delete test finished. LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ======================= Here is msg after running corflags ======================= C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\Cor Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\AnotherTest\AnyCPU>pause Press any key to continue . . . ======================= Here is good result for AnyCPU after running coreflags ======================= LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:10:50 - Select test started. LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:10:50 - Select test finished. LOG: 26/01/2010 16:10:50 - Insert test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Insert test finished. LOG: 26/01/2010 16:10:50 - Update test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Update test finished. LOG: 26/01/2010 16:10:50 - Delete test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Delete test finished. LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... From shamil at smsconsulting.spb.ru Wed Jan 27 00:25:55 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 09:25:55 +0300 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> Message-ID: <009401ca9f19$97189590$c549c0b0$@spb.ru> Hi Mark -- Thank you for your testing. Here is the final test set with sources - it would take a couple of minutes to download, unzip and run: http://sms-web.biz/jet/FinalTest.zip It has - 1) AnyCPU - AnyCPU build as it's made by VS2008; - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using CorFlags.exe; - 4) x86 - x86 32bit build. It's expected (after your two rounds of tests) that now (1) will fail, and (2),(3) and (4) will run OK. BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system after setup, or was that installed with MS Windows SDK you have there? Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Wednesday, January 27, 2010 1:54 AM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Sorry for delay, it was held up due to size of message, I have truncated it here. Mark ---------- Forwarded message ---------- From: Mark Breen Date: 2010/1/26 Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit To: "Discussion concerning Visual Basic and related programming issues." < dba-vb at databaseadvisors.com> Hello Shamil, see below for results of tests, I only need to run it against, JetDbTest.ConsoleApp.exe I did not run against dll file 32 bit file worked well without corflag, - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. thanks Mark ======================= Here is result of x86 with no corflags ran ======================= LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:07:47 - Select test started. LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:07:47 - Select test finished. LOG: 26/01/2010 16:07:47 - Insert test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Insert test finished. LOG: 26/01/2010 16:07:47 - Update test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Update test finished. LOG: 26/01/2010 16:07:47 - Delete test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Delete test finished. LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ======================= Here is msg after running corflags ======================= C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\Cor Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\AnotherTest\AnyCPU>pause Press any key to continue . . . ======================= Here is good result for AnyCPU after running coreflags ======================= LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:10:50 - Select test started. LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:10:50 - Select test finished. LOG: 26/01/2010 16:10:50 - Insert test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Insert test finished. LOG: 26/01/2010 16:10:50 - Update test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Update test finished. LOG: 26/01/2010 16:10:50 - Delete test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Delete test finished. LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... _______________________________________________ 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 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Wed Jan 27 00:58:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 09:58:09 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit In-Reply-To: <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002701ca9e59$97cd42d0$c767c870$@spb.ru> <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> Message-ID: <009a01ca9f1e$16fa5420$44eefc60$@spb.ru> Thank you for your help, Bill. Yes, Mark's tests did answer my questions. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 9:52 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit Hi Shamil, I knew that when I offered to help I could get in over my head, I did. I did my best, but was not able to make the corFlag work, I'm sure it was me not the corflag. I saw that Mark was able to send you good information so hopefully that is what you needed. The x86 did work. I can send you the various log files if that will help you. As near as I can tell the computer parts comes out to about 1300 US. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 11:31 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows7Ultimate64 bit Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Wed Jan 27 06:23:02 2010 From: marklbreen at gmail.com (Mark Breen) Date: Wed, 27 Jan 2010 12:23:02 +0000 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <009401ca9f19$97189590$c549c0b0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> <009401ca9f19$97189590$c549c0b0$@spb.ru> Message-ID: Hello Shamil, All assumptions below are correct. Additionally, when I ran the same routines on any CPU, it worked again, as expected. Not sure what is meant by the following, or how to check? >BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system >after setup, or was that installed with MS Windows SDK you have there? Office 07 is on this box now, but it was on before I started. Do you want me to check something further? thanks Mark 2010/1/27 Shamil Salakhetdinov > Hi Mark -- > > Thank you for your testing. > > Here is the final test set with sources - it would take a couple of minutes > to download, unzip and run: > > http://sms-web.biz/jet/FinalTest.zip > > It has > > - 1) AnyCPU - AnyCPU build as it's made by VS2008; > - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; > - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using > CorFlags.exe; > - 4) x86 - x86 32bit build. > > It's expected (after your two rounds of tests) that now (1) will fail, and > (2),(3) and (4) will run OK. > > BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system > after setup, or was that installed with MS Windows SDK you have there? > > Thank you. > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Wednesday, January 27, 2010 1:54 AM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on > Windows 7Ultimate 64 bit > > Sorry for delay, > > it was held up due to size of message, I have truncated it here. > > Mark > > ---------- Forwarded message ---------- > From: Mark Breen > Date: 2010/1/26 > Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on > Windows > 7Ultimate 64 bit > To: "Discussion concerning Visual Basic and related programming issues." < > dba-vb at databaseadvisors.com> > > > Hello Shamil, > > see below for results of tests, > > I only need to run it against, JetDbTest.ConsoleApp.exe I did not run > against dll file > > 32 bit file worked well without corflag, > > - first one (any CPU) will need to use CorFlags.EXE run against at least > JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and > JetDbTest.ClassLibrary.dll; > > - and second one should run OK "out-of-the-box" on your system as it was > compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 > OLE DB 32bit Drivers already installed. > > > thanks > > Mark > > > > ======================= > Here is result of x86 with no corflags ran > ======================= > > > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:07:47 - Select test started. > LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:07:47 - Select test finished. > LOG: 26/01/2010 16:07:47 - Insert test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Insert test finished. > LOG: 26/01/2010 16:07:47 - Update test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Update test finished. > LOG: 26/01/2010 16:07:47 - Delete test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Delete test finished. > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > > ======================= > Here is msg after running corflags > ======================= > > > C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft > SDKs\Windows\v6.0A\Bin\x64\Cor > Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ > Microsoft (R) .NET Framework CorFlags Conversion Tool. Version > 3.5.21022.8 > Copyright (c) Microsoft Corporation. All rights reserved. > > > C:\AnotherTest\AnyCPU>pause > Press any key to continue . . . > > > ======================= > Here is good result for AnyCPU after running coreflags > ======================= > > > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:10:50 - Select test started. > LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:10:50 - Select test finished. > LOG: 26/01/2010 16:10:50 - Insert test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Insert test finished. > LOG: 26/01/2010 16:10:50 - Update test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Update test finished. > LOG: 26/01/2010 16:10:50 - Delete test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Delete test finished. > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > _______________________________________________ > 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 4808 (20100126) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.esetnod32.ru > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature > database 4808 (20100126) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.esetnod32.ru > > > _______________________________________________ > 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 Jan 27 08:37:30 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 17:37:30 +0300 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> <009401ca9f19$97189590$c549c0b0$@spb.ru> Message-ID: <00ee01ca9f5e$429602b0$c7c20810$@spb.ru> Hello Mark -- Thank you. No, no need to check anything else further. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Wednesday, January 27, 2010 3:23 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hello Shamil, All assumptions below are correct. Additionally, when I ran the same routines on any CPU, it worked again, as expected. Not sure what is meant by the following, or how to check? >BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system >after setup, or was that installed with MS Windows SDK you have there? Office 07 is on this box now, but it was on before I started. Do you want me to check something further? thanks Mark 2010/1/27 Shamil Salakhetdinov > Hi Mark -- > > Thank you for your testing. > > Here is the final test set with sources - it would take a couple of minutes > to download, unzip and run: > > http://sms-web.biz/jet/FinalTest.zip > > It has > > - 1) AnyCPU - AnyCPU build as it's made by VS2008; > - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; > - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using > CorFlags.exe; > - 4) x86 - x86 32bit build. > > It's expected (after your two rounds of tests) that now (1) will fail, and > (2),(3) and (4) will run OK. > > BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system > after setup, or was that installed with MS Windows SDK you have there? > > Thank you. > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Wednesday, January 27, 2010 1:54 AM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on > Windows 7Ultimate 64 bit > > Sorry for delay, > > it was held up due to size of message, I have truncated it here. > > Mark > > ---------- Forwarded message ---------- > From: Mark Breen > Date: 2010/1/26 > Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on > Windows > 7Ultimate 64 bit > To: "Discussion concerning Visual Basic and related programming issues." < > dba-vb at databaseadvisors.com> > > > Hello Shamil, > > see below for results of tests, > > I only need to run it against, JetDbTest.ConsoleApp.exe I did not run > against dll file > > 32 bit file worked well without corflag, > > - first one (any CPU) will need to use CorFlags.EXE run against at least > JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and > JetDbTest.ClassLibrary.dll; > > - and second one should run OK "out-of-the-box" on your system as it was > compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 > OLE DB 32bit Drivers already installed. > > > thanks > > Mark > > > > ======================= > Here is result of x86 with no corflags ran > ======================= > > > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:07:47 - Select test started. > LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:07:47 - Select test finished. > LOG: 26/01/2010 16:07:47 - Insert test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Insert test finished. > LOG: 26/01/2010 16:07:47 - Update test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Update test finished. > LOG: 26/01/2010 16:07:47 - Delete test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Delete test finished. > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > > ======================= > Here is msg after running corflags > ======================= > > > C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft > SDKs\Windows\v6.0A\Bin\x64\Cor > Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ > Microsoft (R) .NET Framework CorFlags Conversion Tool. Version > 3.5.21022.8 > Copyright (c) Microsoft Corporation. All rights reserved. > > > C:\AnotherTest\AnyCPU>pause > Press any key to continue . . . > > > ======================= > Here is good result for AnyCPU after running coreflags > ======================= > > > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:10:50 - Select test started. > LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:10:50 - Select test finished. > LOG: 26/01/2010 16:10:50 - Insert test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Insert test finished. > LOG: 26/01/2010 16:10:50 - Update test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Update test finished. > LOG: 26/01/2010 16:10:50 - Delete test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Delete test finished. > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > _______________________________________________ > 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 4810 (20100127) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Thu Jan 28 04:09:57 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 28 Jan 2010 13:09:57 +0300 Subject: [dba-VB] FYI: The mind just simply can't comprehend Message-ID: <016f01caa002$0caddca0$260995e0$@spb.ru> Hi All, Just wanted to share one interesting weblog entry and my opinion/experience on it - the subject line is taken from the following Sara Ford's weblog entry: "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m anage-an-agile-team-after-6-years-of-waterfall.aspx "The mind just simply can't comprehend" - this is what happens with every(?) experienced developer's mind used to develop and debug their software via long running (heavy) debug sessions as well as with "waterfallish" PMs - the mind of experienced in "doing it other way" developers and managers just can't comprehend how Test Driven Development can results in robust "bullet proof" software usually developed with a lot less pressure and stress - and (sic!) with higher quality, adaptability to the future changes, agility. That's a long way to get one's mind starting to really comprehend what happens when you take that route - the sooner you'll start following it - the better for your business. Thank you. -- Shamil From max.wanadoo at gmail.com Thu Jan 28 04:30:45 2010 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 28 Jan 2010 10:30:45 +0000 Subject: [dba-VB] FYI: The mind just simply can't comprehend In-Reply-To: <016f01caa002$0caddca0$260995e0$@spb.ru> References: <016f01caa002$0caddca0$260995e0$@spb.ru> Message-ID: Shamil, to write lenghty blogs like that simply tells me that she has too much time on her hands. that could all be precised down to a paragraph. max On 28/01/2010, Shamil Salakhetdinov wrote: > Hi All, > > > > Just wanted to share one interesting weblog entry and my opinion/experience > on it - the subject line is taken from the following Sara Ford's weblog > entry: > > > > "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" > > http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m > anage-an-agile-team-after-6-years-of-waterfall.aspx > > > > "The mind just simply can't comprehend" - this is what happens with every(?) > experienced developer's mind used to develop and debug their software via > long running (heavy) debug sessions as well as with "waterfallish" PMs - the > mind of experienced in "doing it other way" developers and managers just > can't comprehend how Test Driven Development can results in robust "bullet > proof" software usually developed with a lot less pressure and stress - and > (sic!) with higher quality, adaptability to the future changes, agility. > > > > That's a long way to get one's mind starting to really comprehend what > happens when you take that route - the sooner you'll start following it - > the better for your business. > > > > 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 Thu Jan 28 04:45:22 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 28 Jan 2010 13:45:22 +0300 Subject: [dba-VB] FYI: The mind just simply can't comprehend In-Reply-To: References: <016f01caa002$0caddca0$260995e0$@spb.ru> Message-ID: <017401caa006$ff2f7a70$fd8e6f50$@spb.ru> Max, She probably writes that blog in her spare time "just for fun" as we do post here? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Thursday, January 28, 2010 1:31 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] FYI: The mind just simply can't comprehend Shamil, to write lenghty blogs like that simply tells me that she has too much time on her hands. that could all be precised down to a paragraph. max On 28/01/2010, Shamil Salakhetdinov wrote: > Hi All, > > > > Just wanted to share one interesting weblog entry and my opinion/experience > on it - the subject line is taken from the following Sara Ford's weblog > entry: > > > > "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" > > http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m > anage-an-agile-team-after-6-years-of-waterfall.aspx > > > > "The mind just simply can't comprehend" - this is what happens with every(?) > experienced developer's mind used to develop and debug their software via > long running (heavy) debug sessions as well as with "waterfallish" PMs - the > mind of experienced in "doing it other way" developers and managers just > can't comprehend how Test Driven Development can results in robust "bullet > proof" software usually developed with a lot less pressure and stress - and > (sic!) with higher quality, adaptability to the future changes, agility. > > > > That's a long way to get one's mind starting to really comprehend what > happens when you take that route - the sooner you'll start following it - > the better for your business. > > > > Thank you. > > > > -- > > Shamil > > > __________ Information from ESET NOD32 Antivirus, version of virus signature database 4813 (20100128) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Sat Jan 30 06:20:08 2010 From: marklbreen at gmail.com (Mark Breen) Date: Sat, 30 Jan 2010 12:20:08 +0000 Subject: [dba-VB] [AccessD] C# automation of office In-Reply-To: <4B59EA1D.1080700@colbyconsulting.com> References: <4B59EA1D.1080700@colbyconsulting.com> Message-ID: Hello John, Sorry this is late in coming, the following code is take from a live project of mine where we write to Excel from VS2008. I have snipped sections of code from one routine, and I have highlighted with my comments the five seperate bits I have given you, each bit is only a few lines of code, but they may be all you need to get Excel talking. I hope the code formats ok here, if not, let me know and I will send you a text file. Note a few things below 1) you can insert comments easily 2) you can insert columns easily 3) selecting a range if often the first step to performing an action HINT: Record a macro in Excel to add color and then you will have the code to do that from within C# thanks Mark // This bit shows the using statements you will need using Microsoft.Office.Interop.Excel; using Microsoft.Office.Tools.Excel; // This bit shows how to op an connection to Excel if (grdParts.RowCount > 0) { if (MessageBox.Show("Export Master Parts List?", "Export", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == (DialogResult.Yes)) { this.Cursor = Cursors.WaitCursor; Int32 intPos = bsParts.Position; try { if (SaveChanges()) { Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook xlWB = xlApp.Workbooks.Add(XlWBATemplate.xlWBATWorksheet); Microsoft.Office.Interop.Excel.Worksheet xlWS = (Microsoft.Office.Interop.Excel.Worksheet)xlWB.Worksheets[1]; xlApp.Visible = true; xlWS.Cells[2, 6] = "Parts List "; xlWS.Cells[3, 6] = "Date " + DateTime.Now.ToLongDateString(); // This bit shows how to write comments to excel Microsoft.Office.Interop.Excel.Range nRange; nRange = (Microsoft.Office.Interop.Excel.Range)xlWS.Cells[intRowIndex + intRowIncrement, intColumnIndex - 11]; nRange.AddComment(strFullComments.Replace("\r", "")); nRange.Comment.Shape.TextFrame.AutoSize = true; // This but shows how to insert a column Range rng = (Range)xlWS.Cells[1,2]; Range column = rng.EntireColumn; column.Insert(XlInsertShiftDirection.xlShiftToRight, false); column.Insert(XlInsertShiftDirection.xlShiftToRight, false); // this bit shows how to save the sheet String strFileName = "C:\\McAfee Prd Report_" + DateTime.Now.ToLongDateString() + "-" + DateTime.Now.ToLongTimeString().Replace(":", "") + ".xls"; xlWS.SaveAs(strFileName, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); On 22 January 2010 18:10, jwcolby wrote: > Does anyone have a good information source for automating office > (specifically Excel) from C#? > > I have a spreadsheet which has code inside of it which pulls data out of > SQL Server and dumps it > into pages of the spreadsheet. I WAS using Access to do this but my Office > 2007 install broke my > forms (event properties no longer wire to the code behind form). Thus from > C# I need to cause a > spreadsheet to open, call a method of the code and pass a server / database > string to it. > > Any help will be greatly appreciated. > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Mon Jan 4 11:05:56 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 04 Jan 2010 12:05:56 -0500 Subject: [dba-VB] Version control Message-ID: <4B421FF4.2040003@colbyconsulting.com> What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- John W. Colby www.ColbyConsulting.com From Gustav at cactus.dk Mon Jan 4 11:53:41 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jan 2010 18:53:41 +0100 Subject: [dba-VB] Version control Message-ID: Hi John Those of us, including you, who attend the Northwind.NET project (Shamil's SCRUM project) obtained a developer license for VisualSVN: Hi Gustav, Here is the VisualSVN license for Northwind.NET project. You can forward this license key to all members of your project but please don't distribute it outside of the project team. -------------------------------------------------- -------------------------------------------------- If you like to provide a reference to VisualSVN on your web site please get the logo at http://www.visualsvn.com/company/logos. Good luck with your project :) -- Regards, Olga Dolidze VisualSVN Support I have planed to set up the server for this (free) server for VisualSVN but I haven't had the server capacity until recently: http://www.visualsvn.com/server/ Should be piece of cake ... /gustav >>> jwcolby at colbyconsulting.com 04-01-2010 18:05 >>> What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Jan 4 12:45:40 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 4 Jan 2010 12:45:40 -0600 Subject: [dba-VB] Version control In-Reply-To: <4B421FF4.2040003@colbyconsulting.com> References: <4B421FF4.2040003@colbyconsulting.com> Message-ID: We just switched to SourceGear's Vault. It is an easy transition from SourceSafe and has some very nice features. The only thing I've found it lacking is the sourcesafe properties from the VS Files submenu. Have to go to VaultClient to see the links. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 04, 2010 9:06 AM To: VBA Subject: [dba-VB] Version control What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- 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 Tue Jan 5 09:57:35 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jan 2010 10:57:35 -0500 Subject: [dba-VB] Microsoft partner Message-ID: <4B43616F.5050509@colbyconsulting.com> I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- John W. Colby www.ColbyConsulting.com From garykjos at gmail.com Tue Jan 5 10:26:52 2010 From: garykjos at gmail.com (Gary Kjos) Date: Tue, 5 Jan 2010 10:26:52 -0600 Subject: [dba-VB] [dba-SQLServer] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> References: <4B43616F.5050509@colbyconsulting.com> Message-ID: I'm a Microsoft partner on my own too. Had to come up with a company name the last time. Gary Kjos Consulting Services. I guess I would be interested in at least looking at the idea of combining with some DBA people. GK On Tue, Jan 5, 2010 at 9:57 AM, jwcolby wrote: > I am getting calls from Microsoft re my partnership. ?The caller today gave me a free certificate > for a training course on server virtualization. ?It is for the Server 2008 Hyper V virtualization > stuff. ?I just clicked through to see what it is and it looks interesting. ?This is the only > certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to > convince me how valuable my membership is. ?My membership is expiring this month. > > If you have a membership and are interested in such stuff, you might want to call and ask if you are > eligible for this. > > BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of > obtaining the credentials for partner companies, please speak up. ?As a "sole proprietor" it is > difficult for me to get enough of these credentials to qualify. ?However I am told that we as a > group could form a virtual organization and do this. ?Each member would need to get one (or more) > credentials, then we would need to band together and present as an organization. > > It might be worth doing. > > -- > John W. Colby > www.ColbyConsulting.com > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- Gary Kjos garykjos at gmail.com From mmattys at rochester.rr.com Tue Jan 5 10:39:49 2010 From: mmattys at rochester.rr.com (Michael R Mattys) Date: Tue, 5 Jan 2010 11:39:49 -0500 Subject: [dba-VB] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> Message-ID: Hi John, My brother and I are looking for such opportunities also. So ... count us in. Let us know what information will be required. Michael R Mattys Business Process Developers www.mattysconsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of jwcolby Sent: Tuesday, January 05, 2010 10:58 AM To: Access Developers discussion and problem solving; VBA; Dba-Sqlserver Subject: [dba-VB] Microsoft partner I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- 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 shamil at smsconsulting.spb.ru Tue Jan 5 11:01:49 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 5 Jan 2010 20:01:49 +0300 Subject: [dba-VB] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> References: <4B43616F.5050509@colbyconsulting.com> Message-ID: <000901ca8e28$c742cbc0$55c86340$@spb.ru> Hi John -- I would be interested to join such a virtual organization (if it could be international) to get MS Partner Status: I'm MCP, MCAD.NET and MCSD.NET. As far as I know MS Partner Status lets to purchase MSDN Prof. subscription (5 licenses?) for about USD400-500? - I'd be interested to participate in sharing of the costs of such MSDN subscription... Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, January 05, 2010 6:58 PM To: Access Developers discussion and problem solving; VBA; Dba-Sqlserver Subject: [dba-VB] Microsoft partner I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- 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 __________ Information from ESET NOD32 Antivirus, version of virus signature database 4745 (20100105) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4745 (20100105) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 5 17:15:22 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 6 Jan 2010 02:15:22 +0300 Subject: [dba-VB] SCRUM/Agile Teamwork: The Leadership - Self-management Dilemma Message-ID: <000901ca8e5c$f62b2ac0$e2818040$@spb.ru> Hi All - I suppose the subject article is one of the best on Agile Teamwork I've ever read - the best in fact IMO: http://www.infoq.com/articles/agile-teamwork;jsessionid=F3CDBBECDB2B79035FC5 F417CE5757B8 I went through a free quiz/questionnaire they handle to evaluate Agile Teams: http://quiz.brightgreenprojects.com/agile_team_report And I have got the following results as I perceived them for our Northwind.NET agile teamwork project: ==== 75% - Advising team performance factor. 91% - Innovating team performance factor. 83% - Promoting team performance factor. 91% - Developing team performance factor. 58% - Organizing team performance factor. 83% - Producing team performance factor. 75% - Inspecting team performance factor. 85% - Maintaining team performance factor. You scored over 80% for the Linking team performance factor. ==== If your score on all sectors is over 80% then you consider your agile team to be well on the way to high performance. If your score is in the range 60-80% for all sectors then your team is probably doing some things well but there is definite scope for improvement. If your score on any sector is below 50% then this is an area where your team can make substantial improvements to the way it is working. These sectors should be an immediate development priority for your team. === It would be interesting to get results of your passing through this quiz to find out how well our results will correlate. Not urgent. Thank you. -- Shamil From Gustav at cactus.dk Wed Jan 6 02:33:20 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jan 2010 09:33:20 +0100 Subject: [dba-VB] Microsoft partner Message-ID: Hi John and the Board of Directors Could such an organisation be Database Advisors Inc? /gustav >>> jwcolby at colbyconsulting.com 05-01-2010 16:57 >>> BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Wed Jan 6 06:54:32 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 07:54:32 -0500 Subject: [dba-VB] Microsoft partner In-Reply-To: References: Message-ID: <4B448808.8050401@colbyconsulting.com> It could be. There are pros and cons from Database Advisor's perspective. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi John and the Board of Directors > > Could such an organisation be Database Advisors Inc? > > /gustav > > >>>> jwcolby at colbyconsulting.com 05-01-2010 16:57 >>> > > BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of > obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is > difficult for me to get enough of these credentials to qualify. However I am told that we as a > group could form a virtual organization and do this. Each member would need to get one (or more) > credentials, then we would need to band together and present as an organization. > > It might be worth doing. > From jwcolby at colbyconsulting.com Wed Jan 6 07:28:11 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 08:28:11 -0500 Subject: [dba-VB] [AccessD] Microsoft partner In-Reply-To: <034a01ca8e5a$131eb1e0$0701a8c0@MSIMMSWS> References: <4B43616F.5050509@colbyconsulting.com> <034a01ca8e5a$131eb1e0$0701a8c0@MSIMMSWS> Message-ID: <4B448FEB.70602@colbyconsulting.com> Mark, Understand that I am NOT a very active "partner", in fact as far as I can tell I am more an "associate". I have never made any effort to do the qualifications etc. From what I can tell, for various reasons it is not a good idea to approach the "partnership" from a "how many referrals" angle. While MS does have a "referral" process, if you are going to pursue the partnership it would probably work best to approach it from a "what can I learn" and "what software can I get" all for a reduced price. If you ever get any referrals that is a bonus. All of that said with the understanding that I am not really active in their program. I would like to be, but more in order to get trained up a little. There are areas that I would like to know more about. Personally, I have never had much use for Microsoft's "credentials", but many people do get them. I have always been about "what do I know" more than "what strings of characters can I put after my name". OTOH if I had spent 10 years getting a "doctor" title that would probably be important to me. In terms of my proposal however I think forming a "virtual consulting company" would be about referrals, however the referrals would likely come from other members of the company. If there are 10 guys from this list, we would undoubtedly have a wide range of backgrounds and expertise. If someone asks if I can do virtualization, I would be able to say "I'll get back to you" and go see if any of you are strong in that area. Or maybe even have a spreadsheet or word document that would tell me "Member XYZ claims to be an 'expert' in these areas". That kind of thing. AND... those "strings of characters" are important to some clients. Thus being able to put a whole string of Microsoft credentials on my web site might attract business. I would not necessarily perform the work, it might go to another partner in the company. More and more, where you live affects your ability to perform your work very little. We can remote in to do programming, database design or maintenance and so forth. If you don't have to physically touch something then it can often be done remotely. A "virtual" company consisting of highly skilled people scattered around the world could work well. John W. Colby www.ColbyConsulting.com Mark Simms wrote: > John - I'm just kind of curious about the MSFT Partnership program.... > Do you get any decent leads or referals from them ? > > > From jwcolby at colbyconsulting.com Wed Jan 6 07:31:38 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 08:31:38 -0500 Subject: [dba-VB] Transfer database schema objects and data to another server/database with SMO Message-ID: <4B4490BA.6050006@colbyconsulting.com> http://www.mssqltips.com/tip.asp?tip=1910&home -- John W. Colby www.ColbyConsulting.com From marklbreen at gmail.com Fri Jan 15 03:16:44 2010 From: marklbreen at gmail.com (Mark Breen) Date: Fri, 15 Jan 2010 09:16:44 +0000 Subject: [dba-VB] Django Anyone? Message-ID: Hello All, I recently heard about a framework named Django. As some that is only really a MS person, and little exposure to outside that world, has anyone any experience of this project? Any feedback or reviews? Does anyone have a perspective on how, or on which levels it compares to DotNetNuke (VB.Net)? http://www.djangoproject.com/ http://docs.djangoproject.com/en/dev/intro/overview/ I took the opinion that the vb list is for programmers and that this is programming related, hope that is OK? thanks Mark From DWUTKA at Marlow.com Fri Jan 15 12:40:25 2010 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 15 Jan 2010 12:40:25 -0600 Subject: [dba-VB] VB 6 quirk In-Reply-To: References: Message-ID: Ok, I'm sure not many of you are using VB 6 anymore. I really don't develop much anymore myself. However, I have a user that is running into a quirk with Adobe. It's a form pdf, that creates an XFDF extension. Inside this 'data file' (that she receives in email), it's got a tag that shows a full URL of what the user used to view the pdf form. This is an http://.... URL. On her full version of Acrobat, it has a problem dealing with the URLs, it just keeps prompting if you want to allow access to http://... Now, if you go into that .xfdf data file, and just change that href property to the actual network path (\\server\share\...), then it opens just fine. It seems that Acrobat Reader is adding the URL on the end users end, so it's not something we can fix in the pdf form. (At least we can't find a property to do so). Since it's a pretty simple fix to change the URL to the UNC path, I figured I'd whip up a little VB program to do that. Did that, piece of cake. Wanted to make it an 'invisible process', by having the program just monitor a folder where she could save these emailed .xfdf data files too. When a new file is added to the monitored folder, it does it's job, and saves the new file as 'converted_.....xfdf'. Program works like a charm..IN DEBUG mode. Compile it, and run it, and the CreateFile API which gets the handle to start the monitoring process kicks back a DLLError 998. Now, why would code work perfectly in debug mode, but not work in a compiled state. Here is my file monitoring class: The line 'If hDir=-1' is getting skipped in debug mode (because it's getting a valid handle), and in a compiled state, it dumps out the LastDllError as 998 (actually, it was doing 998, until I added the strPathToMonitor variable,a nd now it's doing 1305. I'm stumped. Anyone have any ideas? Option Explicit Event FileActivity(strFileName As String, Action As FS_File_Actions) Public PathToMonitor As String Dim blKeepMonitoring As Boolean Private Declare Function FS_CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long Private Declare Function FS_ReadDirChanges Lib "kernel32" Alias "ReadDirectoryChangesW" (ByVal hDir As Long, ByVal lpBuffer As Long, ByVal lenBuffer As Long, ByVal bWatchSubtree As Boolean, ByVal dwNotifyFilter As Long, ByRef dwBytesReturned As Long, ByVal lpOverLapped As Long, ByVal dwCallBack As Long) As Long Private Declare Function FS_CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Long) As Long Private Declare Function FS_CreateEvent Lib "kernel32" Alias "CreateEventA" (lpEventAttributes As Any, ByVal bManualReset As Long, ByVal bInitialState As Long, ByVal lpName As String) As Long Private Declare Function FS_ResetEvent Lib "kernel32" Alias "ResetEvent" (ByVal hEvent As Long) As Long Private Declare Sub FS_CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Long, ByVal Source As Long, ByVal Length As Long) Private Declare Function FS_WaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Private Const FILE_LIST_DIRECTORY = (&H1) Private Const FILE_SHARE_DELETE = &H4 Private Const FILE_SHARE_READ = &H1 Private Const FILE_SHARE_WRITE = &H2 Private Const OPEN_EXISTING = 3 Private Const FILE_FLAG_BACKUP_SEMANTICS = &H2000000 Private Const FILE_FLAG_OVERLAPPED = &H40000000 Private Const FILE_NOTIFY_CHANGE_ATTRIBUTES = &H4 Private Const FILE_NOTIFY_CHANGE_CREATION = &H40 Private Const FILE_NOTIFY_CHANGE_DIR_NAME = &H2 Private Const FILE_NOTIFY_CHANGE_FILE_NAME = &H1 Private Const FILE_NOTIFY_CHANGE_LAST_ACCESS = &H20 Private Const FILE_NOTIFY_CHANGE_LAST_WRITE = &H10 Private Const FILE_NOTIFY_CHANGE_SECURITY = &H100 Private Const FILE_NOTIFY_CHANGE_SIZE = &H8 Private Const WAIT_TIMEOUT = 258& Public Enum FS_File_Actions FILE_ACTION_ADDED = &H1 FILE_ACTION_MODIFIED = &H3 FILE_ACTION_REMOVED = &H2 FILE_ACTION_RENAMED_NEW_NAME = &H5 FILE_ACTION_RENAMED_OLD_NAME = &H4 End Enum Private Type FS_FILE_NOTIFY_INFORMATION NextEntryOffset As Long Action As FS_File_Actions FileNameLength As Long FileName(1024 - 1) As Byte End Type Private Type FS_OVERLAPPED Internal As Long InternalHigh As Long Offset As Long OffsetHigh As Long hEvent As Long End Type Public Function StartMonitoring() 'On Error GoTo ErrorHandler Dim hDir As Long Dim dwReturn As Long Dim intReturnSize As Long Dim ovr As FS_OVERLAPPED Dim hEvent As Long Dim intWatchFilter As Long Dim fni As FS_FILE_NOTIFY_INFORMATION Dim fniBuf(0 To 1024 * 5 - 1) As Byte Dim BufferPos As Long Dim strFileName As String Dim strPathToMonitor As String strPathToMonitor = PathToMonitor blKeepMonitoring = True intWatchFilter = FILE_NOTIFY_CHANGE_ATTRIBUTES + FILE_NOTIFY_CHANGE_CREATION + FILE_NOTIFY_CHANGE_DIR_NAME + FILE_NOTIFY_CHANGE_FILE_NAME + FILE_NOTIFY_CHANGE_LAST_ACCESS + FILE_NOTIFY_CHANGE_LAST_WRITE + FILE_NOTIFY_CHANGE_SECURITY + FILE_NOTIFY_CHANGE_SIZE hDir = FS_CreateFile(strPathToMonitor, FILE_LIST_DIRECTORY, FILE_SHARE_READ Or FILE_SHARE_DELETE Or FILE_SHARE_WRITE, Null, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS Or FILE_FLAG_OVERLAPPED, 0) If hDir = -1 Then MsgBox "Invalid Handle Value...Error: " & Err.LastDllError End If hEvent = FS_CreateEvent(0&, True, True, "FS_IOEvent") ovr.hEvent = hEvent dwReturn = FS_ReadDirChanges(hDir, VarPtr(fniBuf(0)), UBound(fniBuf) + 1, True, intWatchFilter, intReturnSize, VarPtr(ovr), 0&) If dwReturn = 0 Then MsgBox "Error Calling ReadDirChanges" MsgBox Err.LastDllError MsgBox ovr.hEvent MsgBox hDir End If Do Until blKeepMonitoring = False BufferPos = 0 dwReturn = FS_WaitForSingleObject(hEvent, 100) If dwReturn <> WAIT_TIMEOUT Then 'MsgBox fniBuf(0) FS_CopyMemory VarPtr(fni), VarPtr(fniBuf(BufferPos)), Len(fni) strFileName = fni.FileName strFileName = Left(strFileName, fni.FileNameLength / 2) RaiseEvent FileActivity(strFileName, fni.Action) While fni.NextEntryOffset <> 0 BufferPos = BufferPos + fni.NextEntryOffset FS_CopyMemory VarPtr(fni), VarPtr(fniBuf(BufferPos)), Len(fni) strFileName = fni.FileName strFileName = Left(strFileName, fni.FileNameLength / 2) RaiseEvent FileActivity(strFileName, fni.Action) Wend FS_ResetEvent hEvent dwReturn = FS_ReadDirChanges(hDir, VarPtr(fniBuf(0)), UBound(fniBuf) + 1, True, intWatchFilter, intReturnSize, VarPtr(ovr), 0&) End If DoEvents Loop ErrorHandler: FS_CloseHandle hEvent FS_CloseHandle hDir End Function Public Function StopMonitoring() blKeepMonitoring = False End Function Private Sub Class_Initialize() blKeepMonitoring = False End Sub The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From jwcolby at colbyconsulting.com Mon Jan 18 14:40:19 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jan 2010 15:40:19 -0500 Subject: [dba-VB] 2008 backup / restore scripts Message-ID: <4B54C733.5060006@colbyconsulting.com> I obtained a developer copy of SQL Server 2008, which has full backup / restore with compression if I understand correctly. I had been using Idera's SQL Safe free version but that is no longer free. Of course now all of my backups are locked away in a version of a program that I can no longer use. Free is only free until it's not, whereupon it is a liability. Sigh. Anyway... I am wondering if anyone has a stored procedure that will use the 2008 built-in backup to do a full backup with compression. I built a C# program to use the Idera scripts to do my backups and restores. I am hoping that I can get a similar native 2008 stored procedure that I can call to do the same thing. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Tue Jan 19 08:05:51 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 19 Jan 2010 09:05:51 -0500 Subject: [dba-VB] SQL Server: An interesting data load article Message-ID: <4B55BC3F.20304@colbyconsulting.com> http://msdn.microsoft.com/en-us/library/dd537533.aspx -- John W. Colby www.ColbyConsulting.com From davidmcafee at gmail.com Wed Jan 20 16:28:20 2010 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 20 Jan 2010 14:28:20 -0800 Subject: [dba-VB] VB.Net Wait for file to Download before launching Message-ID: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> Does anyone know how to do this? I have this program that checks for updates : If IsUpdateAvailable() Then DownloadUpdate() LaunchUpdateInstaller() LaunchApp() Else LaunchApp() End If The Update detection and Download work great: Private Sub DownloadUpdate() If Directory.Exists(InstallFilesPath) Then 'if the local path exists then check for the actual file If File.Exists(InstallFilesPath + InstallFile) Then 'Check to see if the new file is already installed 'Delete file File.Delete(InstallFilesPath + InstallFile) 'Then download it DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) Else ' If the source file can't be found, Download new copy DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If Else 'Directory did not exist, so create it and copy new file over Directory.CreateDirectory(InstallFilesPath) DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If End Sub Private Sub LaunchApp() 'This sub launches the actual Program System.Diagnostics.Process.Start(AppPath + AppName) End Sub The trouble is that it wants to run the LaunchApp() sub immediatley after calling the LaunchUpdateInstaller() sub. I was thinking of putting in a timer of some sort, but I was wondering if there is some quicker/better way of doing this. MTIA, David McAfee From cfoust at infostatsystems.com Wed Jan 20 17:26:52 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 20 Jan 2010 17:26:52 -0600 Subject: [dba-VB] VB.Net Wait for file to Download before launching In-Reply-To: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> References: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> Message-ID: You can use a small text file on the drive as a flag. Start it when you call the installer and then keep checking for it at intervals. When it's no longer there (the installer removes it), launch the application. Or you could do it the other way around and have the installer remove a file you create just before you call it. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Wednesday, January 20, 2010 2:28 PM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] VB.Net Wait for file to Download before launching Does anyone know how to do this? I have this program that checks for updates : If IsUpdateAvailable() Then DownloadUpdate() LaunchUpdateInstaller() LaunchApp() Else LaunchApp() End If The Update detection and Download work great: Private Sub DownloadUpdate() If Directory.Exists(InstallFilesPath) Then 'if the local path exists then check for the actual file If File.Exists(InstallFilesPath + InstallFile) Then 'Check to see if the new file is already installed 'Delete file File.Delete(InstallFilesPath + InstallFile) 'Then download it DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) Else ' If the source file can't be found, Download new copy DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If Else 'Directory did not exist, so create it and copy new file over Directory.CreateDirectory(InstallFilesPath) DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If End Sub Private Sub LaunchApp() 'This sub launches the actual Program System.Diagnostics.Process.Start(AppPath + AppName) End Sub The trouble is that it wants to run the LaunchApp() sub immediatley after calling the LaunchUpdateInstaller() sub. I was thinking of putting in a timer of some sort, but I was wondering if there is some quicker/better way of doing this. MTIA, David McAfee _______________________________________________ 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 Jan 21 06:52:16 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 21 Jan 2010 13:52:16 +0100 Subject: [dba-VB] Webcast: ADO.NET Entity Framework 4 Message-ID: Hi all Tour the Top 10 Treats in Entity Framework 4: http://www.oreillynet.com/pub/e/1517 by EF guru, Julie Lerman. /gustav From jwcolby at colbyconsulting.com Thu Jan 21 07:58:41 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 21 Jan 2010 08:58:41 -0500 Subject: [dba-VB] How unique are SQL Server error numbers? Message-ID: <4B585D91.4010604@colbyconsulting.com> I am calling stored procedures and passing back the error number and error string to my C# program. I am doing things like "create field, create index" etc. If I am trying to create a field and it already exists I get an error: pErrorDesc "Column names in each table must be unique. Column name 'AddrValid' in table '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." And pErrorNo "2705" So my question is, can I count on a 2705 being this "column name must be unique"? If so, in my C# program, I can count that as a successful field creation rather than a failure of the stored procedure. ATM I am saying that a failure occurred and not performing the next step, whereas I really can do the next step (update that field). TIA for your assistance. -- John W. Colby www.ColbyConsulting.com From davidmcafee at gmail.com Thu Jan 21 08:41:37 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 06:41:37 -0800 Subject: [dba-VB] How unique are SQL Server error numbers? In-Reply-To: <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> References: <4B585D91.4010604@colbyconsulting.com> <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> Message-ID: <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> John, you can trap for built in errors (such as 2705) in TSQL, or you can raise your own if/when certain conditions are met. Sent from my Droid phone. On Jan 21, 2010 6:00 AM, "jwcolby" wrote: I am calling stored procedures and passing back the error number and error string to my C# program. I am doing things like "create field, create index" etc. If I am trying to create a field and it already exists I get an error: pErrorDesc "Column names in each table must be unique. Column name 'AddrValid' in table '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." And pErrorNo "2705" So my question is, can I count on a 2705 being this "column name must be unique"? If so, in my C# program, I can count that as a successful field creation rather than a failure of the stored procedure. ATM I am saying that a failure occurred and not performing the next step, whereas I really can do the next step (update that field). TIA for your assistance. -- 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 Thu Jan 21 10:49:59 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 21 Jan 2010 11:49:59 -0500 Subject: [dba-VB] How unique are SQL Server error numbers? In-Reply-To: <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> References: <4B585D91.4010604@colbyconsulting.com> <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> Message-ID: <4B5885B7.5030606@colbyconsulting.com> David, I have built up a library of stored procedures that I have, up to this point, executed manually or in another stored procedure. Being a programmer at heart, then next logical step is to execute these SPs from a C# program at the click of a button. That is what I am up to now. I am breaking the stored procedures down now that I can control them from C#. Where before I might Make a table Create a cover query in a source table. Append data from the source into the new table Create a couple of indexes in the new table I would do all of the above in a single stored procedure. I now want to be able to do each of these steps individually and know back in C# what happened. Perhaps the make table failed for some reason. Creating the cover index on the source failed, but it failed because the index already exists. Appending data from source to destination worked, but how many records went? Etc. Having a real programming environment from which to cause these to happen and log the results is a HUGE step up from what I was capable of directly in TSQL. I view it as the best of both worlds. John W. Colby www.ColbyConsulting.com David McAfee wrote: > John, you can trap for built in errors (such as 2705) in TSQL, or you can > raise your own if/when certain conditions are met. > > Sent from my Droid phone. > > On Jan 21, 2010 6:00 AM, "jwcolby" wrote: > > I am calling stored procedures and passing back the error number and error > string to my C# program. > I am doing things like "create field, create index" etc. If I am trying to > create a field and it > already exists I get an error: > > pErrorDesc "Column names in each table must be unique. Column name > 'AddrValid' in table > '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." > > And > > pErrorNo "2705" > > So my question is, can I count on a 2705 being this "column name must be > unique"? If so, in my C# > program, I can count that as a successful field creation rather than a > failure of the stored procedure. > > ATM I am saying that a failure occurred and not performing the next step, > whereas I really can do > the next step (update that field). > > TIA for your assistance. > > -- > 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 > _______________________________________________ > 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 Thu Jan 21 16:58:41 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 14:58:41 -0800 Subject: [dba-VB] .Net Setup, launch application after installation Message-ID: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> OK, am I the only one having a hard time with this? Visual Studio 2008 doesn't offer a simple method of launching the application after installation (via Setup/MSI), or at least provide an easy way to prompt the user if they want to launch the app on the finished screen. I used to be able to so this from Install Shield, Wise and hell, even via WinZip Self Extractor. I've been following tips from here: http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage But I still don't have the ability to launch the app that is being installed. Do any of you .Net gurus know of an easy way to do so? Thanks, David From cfoust at infostatsystems.com Thu Jan 21 17:22:24 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 21 Jan 2010 17:22:24 -0600 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> Message-ID: We use an installShield installer and it has provision for a file to execute when the installation ends. Is that what you mean? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, January 21, 2010 2:59 PM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] .Net Setup, launch application after installation OK, am I the only one having a hard time with this? Visual Studio 2008 doesn't offer a simple method of launching the application after installation (via Setup/MSI), or at least provide an easy way to prompt the user if they want to launch the app on the finished screen. I used to be able to so this from Install Shield, Wise and hell, even via WinZip Self Extractor. I've been following tips from here: http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage But I still don't have the ability to launch the app that is being installed. Do any of you .Net gurus know of an easy way to do so? Thanks, David _______________________________________________ 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 Thu Jan 21 17:39:30 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 15:39:30 -0800 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> Message-ID: <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Yes. I've used it before as well (also Wise and even WinZipSE). I'm trying to do this natively out of the VS2008 setup & deployment project. I can't believe there isn't anything natively built in to do so. On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust wrote: > We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee > Sent: Thursday, January 21, 2010 2:59 PM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] .Net Setup, launch application after installation > > OK, am I the only one having a hard time with this? > > Visual Studio 2008 doesn't offer a simple method of launching the > application after installation (via Setup/MSI), or at least provide an > easy way to prompt the user if they want to launch the app on the > finished screen. > > I used to be able to so this from Install Shield, Wise and hell, even > via WinZip Self Extractor. > > I've been following tips from here: > http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx > and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage > > But I still don't have the ability to launch the app that is being installed. > > Do any of you .Net gurus know of an easy way to do so? > > Thanks, > David > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Fri Jan 22 07:56:31 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 08:56:31 -0500 Subject: [dba-VB] Free SQL Server tools Message-ID: <4B59AE8F.2030206@colbyconsulting.com> For all the small shops out there, this just in: http://www.sqlservercentral.com/articles/Tools/64908/ -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Jan 22 08:03:33 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 09:03:33 -0500 Subject: [dba-VB] C# hot keys Message-ID: <4B59B035.5050806@colbyconsulting.com> In Visual Studio F6 and F5 were build and run. Suddenly F6 no longer does the build. Where do I go to troubleshoot this? -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Jan 22 10:33:53 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 22 Jan 2010 10:33:53 -0600 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Message-ID: Maybe you're looking at it from the wrong end. The .Net purpose is to give you control, but that doesn't mean you don't have to build your own tools. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, January 21, 2010 3:40 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] .Net Setup, launch application after installation Yes. I've used it before as well (also Wise and even WinZipSE). I'm trying to do this natively out of the VS2008 setup & deployment project. I can't believe there isn't anything natively built in to do so. On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust wrote: > We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? > > Charlotte Foust > From davidmcafee at gmail.com Fri Jan 22 11:52:54 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 09:52:54 -0800 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Message-ID: <8786a4c01001220952j668dae93rfd18d8a4a6f1456e@mail.gmail.com> I know, I just can't believe they didn't give that option in the MSI builder. I've followed this guys blog: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage It launches after install (if the checkbox remains checked) in all (XP32, Vista 64, Win 7 32/64) my supported OS's except Vista 32 bit. I think this guy had a similar proglem: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.platformsdk.msi&tid=1dbfd840-d667-47bc-bcd7-7fa4c615afb6&cat=&lang=&cr=&sloc=&p=1 My issue is that I don't know enough about Custom Actions or Jscript to modify the .JS file to alter the "no impersonation" bit setting. I can't believe such a trivial item is taking all of my time. David On Fri, Jan 22, 2010 at 8:33 AM, Charlotte Foust wrote: > Maybe you're looking at it from the wrong end. ?The .Net purpose is to give you control, but that doesn't mean you don't have to build your own tools. > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee > Sent: Thursday, January 21, 2010 3:40 PM > To: Discussion concerning Visual Basic and related programming issues. > Subject: Re: [dba-VB] .Net Setup, launch application after installation > > Yes. I've used it before as well (also Wise and even WinZipSE). > I'm trying to do this natively out of the VS2008 setup & deployment project. > I can't believe there isn't anything natively built in to do so. > > > On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust > wrote: >> We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? >> >> Charlotte Foust From davidmcafee at gmail.com Fri Jan 22 12:07:39 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 10:07:39 -0800 Subject: [dba-VB] C# hot keys In-Reply-To: <4B59B035.5050806@colbyconsulting.com> References: <4B59B035.5050806@colbyconsulting.com> Message-ID: <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> F5 still runs/debugs Ctrl+Shift+B to build On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: > In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go > to troubleshoot this? > > -- > John W. Colby From jwcolby at colbyconsulting.com Fri Jan 22 12:10:37 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 13:10:37 -0500 Subject: [dba-VB] C# automation of office Message-ID: <4B59EA1D.1080700@colbyconsulting.com> Does anyone have a good information source for automating office (specifically Excel) from C#? I have a spreadsheet which has code inside of it which pulls data out of SQL Server and dumps it into pages of the spreadsheet. I WAS using Access to do this but my Office 2007 install broke my forms (event properties no longer wire to the code behind form). Thus from C# I need to cause a spreadsheet to open, call a method of the code and pass a server / database string to it. Any help will be greatly appreciated. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Jan 22 12:25:20 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 13:25:20 -0500 Subject: [dba-VB] C# hot keys In-Reply-To: <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> Message-ID: <4B59ED90.30607@colbyconsulting.com> Are you saying that F6 no longer runs debug? What does F6 do instead? John W. Colby www.ColbyConsulting.com David McAfee wrote: > F5 still runs/debugs > > Ctrl+Shift+B to build > > On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >> In Visual Studio F6 and F5 were build and run. Suddenly F6 no longer does the build. Where do I go >> to troubleshoot this? >> >> -- >> John W. Colby > > _______________________________________________ > 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 Jan 22 12:32:33 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 10:32:33 -0800 Subject: [dba-VB] C# hot keys In-Reply-To: <4B59ED90.30607@colbyconsulting.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> <4B59ED90.30607@colbyconsulting.com> Message-ID: <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> Waste a keystroke? :P I don't know, I don't see it anywhere in the menus. On Fri, Jan 22, 2010 at 10:25 AM, jwcolby wrote: > Are you saying that F6 no longer runs debug? ?What does F6 do instead? > > John W. Colby > www.ColbyConsulting.com > > > David McAfee wrote: >> F5 still runs/debugs >> >> Ctrl+Shift+B to build >> >> On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >>> In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go >>> to troubleshoot this? >>> >>> -- >>> John W. Colby >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Fri Jan 22 15:53:59 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 16:53:59 -0500 Subject: [dba-VB] Visual Studio grinds to a halt Message-ID: <4B5A1E77.5060206@colbyconsulting.com> I am running an Access / Excel automation on my dev laptop. It is doing a set of long running queries to populate a spreadsheet with sets of counts, running VBA, accessing the SQL Server on another machine over my network etc. I am also running Visual Studio trying to get some work done. Suddenly VS halts and throws up a "waiting for Excel" message. No idea at what level. The entire system is not hung, i.e. I can use other open apps, just not Access / Excel and ... Visual Studio. 8( -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Jan 22 16:00:37 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 22 Jan 2010 16:00:37 -0600 Subject: [dba-VB] C# hot keys In-Reply-To: <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> <4B59ED90.30607@colbyconsulting.com> <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> Message-ID: You can change that by going to Tools -> Options -> Import and Export and reset your settings. It's nuts but it allows you to select the VB defaults again. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Friday, January 22, 2010 10:33 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] C# hot keys Waste a keystroke? :P I don't know, I don't see it anywhere in the menus. On Fri, Jan 22, 2010 at 10:25 AM, jwcolby wrote: > Are you saying that F6 no longer runs debug? ?What does F6 do instead? > > John W. Colby > www.ColbyConsulting.com > > > David McAfee wrote: >> F5 still runs/debugs >> >> Ctrl+Shift+B to build >> >> On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >>> In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go >>> to troubleshoot this? >>> >>> -- >>> John W. Colby >> From jwcolby at colbyconsulting.com Mon Jan 25 10:50:02 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 11:50:02 -0500 Subject: [dba-VB] C#: Raising events Message-ID: <4B5DCBBA.5070108@colbyconsulting.com> Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Jan 25 11:02:19 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 25 Jan 2010 11:02:19 -0600 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DCBBA.5070108@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 25, 2010 8:50 AM To: VBA Subject: [dba-VB] C#: Raising events Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- 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 Mon Jan 25 11:33:18 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 12:33:18 -0500 Subject: [dba-VB] C#: Raising events In-Reply-To: References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: <4B5DD5DE.7090704@colbyconsulting.com> Charlotte, > I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? LOL. Me too! And no, that is what I do not know how to do. clsAccuzipImportFrom raises an event evStoredProc in many different methods of clsAccuzipImportFrom. The intention is to pass the stored procedure object that it uses up to frmAccuzipImport. clsAccuzipImportFrom is dimensioned in frmAccuzipImport: clsAccuzipImportFrom clsAZImp; frmAccuzipImport need to sink evStoredProc raised in clsAZImp. John W. Colby www.ColbyConsulting.com Charlotte Foust wrote: > I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, January 25, 2010 8:50 AM > To: VBA > Subject: [dba-VB] C#: Raising events > > Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably > are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. > > What I want to do is execute stored procedures, and publish status information about each SP > executed on my form starts a process running. > > I have a class which encapsulates my stored procedure stuff for creating the command object, > capturing the parameters and eventually executing the stored procedure. > > I assume that this object might raise an event when the stored procedure returns i.e. > sCmd.ExecuteNonQuery() returns control to C# ? > > OTOH, I have other classes which USE the SP class. These are the classes that actually call > specific stored procedures, pass parameters, and control the program flow depending on whether the > called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which > passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure > and want to display on the form the name of the sp and whether it completed satisfactorily, how long > it took and so forth. > > I am going to go with the classes which execute sequences of SPs being the class that raises the > event. I am looking at this as an example: > > http://www.codeproject.com/KB/cs/csevents01.aspx > > clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. > > clsAZExport uses a sequence of stored procedures to perform an export process. > > So... I create an event delegate definition which defines the event I will raise. Where do I place > this? For the moment I have placed it inside of the container where clsStoredProc is defined. > > I now have to create evargStoredProcedure - a public class for the argument that this event will > pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where > is this class created? Do I just define a new class at the project level for this event argument. > It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so > placing it in the code container for that class seems appropriate. For the moment I have placed it > inside of the container where clsStoredProc is defined. > > > Now, in every method of clsAZExport I add two lines: > > evargStoredProcedure svargSP = new evargStoredProcedure(sp); > evStoredProc(this, svargSP); > > This apparently creates the arguments object and then raises the event. > > Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. > > So... back in the form which uses clsAZExport to export data from SQL Server... > > At this point their example breaks down entirely. I am not writing to the debug window, I am trying > to write to a control on a form. While the debug window can be written to from anywhere, a control > on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. > > And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared > in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I > did all this I would click on any object that raises an event and I would see a list of their > events, but I do not, or I do not know how to see them. As an example if I have a text box, it has > events. If I click on that I can see its events, select one and voila, a place to say what to do. > How do I do that for an event raised by my class dimensioned and used in my form? > > If anyone is following this and knows what I am trying to do and what to do next, please speak up. > From shamil at smsconsulting.spb.ru Mon Jan 25 11:34:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Mon, 25 Jan 2010 20:34:09 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DCBBA.5070108@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> Hi John -- Here is one of myriads possible solutions how to handle events in caller classes - for form's(/their controls') code behind it will be similar with an exception that you might have to use .Invoke while processing events in event sinks as the latter could run in a different thread than your form's main thread: using System; namespace ConsoleApplication { public class SpRunner { public class SpRunnerStatusReportEventArgs:EventArgs { public int CurrentCount {get; set;} public int MaxCount {get;set; } } public EventHandler StatusReport; public void Run() { const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { if (StatusReport != null) { SpRunnerStatusReportEventArgs e = new SpRunnerStatusReportEventArgs(); e.CurrentCount = i; e.MaxCount = MAX_COUNT; StatusReport(this, e); } } } } class Program { static void Main(string[] args) { SpRunner runner = new SpRunner(); runner.StatusReport += new EventHandler(statusReport); runner.Run(); } private static void statusReport(object sender, SpRunner.SpRunnerStatusReportEventArgs e) { System.Console.WriteLine("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); } } } Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 25, 2010 7:50 PM To: VBA Subject: [dba-VB] C#: Raising events Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Jan 25 12:32:21 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 13:32:21 -0500 Subject: [dba-VB] C#: Raising events In-Reply-To: <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> Message-ID: <4B5DE3B5.1050708@colbyconsulting.com> Shamil, Unfortunately you are doing the same thing every other example is doing, writing the data to the console. I need to write to a control on a form. What I can apparently see from this is that the delegate and the event args need to be in the class that raises the event? These exact same things (delegate and event args class) will be used over and over again in other classes / forms so I was TRYING to place them down in the class that actually implements my stored procedure class. IOW I have a completely separate project that implements the stored procedure class. In that I placed the eventargument class as well as the delegate. these three things will be used in many many different classes / forms. Everything needs to run stored procedures and I was TRYING to "encapsulate" the delegate as well as the eventargs class in the same container as the stored procedure class. What I am seeing you do is to encapsulate the eventargs class and the delegate in the object that raises the event? John W. Colby www.ColbyConsulting.com Shamil Salakhetdinov wrote: > Hi John -- > > Here is one of myriads possible solutions how to handle events in caller > classes - for form's(/their controls') code behind it will be similar with > an exception that you might have to use .Invoke while processing events in > event sinks as the latter could run in a different thread than your form's > main thread: > > using System; > > namespace ConsoleApplication > { > > public class SpRunner > { > public class SpRunnerStatusReportEventArgs:EventArgs > { > public int CurrentCount {get; set;} > public int MaxCount {get;set; } > } > > public EventHandler StatusReport; > public void Run() > { > const int MAX_COUNT = 5; > for (int i = 1; i <= MAX_COUNT; i++) > { > if (StatusReport != null) > { > SpRunnerStatusReportEventArgs e = new > SpRunnerStatusReportEventArgs(); > e.CurrentCount = i; > e.MaxCount = MAX_COUNT; > StatusReport(this, e); > } > } > } > } > > class Program > { > static void Main(string[] args) > { > SpRunner runner = new SpRunner(); > runner.StatusReport += > new > EventHandler(statusReport); > runner.Run(); > } > > private static void statusReport(object sender, > SpRunner.SpRunnerStatusReportEventArgs e) > { > System.Console.WriteLine("{0}: Processing {1} of {2}...", > sender.GetType(), e.CurrentCount, e.MaxCount); > } > } > } > > Thank you. > > -- > Shamil From Gustav at cactus.dk Mon Jan 25 13:38:38 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 25 Jan 2010 20:38:38 +0100 Subject: [dba-VB] C#: Raising events Message-ID: Hi John I lost you too somewhere down the line ... However, here's an example where a manual update at one form (Main) raises an event which requeries another form (Employees). Perhaps that can guide you a little. It writes to the console too but for debugging only. Some code has been snipped. Note the custom attributes. using System; using System.IO; using System.Windows.Forms; namespace DLMail { public partial class FormMain : Form { public DataSetDL DlDataSet = new DataSetDL(); public FormEmployer EmployerForm; public FormEmployee EmployeeForm; public FormPaySlip PaySlipForm; public FormSystem SystemForm; private string _dropFolder = @"Drop"; private string _dropPath; private string _execPath; private string _dataPath; private string _dataFileName = @"DLMail.xml"; private string _dataBaseFile; private int _employerId = -1; private string _employerName = String.Empty; private string _pdfPassword = String.Empty; public string ExecPath { get { return _execPath; } } public string DataPath { get { return _dataPath; } } public string DataBaseFile { get { return _dataBaseFile; } } /// /// The path to the folder where to copy new pay slip PDF files. /// public string DropPath { get { return _dropPath; } } public int EmployerId { get { return _employerId; } } public string EmployerName { get { return _employerName; } } public string PdfPassword { get { return _pdfPassword; } } // Delegate declaration. public delegate void ChangingHandler(object sender, EmployerArgs employerArgs); // Event declaration. public event ChangingHandler EmployerChanged; public void ChangeEmployer() { // Call the event. EmployerArgs employerArgs = new EmployerArgs(_employerId, _employerName, _pdfPassword, _dataPath); // Running on Windows Vista, first time run of EmployerChanged // raises a null reference error. try { EmployerChanged(this, employerArgs); } catch (Exception exception) { Console.WriteLine(exception.Source); } } public FormMain() { InitializeComponent(); InitializeDataSet(); InitializeFolders(); } private void FormMain_Load(object sender, EventArgs e) { FillEmployerComboBox(); this.EmployerChanged += new ChangingHandler(FormMain_EmployerChanged); } private void InitializeDataSet() { _execPath = Path.GetDirectoryName(Application.ExecutablePath); _dataBaseFile = Path.Combine(_execPath, _dataFileName); if (!File.Exists(_dataBaseFile)) { //snip } else { DlDataSet.ReadXml(_dataBaseFile); DataSetDL .DataTablePaySlipTypeDataTable paySlipTypeDataTable = DlDataSet .DataTablePaySlipType ; } } private void InitializeFolders() { string dropPath = Path.Combine(_execPath, _dropFolder); //snip _dropPath = dropPath; } private void FillEmployerComboBox() { int selectedIndex = -1; if (EmployerComboBox.SelectedIndex > -1) { selectedIndex = EmployerComboBox.SelectedIndex; } DataSetDL.DataTableEmployerDataTable dataTableEmployer = DlDataSet.DataTableEmployer; EmployerComboBox.SelectedItem = "Id"; EmployerComboBox.DisplayMember = "Organisation"; EmployerComboBox.DataSource = dataTableEmployer; if (selectedIndex != -1) { EmployerComboBox.SelectedIndex = selectedIndex; } } private void EmployerComboBox_SelectedIndexChanged(object sender, EventArgs e) { ComboBox comboBox = (ComboBox)sender; if (comboBox.SelectedItem != null) { int employerId = Convert.ToInt32(comboBox.SelectedValue); if (!employerId.Equals(_employerId)) { _employerId = employerId; _employerName = comboBox.Text; SetDataPath(); // Raise event. this.ChangeEmployer(); } } } void FormMain_EmployerChanged(object sender, EmployerArgs employerArgs) { Console.WriteLine("Change: " + employerArgs.EmployerId().ToString()); } private void SetDataPath() { DataSetDL.DataTableEmployerRow employerRow = DlDataSet.DataTableEmployer.FindById(_employerId); if (employerRow.IsPdfPasswordNull()) { _pdfPassword = string.Empty; } else { _pdfPassword = employerRow.PdfPassword.Trim(); } _dataPath = Path.Combine(_execPath, employerRow.DataPath); } private void EmployeeButton_Click(object sender, EventArgs e) { if (EmployeeForm == null) { EmployeeForm = new FormEmployee(); EmployeeForm.Show(); EmployeeForm.FormClosed += new FormClosedEventHandler(EmployeeForm_FormClosed); } else { EmployeeForm.Focus(); } } private void EmployeeForm_FormClosed(object sender, FormClosedEventArgs e) { EmployeeForm = null; SaveData(); } private void SaveData() { this.DlDataSet.WriteXml(_dataBaseFile); } } // Custom attributes. public class EmployerArgs : System.EventArgs { private int employerId = 0; private string employerName = String.Empty; private string pdfPassword = String.Empty; private string dataPath = String.Empty; public EmployerArgs(int id, string name, string password, string path) { this.employerId = id; this.employerName = name; this.pdfPassword = password; this.dataPath = path; } public int EmployerId() { return employerId; } public string EmployerName() { return employerName; } public string PdfPassword() { return pdfPassword; } public string DataPath() { return dataPath; } } } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace DLMail { public partial class FormEmployee : Form { private string _dataBaseFile; private int _employerId; public FormEmployee() { InitializeComponent(); InitializeDataSet(); } private void InitializeDataSet() { FormMain formMain = (FormMain)Application.OpenForms[0]; _dataBaseFile = formMain.DataBaseFile; _employerId = formMain.EmployerId; this.dataSetDL = formMain.DlDataSet; ChangeEmployer(); formMain.EmployerChanged += new FormMain.ChangingHandler(formMain_EmployerChanged); } void formMain_EmployerChanged(object sender, EmployerArgs formArgs) { _employerId = formArgs.EmployerId(); ChangeEmployer(); } private void ChangeEmployer() { string filter = String.Empty; // Select only employees of the selected employer. filter = "EmployerId = " + _employerId.ToString(); this.dataTableEmployeeBindingSource.Filter = filter; this.dataTableEmployeeBindingSource.DataSource = this.dataSetDL; } } } /gustav >>> jwcolby at colbyconsulting.com 25-01-2010 17:50:02 >>> Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. From shamil at smsconsulting.spb.ru Mon Jan 25 23:53:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 08:53:09 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7 Ultimate 64 bit Message-ID: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil From shamil at smsconsulting.spb.ru Tue Jan 26 00:20:46 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 09:20:46 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <002601ca9e4f$b3f6a050$1be3e0f0$@spb.ru> John -- As I noted my sample code was one of myriads possible variants - below it yet another one - just a sample. As for setting form controls' properties you have to use .InvokeRequired and .Invoke to check calling context and to properly set controls' properties - you can google/bing for such samples of wait here for some to appear in this or related threads. Thank you. -- Shamil P.S. using System; // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount ; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } // front-end namespace ConsoleApplication { class Program { static void Main(string[] args) { My.BusinessLayerClassLib.SpRunnerManager runner = new My.BusinessLayerClassLib.SpRunnerManager(); runner.StatusReport += new EventHandler(statusReport); runner.Run(); } private static void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { System.Console.WriteLine("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); } } } __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From bill_patten at embarqmail.com Tue Jan 26 01:03:53 2010 From: bill_patten at embarqmail.com (Bill Patten) Date: Mon, 25 Jan 2010 23:03:53 -0800 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002101ca9e4b$d80b3770$8821a650$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? 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 Tue Jan 26 01:31:34 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 10:31:34 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: <002701ca9e59$97cd42d0$c767c870$@spb.ru> Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 02:20:36 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 11:20:36 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Hi Bill -- I have posted my sample test executable here: http://sms-web.biz/jet/64BIT.zip BTW, AFAIU the following trick should help to run this sample app on 64bit system: http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? 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 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 03:14:14 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 12:14:14 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <002e01ca9e67$ef1aede0$cd50c9a0$@spb.ru> HI All -- Here is some information I collected related to the subject of this thread: Running .NET Apps in 32-bit mode on 64-bit Windows http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx 64 Bit Windows, IIS, and Microsoft Access (part 1 of 2) http://www.insideria.com/2009/09/64-bit-windows-iis-and-microso.html http://www.insideria.com/2009/09/64-bit-windows-iis-and-microso-1.html Microsoft Data Access Components (MDAC) 2.8 http://www.microsoft.com/downloads/details.aspx?familyid=6C050FE3-C795-4B7D- B037-185D0506396C&displaylang=en How to obtain the latest (SP8) service pack for the Microsoft Jet 4.0 Database Engine http://support.microsoft.com/kb/239114/en Microsoft Jet Database Engine http://en.wikipedia.org/wiki/Microsoft_Jet_Database_Engine Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, January 26, 2010 11:21 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Bill -- I have posted my sample test executable here: http://sms-web.biz/jet/64BIT.zip BTW, AFAIU the following trick should help to run this sample app on 64bit system: http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill <<< snip >>> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Tue Jan 26 06:16:00 2010 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 26 Jan 2010 12:16:00 +0000 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > From shamil at smsconsulting.spb.ru Tue Jan 26 08:10:39 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 17:10:39 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <003c01ca9e91$582840c0$0878c240$@spb.ru> Thank you, Mark, But did you have MS Jet 4.0 SP8 (and MDAC 2.8) installed on your system before you run my sample app? This PC costs here currently approx. 1000 euro or even more. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Tuesday, January 26, 2010 3:16 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > _______________________________________________ From shamil at smsconsulting.spb.ru Tue Jan 26 08:51:18 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 17:51:18 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <004301ca9e97$07026c10$15074430$@spb.ru> Hi Mark and all, I have posted another test here: http://sms-web.biz/jet/AnotherTest.zip It has Jet db communication within class library: - JetDbTest.ConsoleApp.exe - FE - JetDbTest.ClassLibrary.dll - classlib and it also has two versions of executables" - 1st - compiled for any CPU; - 2nd - compiled for x86 CPU - 32 bit Could you please test how that will work? Current hypothesis/expectation here are that: - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Tuesday, January 26, 2010 3:16 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From bill_patten at embarqmail.com Tue Jan 26 12:51:32 2010 From: bill_patten at embarqmail.com (Bill Patten) Date: Tue, 26 Jan 2010 10:51:32 -0800 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit In-Reply-To: <002701ca9e59$97cd42d0$c767c870$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002701ca9e59$97cd42d0$c767c870$@spb.ru> Message-ID: <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> Hi Shamil, I knew that when I offered to help I could get in over my head, I did. I did my best, but was not able to make the corFlag work, I'm sure it was me not the corflag. I saw that Mark was able to send you good information so hopefully that is what you needed. The x86 did work. I can send you the various log files if that will help you. As near as I can tell the computer parts comes out to about 1300 US. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 11:31 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows7Ultimate64 bit Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru _______________________________________________ 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 Tue Jan 26 10:00:33 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 19:00:33 +0300 Subject: [dba-VB] C#: Raising events (Part 2) In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004b01ca9ea0$b23193f0$1694bbd0$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke (Part 2) - you can put code from Part 1 and Part 1 into one code file replacing Program.cs in Console app, set references to System.Windows.Forms and System.Drawing and run it: // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } __________ Information from ESET NOD32 Antivirus, version of virus signature database 4807 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 09:59:29 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 18:59:29 +0300 Subject: [dba-VB] C#: Raising events (Part 1) In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004a01ca9ea0$8c5b2560$a5117020$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke (Part 1): using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsFormsApp { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new TestForm()); } } // TestForm Designer partial class TestForm { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.cmdTest = new System.Windows.Forms.Button(); this.txtTest = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // cmdTest // this.cmdTest.Location = new System.Drawing.Point(128, 205); this.cmdTest.Name = "cmdTest"; this.cmdTest.Size = new System.Drawing.Size(75, 23); this.cmdTest.TabIndex = 0; this.cmdTest.Text = "&Test"; this.cmdTest.UseVisualStyleBackColor = true; this.cmdTest.Click += new System.EventHandler(this.cmdTest_Click); // // txtTest // this.txtTest.Location = new System.Drawing.Point(12, 13); this.txtTest.Multiline = true; this.txtTest.Name = "txtTest"; this.txtTest.Size = new System.Drawing.Size(311, 175); this.txtTest.TabIndex = 1; // // TestForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(335, 240); this.Controls.Add(this.txtTest); this.Controls.Add(this.cmdTest); this.Name = "TestForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Test Form"; this.Load += new System.EventHandler(this.TestForm_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button cmdTest; private System.Windows.Forms.TextBox txtTest; } // TestForm Code Behind public partial class TestForm : Form { public TestForm() { InitializeComponent(); } private My.BusinessLayerClassLib.SpRunnerManager _runner; private void TestForm_Load(object sender, EventArgs e) { _runner = new My.BusinessLayerClassLib.SpRunnerManager(); _runner.StatusReport += new EventHandler(statusReport); } private void cmdTest_Click(object sender, EventArgs e) { txtTest.Text = null; _runner.Run(); } private void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { string message = string.Format("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); if (txtTest.InvokeRequired) { object[] args = { message }; this.Invoke(new logDelegate(log), args); } else log(message); } private delegate void logDelegate(string message); private void log(string message) { txtTest.Text = message + System.Environment.NewLine + txtTest.Text; } } } ...Continued in part 2.... From shamil at smsconsulting.spb.ru Tue Jan 26 09:16:55 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 18:16:55 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004901ca9e9a$99fbf920$cdf3eb60$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke: using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsFormsApp { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new TestForm()); } } // TestForm Designer partial class TestForm { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.cmdTest = new System.Windows.Forms.Button(); this.txtTest = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // cmdTest // this.cmdTest.Location = new System.Drawing.Point(128, 205); this.cmdTest.Name = "cmdTest"; this.cmdTest.Size = new System.Drawing.Size(75, 23); this.cmdTest.TabIndex = 0; this.cmdTest.Text = "&Test"; this.cmdTest.UseVisualStyleBackColor = true; this.cmdTest.Click += new System.EventHandler(this.cmdTest_Click); // // txtTest // this.txtTest.Location = new System.Drawing.Point(12, 13); this.txtTest.Multiline = true; this.txtTest.Name = "txtTest"; this.txtTest.Size = new System.Drawing.Size(311, 175); this.txtTest.TabIndex = 1; // // TestForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(335, 240); this.Controls.Add(this.txtTest); this.Controls.Add(this.cmdTest); this.Name = "TestForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Test Form"; this.Load += new System.EventHandler(this.TestForm_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button cmdTest; private System.Windows.Forms.TextBox txtTest; } // TestForm Code Behind public partial class TestForm : Form { public TestForm() { InitializeComponent(); } private My.BusinessLayerClassLib.SpRunnerManager _runner; private void TestForm_Load(object sender, EventArgs e) { _runner = new My.BusinessLayerClassLib.SpRunnerManager(); _runner.StatusReport += new EventHandler(statusReport); } private void cmdTest_Click(object sender, EventArgs e) { txtTest.Text = null; _runner.Run(); } private void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { string message = string.Format("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); if (txtTest.InvokeRequired) { object[] args = { message }; this.Invoke(new logDelegate(log), args); } else log(message); } private delegate void logDelegate(string message); private void log(string message) { txtTest.Text = message + System.Environment.NewLine + txtTest.Text; } } } // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } From marklbreen at gmail.com Tue Jan 26 16:54:00 2010 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 26 Jan 2010 22:54:00 +0000 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> Message-ID: Sorry for delay, it was held up due to size of message, I have truncated it here. Mark ---------- Forwarded message ---------- From: Mark Breen Date: 2010/1/26 Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit To: "Discussion concerning Visual Basic and related programming issues." < dba-vb at databaseadvisors.com> Hello Shamil, see below for results of tests, I only need to run it against, JetDbTest.ConsoleApp.exe I did not run against dll file 32 bit file worked well without corflag, - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. thanks Mark ======================= Here is result of x86 with no corflags ran ======================= LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:07:47 - Select test started. LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:07:47 - Select test finished. LOG: 26/01/2010 16:07:47 - Insert test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Insert test finished. LOG: 26/01/2010 16:07:47 - Update test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Update test finished. LOG: 26/01/2010 16:07:47 - Delete test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Delete test finished. LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ======================= Here is msg after running corflags ======================= C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\Cor Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\AnotherTest\AnyCPU>pause Press any key to continue . . . ======================= Here is good result for AnyCPU after running coreflags ======================= LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:10:50 - Select test started. LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:10:50 - Select test finished. LOG: 26/01/2010 16:10:50 - Insert test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Insert test finished. LOG: 26/01/2010 16:10:50 - Update test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Update test finished. LOG: 26/01/2010 16:10:50 - Delete test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Delete test finished. LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... From shamil at smsconsulting.spb.ru Wed Jan 27 00:25:55 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 09:25:55 +0300 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> Message-ID: <009401ca9f19$97189590$c549c0b0$@spb.ru> Hi Mark -- Thank you for your testing. Here is the final test set with sources - it would take a couple of minutes to download, unzip and run: http://sms-web.biz/jet/FinalTest.zip It has - 1) AnyCPU - AnyCPU build as it's made by VS2008; - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using CorFlags.exe; - 4) x86 - x86 32bit build. It's expected (after your two rounds of tests) that now (1) will fail, and (2),(3) and (4) will run OK. BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system after setup, or was that installed with MS Windows SDK you have there? Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Wednesday, January 27, 2010 1:54 AM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Sorry for delay, it was held up due to size of message, I have truncated it here. Mark ---------- Forwarded message ---------- From: Mark Breen Date: 2010/1/26 Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit To: "Discussion concerning Visual Basic and related programming issues." < dba-vb at databaseadvisors.com> Hello Shamil, see below for results of tests, I only need to run it against, JetDbTest.ConsoleApp.exe I did not run against dll file 32 bit file worked well without corflag, - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. thanks Mark ======================= Here is result of x86 with no corflags ran ======================= LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:07:47 - Select test started. LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:07:47 - Select test finished. LOG: 26/01/2010 16:07:47 - Insert test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Insert test finished. LOG: 26/01/2010 16:07:47 - Update test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Update test finished. LOG: 26/01/2010 16:07:47 - Delete test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Delete test finished. LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ======================= Here is msg after running corflags ======================= C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\Cor Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\AnotherTest\AnyCPU>pause Press any key to continue . . . ======================= Here is good result for AnyCPU after running coreflags ======================= LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:10:50 - Select test started. LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:10:50 - Select test finished. LOG: 26/01/2010 16:10:50 - Insert test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Insert test finished. LOG: 26/01/2010 16:10:50 - Update test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Update test finished. LOG: 26/01/2010 16:10:50 - Delete test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Delete test finished. LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... _______________________________________________ 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 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Wed Jan 27 00:58:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 09:58:09 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit In-Reply-To: <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002701ca9e59$97cd42d0$c767c870$@spb.ru> <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> Message-ID: <009a01ca9f1e$16fa5420$44eefc60$@spb.ru> Thank you for your help, Bill. Yes, Mark's tests did answer my questions. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 9:52 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit Hi Shamil, I knew that when I offered to help I could get in over my head, I did. I did my best, but was not able to make the corFlag work, I'm sure it was me not the corflag. I saw that Mark was able to send you good information so hopefully that is what you needed. The x86 did work. I can send you the various log files if that will help you. As near as I can tell the computer parts comes out to about 1300 US. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 11:31 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows7Ultimate64 bit Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Wed Jan 27 06:23:02 2010 From: marklbreen at gmail.com (Mark Breen) Date: Wed, 27 Jan 2010 12:23:02 +0000 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <009401ca9f19$97189590$c549c0b0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> <009401ca9f19$97189590$c549c0b0$@spb.ru> Message-ID: Hello Shamil, All assumptions below are correct. Additionally, when I ran the same routines on any CPU, it worked again, as expected. Not sure what is meant by the following, or how to check? >BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system >after setup, or was that installed with MS Windows SDK you have there? Office 07 is on this box now, but it was on before I started. Do you want me to check something further? thanks Mark 2010/1/27 Shamil Salakhetdinov > Hi Mark -- > > Thank you for your testing. > > Here is the final test set with sources - it would take a couple of minutes > to download, unzip and run: > > http://sms-web.biz/jet/FinalTest.zip > > It has > > - 1) AnyCPU - AnyCPU build as it's made by VS2008; > - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; > - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using > CorFlags.exe; > - 4) x86 - x86 32bit build. > > It's expected (after your two rounds of tests) that now (1) will fail, and > (2),(3) and (4) will run OK. > > BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system > after setup, or was that installed with MS Windows SDK you have there? > > Thank you. > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Wednesday, January 27, 2010 1:54 AM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on > Windows 7Ultimate 64 bit > > Sorry for delay, > > it was held up due to size of message, I have truncated it here. > > Mark > > ---------- Forwarded message ---------- > From: Mark Breen > Date: 2010/1/26 > Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on > Windows > 7Ultimate 64 bit > To: "Discussion concerning Visual Basic and related programming issues." < > dba-vb at databaseadvisors.com> > > > Hello Shamil, > > see below for results of tests, > > I only need to run it against, JetDbTest.ConsoleApp.exe I did not run > against dll file > > 32 bit file worked well without corflag, > > - first one (any CPU) will need to use CorFlags.EXE run against at least > JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and > JetDbTest.ClassLibrary.dll; > > - and second one should run OK "out-of-the-box" on your system as it was > compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 > OLE DB 32bit Drivers already installed. > > > thanks > > Mark > > > > ======================= > Here is result of x86 with no corflags ran > ======================= > > > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:07:47 - Select test started. > LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:07:47 - Select test finished. > LOG: 26/01/2010 16:07:47 - Insert test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Insert test finished. > LOG: 26/01/2010 16:07:47 - Update test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Update test finished. > LOG: 26/01/2010 16:07:47 - Delete test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Delete test finished. > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > > ======================= > Here is msg after running corflags > ======================= > > > C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft > SDKs\Windows\v6.0A\Bin\x64\Cor > Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ > Microsoft (R) .NET Framework CorFlags Conversion Tool. Version > 3.5.21022.8 > Copyright (c) Microsoft Corporation. All rights reserved. > > > C:\AnotherTest\AnyCPU>pause > Press any key to continue . . . > > > ======================= > Here is good result for AnyCPU after running coreflags > ======================= > > > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:10:50 - Select test started. > LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:10:50 - Select test finished. > LOG: 26/01/2010 16:10:50 - Insert test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Insert test finished. > LOG: 26/01/2010 16:10:50 - Update test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Update test finished. > LOG: 26/01/2010 16:10:50 - Delete test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Delete test finished. > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > _______________________________________________ > 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 4808 (20100126) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.esetnod32.ru > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature > database 4808 (20100126) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.esetnod32.ru > > > _______________________________________________ > 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 Jan 27 08:37:30 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 17:37:30 +0300 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> <009401ca9f19$97189590$c549c0b0$@spb.ru> Message-ID: <00ee01ca9f5e$429602b0$c7c20810$@spb.ru> Hello Mark -- Thank you. No, no need to check anything else further. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Wednesday, January 27, 2010 3:23 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hello Shamil, All assumptions below are correct. Additionally, when I ran the same routines on any CPU, it worked again, as expected. Not sure what is meant by the following, or how to check? >BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system >after setup, or was that installed with MS Windows SDK you have there? Office 07 is on this box now, but it was on before I started. Do you want me to check something further? thanks Mark 2010/1/27 Shamil Salakhetdinov > Hi Mark -- > > Thank you for your testing. > > Here is the final test set with sources - it would take a couple of minutes > to download, unzip and run: > > http://sms-web.biz/jet/FinalTest.zip > > It has > > - 1) AnyCPU - AnyCPU build as it's made by VS2008; > - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; > - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using > CorFlags.exe; > - 4) x86 - x86 32bit build. > > It's expected (after your two rounds of tests) that now (1) will fail, and > (2),(3) and (4) will run OK. > > BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system > after setup, or was that installed with MS Windows SDK you have there? > > Thank you. > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Wednesday, January 27, 2010 1:54 AM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on > Windows 7Ultimate 64 bit > > Sorry for delay, > > it was held up due to size of message, I have truncated it here. > > Mark > > ---------- Forwarded message ---------- > From: Mark Breen > Date: 2010/1/26 > Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on > Windows > 7Ultimate 64 bit > To: "Discussion concerning Visual Basic and related programming issues." < > dba-vb at databaseadvisors.com> > > > Hello Shamil, > > see below for results of tests, > > I only need to run it against, JetDbTest.ConsoleApp.exe I did not run > against dll file > > 32 bit file worked well without corflag, > > - first one (any CPU) will need to use CorFlags.EXE run against at least > JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and > JetDbTest.ClassLibrary.dll; > > - and second one should run OK "out-of-the-box" on your system as it was > compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 > OLE DB 32bit Drivers already installed. > > > thanks > > Mark > > > > ======================= > Here is result of x86 with no corflags ran > ======================= > > > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:07:47 - Select test started. > LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:07:47 - Select test finished. > LOG: 26/01/2010 16:07:47 - Insert test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Insert test finished. > LOG: 26/01/2010 16:07:47 - Update test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Update test finished. > LOG: 26/01/2010 16:07:47 - Delete test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Delete test finished. > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > > ======================= > Here is msg after running corflags > ======================= > > > C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft > SDKs\Windows\v6.0A\Bin\x64\Cor > Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ > Microsoft (R) .NET Framework CorFlags Conversion Tool. Version > 3.5.21022.8 > Copyright (c) Microsoft Corporation. All rights reserved. > > > C:\AnotherTest\AnyCPU>pause > Press any key to continue . . . > > > ======================= > Here is good result for AnyCPU after running coreflags > ======================= > > > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:10:50 - Select test started. > LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:10:50 - Select test finished. > LOG: 26/01/2010 16:10:50 - Insert test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Insert test finished. > LOG: 26/01/2010 16:10:50 - Update test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Update test finished. > LOG: 26/01/2010 16:10:50 - Delete test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Delete test finished. > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > _______________________________________________ > 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 4810 (20100127) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Thu Jan 28 04:09:57 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 28 Jan 2010 13:09:57 +0300 Subject: [dba-VB] FYI: The mind just simply can't comprehend Message-ID: <016f01caa002$0caddca0$260995e0$@spb.ru> Hi All, Just wanted to share one interesting weblog entry and my opinion/experience on it - the subject line is taken from the following Sara Ford's weblog entry: "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m anage-an-agile-team-after-6-years-of-waterfall.aspx "The mind just simply can't comprehend" - this is what happens with every(?) experienced developer's mind used to develop and debug their software via long running (heavy) debug sessions as well as with "waterfallish" PMs - the mind of experienced in "doing it other way" developers and managers just can't comprehend how Test Driven Development can results in robust "bullet proof" software usually developed with a lot less pressure and stress - and (sic!) with higher quality, adaptability to the future changes, agility. That's a long way to get one's mind starting to really comprehend what happens when you take that route - the sooner you'll start following it - the better for your business. Thank you. -- Shamil From max.wanadoo at gmail.com Thu Jan 28 04:30:45 2010 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 28 Jan 2010 10:30:45 +0000 Subject: [dba-VB] FYI: The mind just simply can't comprehend In-Reply-To: <016f01caa002$0caddca0$260995e0$@spb.ru> References: <016f01caa002$0caddca0$260995e0$@spb.ru> Message-ID: Shamil, to write lenghty blogs like that simply tells me that she has too much time on her hands. that could all be precised down to a paragraph. max On 28/01/2010, Shamil Salakhetdinov wrote: > Hi All, > > > > Just wanted to share one interesting weblog entry and my opinion/experience > on it - the subject line is taken from the following Sara Ford's weblog > entry: > > > > "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" > > http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m > anage-an-agile-team-after-6-years-of-waterfall.aspx > > > > "The mind just simply can't comprehend" - this is what happens with every(?) > experienced developer's mind used to develop and debug their software via > long running (heavy) debug sessions as well as with "waterfallish" PMs - the > mind of experienced in "doing it other way" developers and managers just > can't comprehend how Test Driven Development can results in robust "bullet > proof" software usually developed with a lot less pressure and stress - and > (sic!) with higher quality, adaptability to the future changes, agility. > > > > That's a long way to get one's mind starting to really comprehend what > happens when you take that route - the sooner you'll start following it - > the better for your business. > > > > 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 Thu Jan 28 04:45:22 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 28 Jan 2010 13:45:22 +0300 Subject: [dba-VB] FYI: The mind just simply can't comprehend In-Reply-To: References: <016f01caa002$0caddca0$260995e0$@spb.ru> Message-ID: <017401caa006$ff2f7a70$fd8e6f50$@spb.ru> Max, She probably writes that blog in her spare time "just for fun" as we do post here? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Thursday, January 28, 2010 1:31 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] FYI: The mind just simply can't comprehend Shamil, to write lenghty blogs like that simply tells me that she has too much time on her hands. that could all be precised down to a paragraph. max On 28/01/2010, Shamil Salakhetdinov wrote: > Hi All, > > > > Just wanted to share one interesting weblog entry and my opinion/experience > on it - the subject line is taken from the following Sara Ford's weblog > entry: > > > > "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" > > http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m > anage-an-agile-team-after-6-years-of-waterfall.aspx > > > > "The mind just simply can't comprehend" - this is what happens with every(?) > experienced developer's mind used to develop and debug their software via > long running (heavy) debug sessions as well as with "waterfallish" PMs - the > mind of experienced in "doing it other way" developers and managers just > can't comprehend how Test Driven Development can results in robust "bullet > proof" software usually developed with a lot less pressure and stress - and > (sic!) with higher quality, adaptability to the future changes, agility. > > > > That's a long way to get one's mind starting to really comprehend what > happens when you take that route - the sooner you'll start following it - > the better for your business. > > > > Thank you. > > > > -- > > Shamil > > > __________ Information from ESET NOD32 Antivirus, version of virus signature database 4813 (20100128) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Sat Jan 30 06:20:08 2010 From: marklbreen at gmail.com (Mark Breen) Date: Sat, 30 Jan 2010 12:20:08 +0000 Subject: [dba-VB] [AccessD] C# automation of office In-Reply-To: <4B59EA1D.1080700@colbyconsulting.com> References: <4B59EA1D.1080700@colbyconsulting.com> Message-ID: Hello John, Sorry this is late in coming, the following code is take from a live project of mine where we write to Excel from VS2008. I have snipped sections of code from one routine, and I have highlighted with my comments the five seperate bits I have given you, each bit is only a few lines of code, but they may be all you need to get Excel talking. I hope the code formats ok here, if not, let me know and I will send you a text file. Note a few things below 1) you can insert comments easily 2) you can insert columns easily 3) selecting a range if often the first step to performing an action HINT: Record a macro in Excel to add color and then you will have the code to do that from within C# thanks Mark // This bit shows the using statements you will need using Microsoft.Office.Interop.Excel; using Microsoft.Office.Tools.Excel; // This bit shows how to op an connection to Excel if (grdParts.RowCount > 0) { if (MessageBox.Show("Export Master Parts List?", "Export", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == (DialogResult.Yes)) { this.Cursor = Cursors.WaitCursor; Int32 intPos = bsParts.Position; try { if (SaveChanges()) { Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook xlWB = xlApp.Workbooks.Add(XlWBATemplate.xlWBATWorksheet); Microsoft.Office.Interop.Excel.Worksheet xlWS = (Microsoft.Office.Interop.Excel.Worksheet)xlWB.Worksheets[1]; xlApp.Visible = true; xlWS.Cells[2, 6] = "Parts List "; xlWS.Cells[3, 6] = "Date " + DateTime.Now.ToLongDateString(); // This bit shows how to write comments to excel Microsoft.Office.Interop.Excel.Range nRange; nRange = (Microsoft.Office.Interop.Excel.Range)xlWS.Cells[intRowIndex + intRowIncrement, intColumnIndex - 11]; nRange.AddComment(strFullComments.Replace("\r", "")); nRange.Comment.Shape.TextFrame.AutoSize = true; // This but shows how to insert a column Range rng = (Range)xlWS.Cells[1,2]; Range column = rng.EntireColumn; column.Insert(XlInsertShiftDirection.xlShiftToRight, false); column.Insert(XlInsertShiftDirection.xlShiftToRight, false); // this bit shows how to save the sheet String strFileName = "C:\\McAfee Prd Report_" + DateTime.Now.ToLongDateString() + "-" + DateTime.Now.ToLongTimeString().Replace(":", "") + ".xls"; xlWS.SaveAs(strFileName, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); On 22 January 2010 18:10, jwcolby wrote: > Does anyone have a good information source for automating office > (specifically Excel) from C#? > > I have a spreadsheet which has code inside of it which pulls data out of > SQL Server and dumps it > into pages of the spreadsheet. I WAS using Access to do this but my Office > 2007 install broke my > forms (event properties no longer wire to the code behind form). Thus from > C# I need to cause a > spreadsheet to open, call a method of the code and pass a server / database > string to it. > > Any help will be greatly appreciated. > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Mon Jan 4 11:05:56 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 04 Jan 2010 12:05:56 -0500 Subject: [dba-VB] Version control Message-ID: <4B421FF4.2040003@colbyconsulting.com> What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- John W. Colby www.ColbyConsulting.com From Gustav at cactus.dk Mon Jan 4 11:53:41 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jan 2010 18:53:41 +0100 Subject: [dba-VB] Version control Message-ID: Hi John Those of us, including you, who attend the Northwind.NET project (Shamil's SCRUM project) obtained a developer license for VisualSVN: Hi Gustav, Here is the VisualSVN license for Northwind.NET project. You can forward this license key to all members of your project but please don't distribute it outside of the project team. -------------------------------------------------- -------------------------------------------------- If you like to provide a reference to VisualSVN on your web site please get the logo at http://www.visualsvn.com/company/logos. Good luck with your project :) -- Regards, Olga Dolidze VisualSVN Support I have planed to set up the server for this (free) server for VisualSVN but I haven't had the server capacity until recently: http://www.visualsvn.com/server/ Should be piece of cake ... /gustav >>> jwcolby at colbyconsulting.com 04-01-2010 18:05 >>> What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Jan 4 12:45:40 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 4 Jan 2010 12:45:40 -0600 Subject: [dba-VB] Version control In-Reply-To: <4B421FF4.2040003@colbyconsulting.com> References: <4B421FF4.2040003@colbyconsulting.com> Message-ID: We just switched to SourceGear's Vault. It is an easy transition from SourceSafe and has some very nice features. The only thing I've found it lacking is the sourcesafe properties from the VS Files submenu. Have to go to VaultClient to see the links. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 04, 2010 9:06 AM To: VBA Subject: [dba-VB] Version control What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- 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 Tue Jan 5 09:57:35 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jan 2010 10:57:35 -0500 Subject: [dba-VB] Microsoft partner Message-ID: <4B43616F.5050509@colbyconsulting.com> I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- John W. Colby www.ColbyConsulting.com From garykjos at gmail.com Tue Jan 5 10:26:52 2010 From: garykjos at gmail.com (Gary Kjos) Date: Tue, 5 Jan 2010 10:26:52 -0600 Subject: [dba-VB] [dba-SQLServer] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> References: <4B43616F.5050509@colbyconsulting.com> Message-ID: I'm a Microsoft partner on my own too. Had to come up with a company name the last time. Gary Kjos Consulting Services. I guess I would be interested in at least looking at the idea of combining with some DBA people. GK On Tue, Jan 5, 2010 at 9:57 AM, jwcolby wrote: > I am getting calls from Microsoft re my partnership. ?The caller today gave me a free certificate > for a training course on server virtualization. ?It is for the Server 2008 Hyper V virtualization > stuff. ?I just clicked through to see what it is and it looks interesting. ?This is the only > certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to > convince me how valuable my membership is. ?My membership is expiring this month. > > If you have a membership and are interested in such stuff, you might want to call and ask if you are > eligible for this. > > BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of > obtaining the credentials for partner companies, please speak up. ?As a "sole proprietor" it is > difficult for me to get enough of these credentials to qualify. ?However I am told that we as a > group could form a virtual organization and do this. ?Each member would need to get one (or more) > credentials, then we would need to band together and present as an organization. > > It might be worth doing. > > -- > John W. Colby > www.ColbyConsulting.com > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- Gary Kjos garykjos at gmail.com From mmattys at rochester.rr.com Tue Jan 5 10:39:49 2010 From: mmattys at rochester.rr.com (Michael R Mattys) Date: Tue, 5 Jan 2010 11:39:49 -0500 Subject: [dba-VB] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> Message-ID: Hi John, My brother and I are looking for such opportunities also. So ... count us in. Let us know what information will be required. Michael R Mattys Business Process Developers www.mattysconsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of jwcolby Sent: Tuesday, January 05, 2010 10:58 AM To: Access Developers discussion and problem solving; VBA; Dba-Sqlserver Subject: [dba-VB] Microsoft partner I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- 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 shamil at smsconsulting.spb.ru Tue Jan 5 11:01:49 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 5 Jan 2010 20:01:49 +0300 Subject: [dba-VB] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> References: <4B43616F.5050509@colbyconsulting.com> Message-ID: <000901ca8e28$c742cbc0$55c86340$@spb.ru> Hi John -- I would be interested to join such a virtual organization (if it could be international) to get MS Partner Status: I'm MCP, MCAD.NET and MCSD.NET. As far as I know MS Partner Status lets to purchase MSDN Prof. subscription (5 licenses?) for about USD400-500? - I'd be interested to participate in sharing of the costs of such MSDN subscription... Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, January 05, 2010 6:58 PM To: Access Developers discussion and problem solving; VBA; Dba-Sqlserver Subject: [dba-VB] Microsoft partner I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- 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 __________ Information from ESET NOD32 Antivirus, version of virus signature database 4745 (20100105) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4745 (20100105) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 5 17:15:22 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 6 Jan 2010 02:15:22 +0300 Subject: [dba-VB] SCRUM/Agile Teamwork: The Leadership - Self-management Dilemma Message-ID: <000901ca8e5c$f62b2ac0$e2818040$@spb.ru> Hi All - I suppose the subject article is one of the best on Agile Teamwork I've ever read - the best in fact IMO: http://www.infoq.com/articles/agile-teamwork;jsessionid=F3CDBBECDB2B79035FC5 F417CE5757B8 I went through a free quiz/questionnaire they handle to evaluate Agile Teams: http://quiz.brightgreenprojects.com/agile_team_report And I have got the following results as I perceived them for our Northwind.NET agile teamwork project: ==== 75% - Advising team performance factor. 91% - Innovating team performance factor. 83% - Promoting team performance factor. 91% - Developing team performance factor. 58% - Organizing team performance factor. 83% - Producing team performance factor. 75% - Inspecting team performance factor. 85% - Maintaining team performance factor. You scored over 80% for the Linking team performance factor. ==== If your score on all sectors is over 80% then you consider your agile team to be well on the way to high performance. If your score is in the range 60-80% for all sectors then your team is probably doing some things well but there is definite scope for improvement. If your score on any sector is below 50% then this is an area where your team can make substantial improvements to the way it is working. These sectors should be an immediate development priority for your team. === It would be interesting to get results of your passing through this quiz to find out how well our results will correlate. Not urgent. Thank you. -- Shamil From Gustav at cactus.dk Wed Jan 6 02:33:20 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jan 2010 09:33:20 +0100 Subject: [dba-VB] Microsoft partner Message-ID: Hi John and the Board of Directors Could such an organisation be Database Advisors Inc? /gustav >>> jwcolby at colbyconsulting.com 05-01-2010 16:57 >>> BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Wed Jan 6 06:54:32 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 07:54:32 -0500 Subject: [dba-VB] Microsoft partner In-Reply-To: References: Message-ID: <4B448808.8050401@colbyconsulting.com> It could be. There are pros and cons from Database Advisor's perspective. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi John and the Board of Directors > > Could such an organisation be Database Advisors Inc? > > /gustav > > >>>> jwcolby at colbyconsulting.com 05-01-2010 16:57 >>> > > BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of > obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is > difficult for me to get enough of these credentials to qualify. However I am told that we as a > group could form a virtual organization and do this. Each member would need to get one (or more) > credentials, then we would need to band together and present as an organization. > > It might be worth doing. > From jwcolby at colbyconsulting.com Wed Jan 6 07:28:11 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 08:28:11 -0500 Subject: [dba-VB] [AccessD] Microsoft partner In-Reply-To: <034a01ca8e5a$131eb1e0$0701a8c0@MSIMMSWS> References: <4B43616F.5050509@colbyconsulting.com> <034a01ca8e5a$131eb1e0$0701a8c0@MSIMMSWS> Message-ID: <4B448FEB.70602@colbyconsulting.com> Mark, Understand that I am NOT a very active "partner", in fact as far as I can tell I am more an "associate". I have never made any effort to do the qualifications etc. From what I can tell, for various reasons it is not a good idea to approach the "partnership" from a "how many referrals" angle. While MS does have a "referral" process, if you are going to pursue the partnership it would probably work best to approach it from a "what can I learn" and "what software can I get" all for a reduced price. If you ever get any referrals that is a bonus. All of that said with the understanding that I am not really active in their program. I would like to be, but more in order to get trained up a little. There are areas that I would like to know more about. Personally, I have never had much use for Microsoft's "credentials", but many people do get them. I have always been about "what do I know" more than "what strings of characters can I put after my name". OTOH if I had spent 10 years getting a "doctor" title that would probably be important to me. In terms of my proposal however I think forming a "virtual consulting company" would be about referrals, however the referrals would likely come from other members of the company. If there are 10 guys from this list, we would undoubtedly have a wide range of backgrounds and expertise. If someone asks if I can do virtualization, I would be able to say "I'll get back to you" and go see if any of you are strong in that area. Or maybe even have a spreadsheet or word document that would tell me "Member XYZ claims to be an 'expert' in these areas". That kind of thing. AND... those "strings of characters" are important to some clients. Thus being able to put a whole string of Microsoft credentials on my web site might attract business. I would not necessarily perform the work, it might go to another partner in the company. More and more, where you live affects your ability to perform your work very little. We can remote in to do programming, database design or maintenance and so forth. If you don't have to physically touch something then it can often be done remotely. A "virtual" company consisting of highly skilled people scattered around the world could work well. John W. Colby www.ColbyConsulting.com Mark Simms wrote: > John - I'm just kind of curious about the MSFT Partnership program.... > Do you get any decent leads or referals from them ? > > > From jwcolby at colbyconsulting.com Wed Jan 6 07:31:38 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 08:31:38 -0500 Subject: [dba-VB] Transfer database schema objects and data to another server/database with SMO Message-ID: <4B4490BA.6050006@colbyconsulting.com> http://www.mssqltips.com/tip.asp?tip=1910&home -- John W. Colby www.ColbyConsulting.com From marklbreen at gmail.com Fri Jan 15 03:16:44 2010 From: marklbreen at gmail.com (Mark Breen) Date: Fri, 15 Jan 2010 09:16:44 +0000 Subject: [dba-VB] Django Anyone? Message-ID: Hello All, I recently heard about a framework named Django. As some that is only really a MS person, and little exposure to outside that world, has anyone any experience of this project? Any feedback or reviews? Does anyone have a perspective on how, or on which levels it compares to DotNetNuke (VB.Net)? http://www.djangoproject.com/ http://docs.djangoproject.com/en/dev/intro/overview/ I took the opinion that the vb list is for programmers and that this is programming related, hope that is OK? thanks Mark From DWUTKA at Marlow.com Fri Jan 15 12:40:25 2010 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 15 Jan 2010 12:40:25 -0600 Subject: [dba-VB] VB 6 quirk In-Reply-To: References: Message-ID: Ok, I'm sure not many of you are using VB 6 anymore. I really don't develop much anymore myself. However, I have a user that is running into a quirk with Adobe. It's a form pdf, that creates an XFDF extension. Inside this 'data file' (that she receives in email), it's got a tag that shows a full URL of what the user used to view the pdf form. This is an http://.... URL. On her full version of Acrobat, it has a problem dealing with the URLs, it just keeps prompting if you want to allow access to http://... Now, if you go into that .xfdf data file, and just change that href property to the actual network path (\\server\share\...), then it opens just fine. It seems that Acrobat Reader is adding the URL on the end users end, so it's not something we can fix in the pdf form. (At least we can't find a property to do so). Since it's a pretty simple fix to change the URL to the UNC path, I figured I'd whip up a little VB program to do that. Did that, piece of cake. Wanted to make it an 'invisible process', by having the program just monitor a folder where she could save these emailed .xfdf data files too. When a new file is added to the monitored folder, it does it's job, and saves the new file as 'converted_.....xfdf'. Program works like a charm..IN DEBUG mode. Compile it, and run it, and the CreateFile API which gets the handle to start the monitoring process kicks back a DLLError 998. Now, why would code work perfectly in debug mode, but not work in a compiled state. Here is my file monitoring class: The line 'If hDir=-1' is getting skipped in debug mode (because it's getting a valid handle), and in a compiled state, it dumps out the LastDllError as 998 (actually, it was doing 998, until I added the strPathToMonitor variable,a nd now it's doing 1305. I'm stumped. Anyone have any ideas? Option Explicit Event FileActivity(strFileName As String, Action As FS_File_Actions) Public PathToMonitor As String Dim blKeepMonitoring As Boolean Private Declare Function FS_CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long Private Declare Function FS_ReadDirChanges Lib "kernel32" Alias "ReadDirectoryChangesW" (ByVal hDir As Long, ByVal lpBuffer As Long, ByVal lenBuffer As Long, ByVal bWatchSubtree As Boolean, ByVal dwNotifyFilter As Long, ByRef dwBytesReturned As Long, ByVal lpOverLapped As Long, ByVal dwCallBack As Long) As Long Private Declare Function FS_CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Long) As Long Private Declare Function FS_CreateEvent Lib "kernel32" Alias "CreateEventA" (lpEventAttributes As Any, ByVal bManualReset As Long, ByVal bInitialState As Long, ByVal lpName As String) As Long Private Declare Function FS_ResetEvent Lib "kernel32" Alias "ResetEvent" (ByVal hEvent As Long) As Long Private Declare Sub FS_CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Long, ByVal Source As Long, ByVal Length As Long) Private Declare Function FS_WaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Private Const FILE_LIST_DIRECTORY = (&H1) Private Const FILE_SHARE_DELETE = &H4 Private Const FILE_SHARE_READ = &H1 Private Const FILE_SHARE_WRITE = &H2 Private Const OPEN_EXISTING = 3 Private Const FILE_FLAG_BACKUP_SEMANTICS = &H2000000 Private Const FILE_FLAG_OVERLAPPED = &H40000000 Private Const FILE_NOTIFY_CHANGE_ATTRIBUTES = &H4 Private Const FILE_NOTIFY_CHANGE_CREATION = &H40 Private Const FILE_NOTIFY_CHANGE_DIR_NAME = &H2 Private Const FILE_NOTIFY_CHANGE_FILE_NAME = &H1 Private Const FILE_NOTIFY_CHANGE_LAST_ACCESS = &H20 Private Const FILE_NOTIFY_CHANGE_LAST_WRITE = &H10 Private Const FILE_NOTIFY_CHANGE_SECURITY = &H100 Private Const FILE_NOTIFY_CHANGE_SIZE = &H8 Private Const WAIT_TIMEOUT = 258& Public Enum FS_File_Actions FILE_ACTION_ADDED = &H1 FILE_ACTION_MODIFIED = &H3 FILE_ACTION_REMOVED = &H2 FILE_ACTION_RENAMED_NEW_NAME = &H5 FILE_ACTION_RENAMED_OLD_NAME = &H4 End Enum Private Type FS_FILE_NOTIFY_INFORMATION NextEntryOffset As Long Action As FS_File_Actions FileNameLength As Long FileName(1024 - 1) As Byte End Type Private Type FS_OVERLAPPED Internal As Long InternalHigh As Long Offset As Long OffsetHigh As Long hEvent As Long End Type Public Function StartMonitoring() 'On Error GoTo ErrorHandler Dim hDir As Long Dim dwReturn As Long Dim intReturnSize As Long Dim ovr As FS_OVERLAPPED Dim hEvent As Long Dim intWatchFilter As Long Dim fni As FS_FILE_NOTIFY_INFORMATION Dim fniBuf(0 To 1024 * 5 - 1) As Byte Dim BufferPos As Long Dim strFileName As String Dim strPathToMonitor As String strPathToMonitor = PathToMonitor blKeepMonitoring = True intWatchFilter = FILE_NOTIFY_CHANGE_ATTRIBUTES + FILE_NOTIFY_CHANGE_CREATION + FILE_NOTIFY_CHANGE_DIR_NAME + FILE_NOTIFY_CHANGE_FILE_NAME + FILE_NOTIFY_CHANGE_LAST_ACCESS + FILE_NOTIFY_CHANGE_LAST_WRITE + FILE_NOTIFY_CHANGE_SECURITY + FILE_NOTIFY_CHANGE_SIZE hDir = FS_CreateFile(strPathToMonitor, FILE_LIST_DIRECTORY, FILE_SHARE_READ Or FILE_SHARE_DELETE Or FILE_SHARE_WRITE, Null, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS Or FILE_FLAG_OVERLAPPED, 0) If hDir = -1 Then MsgBox "Invalid Handle Value...Error: " & Err.LastDllError End If hEvent = FS_CreateEvent(0&, True, True, "FS_IOEvent") ovr.hEvent = hEvent dwReturn = FS_ReadDirChanges(hDir, VarPtr(fniBuf(0)), UBound(fniBuf) + 1, True, intWatchFilter, intReturnSize, VarPtr(ovr), 0&) If dwReturn = 0 Then MsgBox "Error Calling ReadDirChanges" MsgBox Err.LastDllError MsgBox ovr.hEvent MsgBox hDir End If Do Until blKeepMonitoring = False BufferPos = 0 dwReturn = FS_WaitForSingleObject(hEvent, 100) If dwReturn <> WAIT_TIMEOUT Then 'MsgBox fniBuf(0) FS_CopyMemory VarPtr(fni), VarPtr(fniBuf(BufferPos)), Len(fni) strFileName = fni.FileName strFileName = Left(strFileName, fni.FileNameLength / 2) RaiseEvent FileActivity(strFileName, fni.Action) While fni.NextEntryOffset <> 0 BufferPos = BufferPos + fni.NextEntryOffset FS_CopyMemory VarPtr(fni), VarPtr(fniBuf(BufferPos)), Len(fni) strFileName = fni.FileName strFileName = Left(strFileName, fni.FileNameLength / 2) RaiseEvent FileActivity(strFileName, fni.Action) Wend FS_ResetEvent hEvent dwReturn = FS_ReadDirChanges(hDir, VarPtr(fniBuf(0)), UBound(fniBuf) + 1, True, intWatchFilter, intReturnSize, VarPtr(ovr), 0&) End If DoEvents Loop ErrorHandler: FS_CloseHandle hEvent FS_CloseHandle hDir End Function Public Function StopMonitoring() blKeepMonitoring = False End Function Private Sub Class_Initialize() blKeepMonitoring = False End Sub The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From jwcolby at colbyconsulting.com Mon Jan 18 14:40:19 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jan 2010 15:40:19 -0500 Subject: [dba-VB] 2008 backup / restore scripts Message-ID: <4B54C733.5060006@colbyconsulting.com> I obtained a developer copy of SQL Server 2008, which has full backup / restore with compression if I understand correctly. I had been using Idera's SQL Safe free version but that is no longer free. Of course now all of my backups are locked away in a version of a program that I can no longer use. Free is only free until it's not, whereupon it is a liability. Sigh. Anyway... I am wondering if anyone has a stored procedure that will use the 2008 built-in backup to do a full backup with compression. I built a C# program to use the Idera scripts to do my backups and restores. I am hoping that I can get a similar native 2008 stored procedure that I can call to do the same thing. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Tue Jan 19 08:05:51 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 19 Jan 2010 09:05:51 -0500 Subject: [dba-VB] SQL Server: An interesting data load article Message-ID: <4B55BC3F.20304@colbyconsulting.com> http://msdn.microsoft.com/en-us/library/dd537533.aspx -- John W. Colby www.ColbyConsulting.com From davidmcafee at gmail.com Wed Jan 20 16:28:20 2010 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 20 Jan 2010 14:28:20 -0800 Subject: [dba-VB] VB.Net Wait for file to Download before launching Message-ID: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> Does anyone know how to do this? I have this program that checks for updates : If IsUpdateAvailable() Then DownloadUpdate() LaunchUpdateInstaller() LaunchApp() Else LaunchApp() End If The Update detection and Download work great: Private Sub DownloadUpdate() If Directory.Exists(InstallFilesPath) Then 'if the local path exists then check for the actual file If File.Exists(InstallFilesPath + InstallFile) Then 'Check to see if the new file is already installed 'Delete file File.Delete(InstallFilesPath + InstallFile) 'Then download it DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) Else ' If the source file can't be found, Download new copy DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If Else 'Directory did not exist, so create it and copy new file over Directory.CreateDirectory(InstallFilesPath) DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If End Sub Private Sub LaunchApp() 'This sub launches the actual Program System.Diagnostics.Process.Start(AppPath + AppName) End Sub The trouble is that it wants to run the LaunchApp() sub immediatley after calling the LaunchUpdateInstaller() sub. I was thinking of putting in a timer of some sort, but I was wondering if there is some quicker/better way of doing this. MTIA, David McAfee From cfoust at infostatsystems.com Wed Jan 20 17:26:52 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 20 Jan 2010 17:26:52 -0600 Subject: [dba-VB] VB.Net Wait for file to Download before launching In-Reply-To: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> References: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> Message-ID: You can use a small text file on the drive as a flag. Start it when you call the installer and then keep checking for it at intervals. When it's no longer there (the installer removes it), launch the application. Or you could do it the other way around and have the installer remove a file you create just before you call it. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Wednesday, January 20, 2010 2:28 PM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] VB.Net Wait for file to Download before launching Does anyone know how to do this? I have this program that checks for updates : If IsUpdateAvailable() Then DownloadUpdate() LaunchUpdateInstaller() LaunchApp() Else LaunchApp() End If The Update detection and Download work great: Private Sub DownloadUpdate() If Directory.Exists(InstallFilesPath) Then 'if the local path exists then check for the actual file If File.Exists(InstallFilesPath + InstallFile) Then 'Check to see if the new file is already installed 'Delete file File.Delete(InstallFilesPath + InstallFile) 'Then download it DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) Else ' If the source file can't be found, Download new copy DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If Else 'Directory did not exist, so create it and copy new file over Directory.CreateDirectory(InstallFilesPath) DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If End Sub Private Sub LaunchApp() 'This sub launches the actual Program System.Diagnostics.Process.Start(AppPath + AppName) End Sub The trouble is that it wants to run the LaunchApp() sub immediatley after calling the LaunchUpdateInstaller() sub. I was thinking of putting in a timer of some sort, but I was wondering if there is some quicker/better way of doing this. MTIA, David McAfee _______________________________________________ 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 Jan 21 06:52:16 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 21 Jan 2010 13:52:16 +0100 Subject: [dba-VB] Webcast: ADO.NET Entity Framework 4 Message-ID: Hi all Tour the Top 10 Treats in Entity Framework 4: http://www.oreillynet.com/pub/e/1517 by EF guru, Julie Lerman. /gustav From jwcolby at colbyconsulting.com Thu Jan 21 07:58:41 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 21 Jan 2010 08:58:41 -0500 Subject: [dba-VB] How unique are SQL Server error numbers? Message-ID: <4B585D91.4010604@colbyconsulting.com> I am calling stored procedures and passing back the error number and error string to my C# program. I am doing things like "create field, create index" etc. If I am trying to create a field and it already exists I get an error: pErrorDesc "Column names in each table must be unique. Column name 'AddrValid' in table '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." And pErrorNo "2705" So my question is, can I count on a 2705 being this "column name must be unique"? If so, in my C# program, I can count that as a successful field creation rather than a failure of the stored procedure. ATM I am saying that a failure occurred and not performing the next step, whereas I really can do the next step (update that field). TIA for your assistance. -- John W. Colby www.ColbyConsulting.com From davidmcafee at gmail.com Thu Jan 21 08:41:37 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 06:41:37 -0800 Subject: [dba-VB] How unique are SQL Server error numbers? In-Reply-To: <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> References: <4B585D91.4010604@colbyconsulting.com> <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> Message-ID: <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> John, you can trap for built in errors (such as 2705) in TSQL, or you can raise your own if/when certain conditions are met. Sent from my Droid phone. On Jan 21, 2010 6:00 AM, "jwcolby" wrote: I am calling stored procedures and passing back the error number and error string to my C# program. I am doing things like "create field, create index" etc. If I am trying to create a field and it already exists I get an error: pErrorDesc "Column names in each table must be unique. Column name 'AddrValid' in table '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." And pErrorNo "2705" So my question is, can I count on a 2705 being this "column name must be unique"? If so, in my C# program, I can count that as a successful field creation rather than a failure of the stored procedure. ATM I am saying that a failure occurred and not performing the next step, whereas I really can do the next step (update that field). TIA for your assistance. -- 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 Thu Jan 21 10:49:59 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 21 Jan 2010 11:49:59 -0500 Subject: [dba-VB] How unique are SQL Server error numbers? In-Reply-To: <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> References: <4B585D91.4010604@colbyconsulting.com> <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> Message-ID: <4B5885B7.5030606@colbyconsulting.com> David, I have built up a library of stored procedures that I have, up to this point, executed manually or in another stored procedure. Being a programmer at heart, then next logical step is to execute these SPs from a C# program at the click of a button. That is what I am up to now. I am breaking the stored procedures down now that I can control them from C#. Where before I might Make a table Create a cover query in a source table. Append data from the source into the new table Create a couple of indexes in the new table I would do all of the above in a single stored procedure. I now want to be able to do each of these steps individually and know back in C# what happened. Perhaps the make table failed for some reason. Creating the cover index on the source failed, but it failed because the index already exists. Appending data from source to destination worked, but how many records went? Etc. Having a real programming environment from which to cause these to happen and log the results is a HUGE step up from what I was capable of directly in TSQL. I view it as the best of both worlds. John W. Colby www.ColbyConsulting.com David McAfee wrote: > John, you can trap for built in errors (such as 2705) in TSQL, or you can > raise your own if/when certain conditions are met. > > Sent from my Droid phone. > > On Jan 21, 2010 6:00 AM, "jwcolby" wrote: > > I am calling stored procedures and passing back the error number and error > string to my C# program. > I am doing things like "create field, create index" etc. If I am trying to > create a field and it > already exists I get an error: > > pErrorDesc "Column names in each table must be unique. Column name > 'AddrValid' in table > '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." > > And > > pErrorNo "2705" > > So my question is, can I count on a 2705 being this "column name must be > unique"? If so, in my C# > program, I can count that as a successful field creation rather than a > failure of the stored procedure. > > ATM I am saying that a failure occurred and not performing the next step, > whereas I really can do > the next step (update that field). > > TIA for your assistance. > > -- > 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 > _______________________________________________ > 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 Thu Jan 21 16:58:41 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 14:58:41 -0800 Subject: [dba-VB] .Net Setup, launch application after installation Message-ID: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> OK, am I the only one having a hard time with this? Visual Studio 2008 doesn't offer a simple method of launching the application after installation (via Setup/MSI), or at least provide an easy way to prompt the user if they want to launch the app on the finished screen. I used to be able to so this from Install Shield, Wise and hell, even via WinZip Self Extractor. I've been following tips from here: http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage But I still don't have the ability to launch the app that is being installed. Do any of you .Net gurus know of an easy way to do so? Thanks, David From cfoust at infostatsystems.com Thu Jan 21 17:22:24 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 21 Jan 2010 17:22:24 -0600 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> Message-ID: We use an installShield installer and it has provision for a file to execute when the installation ends. Is that what you mean? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, January 21, 2010 2:59 PM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] .Net Setup, launch application after installation OK, am I the only one having a hard time with this? Visual Studio 2008 doesn't offer a simple method of launching the application after installation (via Setup/MSI), or at least provide an easy way to prompt the user if they want to launch the app on the finished screen. I used to be able to so this from Install Shield, Wise and hell, even via WinZip Self Extractor. I've been following tips from here: http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage But I still don't have the ability to launch the app that is being installed. Do any of you .Net gurus know of an easy way to do so? Thanks, David _______________________________________________ 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 Thu Jan 21 17:39:30 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 15:39:30 -0800 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> Message-ID: <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Yes. I've used it before as well (also Wise and even WinZipSE). I'm trying to do this natively out of the VS2008 setup & deployment project. I can't believe there isn't anything natively built in to do so. On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust wrote: > We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee > Sent: Thursday, January 21, 2010 2:59 PM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] .Net Setup, launch application after installation > > OK, am I the only one having a hard time with this? > > Visual Studio 2008 doesn't offer a simple method of launching the > application after installation (via Setup/MSI), or at least provide an > easy way to prompt the user if they want to launch the app on the > finished screen. > > I used to be able to so this from Install Shield, Wise and hell, even > via WinZip Self Extractor. > > I've been following tips from here: > http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx > and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage > > But I still don't have the ability to launch the app that is being installed. > > Do any of you .Net gurus know of an easy way to do so? > > Thanks, > David > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Fri Jan 22 07:56:31 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 08:56:31 -0500 Subject: [dba-VB] Free SQL Server tools Message-ID: <4B59AE8F.2030206@colbyconsulting.com> For all the small shops out there, this just in: http://www.sqlservercentral.com/articles/Tools/64908/ -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Jan 22 08:03:33 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 09:03:33 -0500 Subject: [dba-VB] C# hot keys Message-ID: <4B59B035.5050806@colbyconsulting.com> In Visual Studio F6 and F5 were build and run. Suddenly F6 no longer does the build. Where do I go to troubleshoot this? -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Jan 22 10:33:53 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 22 Jan 2010 10:33:53 -0600 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Message-ID: Maybe you're looking at it from the wrong end. The .Net purpose is to give you control, but that doesn't mean you don't have to build your own tools. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, January 21, 2010 3:40 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] .Net Setup, launch application after installation Yes. I've used it before as well (also Wise and even WinZipSE). I'm trying to do this natively out of the VS2008 setup & deployment project. I can't believe there isn't anything natively built in to do so. On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust wrote: > We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? > > Charlotte Foust > From davidmcafee at gmail.com Fri Jan 22 11:52:54 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 09:52:54 -0800 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Message-ID: <8786a4c01001220952j668dae93rfd18d8a4a6f1456e@mail.gmail.com> I know, I just can't believe they didn't give that option in the MSI builder. I've followed this guys blog: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage It launches after install (if the checkbox remains checked) in all (XP32, Vista 64, Win 7 32/64) my supported OS's except Vista 32 bit. I think this guy had a similar proglem: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.platformsdk.msi&tid=1dbfd840-d667-47bc-bcd7-7fa4c615afb6&cat=&lang=&cr=&sloc=&p=1 My issue is that I don't know enough about Custom Actions or Jscript to modify the .JS file to alter the "no impersonation" bit setting. I can't believe such a trivial item is taking all of my time. David On Fri, Jan 22, 2010 at 8:33 AM, Charlotte Foust wrote: > Maybe you're looking at it from the wrong end. ?The .Net purpose is to give you control, but that doesn't mean you don't have to build your own tools. > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee > Sent: Thursday, January 21, 2010 3:40 PM > To: Discussion concerning Visual Basic and related programming issues. > Subject: Re: [dba-VB] .Net Setup, launch application after installation > > Yes. I've used it before as well (also Wise and even WinZipSE). > I'm trying to do this natively out of the VS2008 setup & deployment project. > I can't believe there isn't anything natively built in to do so. > > > On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust > wrote: >> We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? >> >> Charlotte Foust From davidmcafee at gmail.com Fri Jan 22 12:07:39 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 10:07:39 -0800 Subject: [dba-VB] C# hot keys In-Reply-To: <4B59B035.5050806@colbyconsulting.com> References: <4B59B035.5050806@colbyconsulting.com> Message-ID: <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> F5 still runs/debugs Ctrl+Shift+B to build On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: > In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go > to troubleshoot this? > > -- > John W. Colby From jwcolby at colbyconsulting.com Fri Jan 22 12:10:37 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 13:10:37 -0500 Subject: [dba-VB] C# automation of office Message-ID: <4B59EA1D.1080700@colbyconsulting.com> Does anyone have a good information source for automating office (specifically Excel) from C#? I have a spreadsheet which has code inside of it which pulls data out of SQL Server and dumps it into pages of the spreadsheet. I WAS using Access to do this but my Office 2007 install broke my forms (event properties no longer wire to the code behind form). Thus from C# I need to cause a spreadsheet to open, call a method of the code and pass a server / database string to it. Any help will be greatly appreciated. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Jan 22 12:25:20 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 13:25:20 -0500 Subject: [dba-VB] C# hot keys In-Reply-To: <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> Message-ID: <4B59ED90.30607@colbyconsulting.com> Are you saying that F6 no longer runs debug? What does F6 do instead? John W. Colby www.ColbyConsulting.com David McAfee wrote: > F5 still runs/debugs > > Ctrl+Shift+B to build > > On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >> In Visual Studio F6 and F5 were build and run. Suddenly F6 no longer does the build. Where do I go >> to troubleshoot this? >> >> -- >> John W. Colby > > _______________________________________________ > 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 Jan 22 12:32:33 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 10:32:33 -0800 Subject: [dba-VB] C# hot keys In-Reply-To: <4B59ED90.30607@colbyconsulting.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> <4B59ED90.30607@colbyconsulting.com> Message-ID: <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> Waste a keystroke? :P I don't know, I don't see it anywhere in the menus. On Fri, Jan 22, 2010 at 10:25 AM, jwcolby wrote: > Are you saying that F6 no longer runs debug? ?What does F6 do instead? > > John W. Colby > www.ColbyConsulting.com > > > David McAfee wrote: >> F5 still runs/debugs >> >> Ctrl+Shift+B to build >> >> On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >>> In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go >>> to troubleshoot this? >>> >>> -- >>> John W. Colby >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Fri Jan 22 15:53:59 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 16:53:59 -0500 Subject: [dba-VB] Visual Studio grinds to a halt Message-ID: <4B5A1E77.5060206@colbyconsulting.com> I am running an Access / Excel automation on my dev laptop. It is doing a set of long running queries to populate a spreadsheet with sets of counts, running VBA, accessing the SQL Server on another machine over my network etc. I am also running Visual Studio trying to get some work done. Suddenly VS halts and throws up a "waiting for Excel" message. No idea at what level. The entire system is not hung, i.e. I can use other open apps, just not Access / Excel and ... Visual Studio. 8( -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Jan 22 16:00:37 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 22 Jan 2010 16:00:37 -0600 Subject: [dba-VB] C# hot keys In-Reply-To: <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> <4B59ED90.30607@colbyconsulting.com> <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> Message-ID: You can change that by going to Tools -> Options -> Import and Export and reset your settings. It's nuts but it allows you to select the VB defaults again. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Friday, January 22, 2010 10:33 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] C# hot keys Waste a keystroke? :P I don't know, I don't see it anywhere in the menus. On Fri, Jan 22, 2010 at 10:25 AM, jwcolby wrote: > Are you saying that F6 no longer runs debug? ?What does F6 do instead? > > John W. Colby > www.ColbyConsulting.com > > > David McAfee wrote: >> F5 still runs/debugs >> >> Ctrl+Shift+B to build >> >> On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >>> In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go >>> to troubleshoot this? >>> >>> -- >>> John W. Colby >> From jwcolby at colbyconsulting.com Mon Jan 25 10:50:02 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 11:50:02 -0500 Subject: [dba-VB] C#: Raising events Message-ID: <4B5DCBBA.5070108@colbyconsulting.com> Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Jan 25 11:02:19 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 25 Jan 2010 11:02:19 -0600 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DCBBA.5070108@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 25, 2010 8:50 AM To: VBA Subject: [dba-VB] C#: Raising events Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- 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 Mon Jan 25 11:33:18 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 12:33:18 -0500 Subject: [dba-VB] C#: Raising events In-Reply-To: References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: <4B5DD5DE.7090704@colbyconsulting.com> Charlotte, > I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? LOL. Me too! And no, that is what I do not know how to do. clsAccuzipImportFrom raises an event evStoredProc in many different methods of clsAccuzipImportFrom. The intention is to pass the stored procedure object that it uses up to frmAccuzipImport. clsAccuzipImportFrom is dimensioned in frmAccuzipImport: clsAccuzipImportFrom clsAZImp; frmAccuzipImport need to sink evStoredProc raised in clsAZImp. John W. Colby www.ColbyConsulting.com Charlotte Foust wrote: > I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, January 25, 2010 8:50 AM > To: VBA > Subject: [dba-VB] C#: Raising events > > Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably > are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. > > What I want to do is execute stored procedures, and publish status information about each SP > executed on my form starts a process running. > > I have a class which encapsulates my stored procedure stuff for creating the command object, > capturing the parameters and eventually executing the stored procedure. > > I assume that this object might raise an event when the stored procedure returns i.e. > sCmd.ExecuteNonQuery() returns control to C# ? > > OTOH, I have other classes which USE the SP class. These are the classes that actually call > specific stored procedures, pass parameters, and control the program flow depending on whether the > called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which > passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure > and want to display on the form the name of the sp and whether it completed satisfactorily, how long > it took and so forth. > > I am going to go with the classes which execute sequences of SPs being the class that raises the > event. I am looking at this as an example: > > http://www.codeproject.com/KB/cs/csevents01.aspx > > clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. > > clsAZExport uses a sequence of stored procedures to perform an export process. > > So... I create an event delegate definition which defines the event I will raise. Where do I place > this? For the moment I have placed it inside of the container where clsStoredProc is defined. > > I now have to create evargStoredProcedure - a public class for the argument that this event will > pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where > is this class created? Do I just define a new class at the project level for this event argument. > It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so > placing it in the code container for that class seems appropriate. For the moment I have placed it > inside of the container where clsStoredProc is defined. > > > Now, in every method of clsAZExport I add two lines: > > evargStoredProcedure svargSP = new evargStoredProcedure(sp); > evStoredProc(this, svargSP); > > This apparently creates the arguments object and then raises the event. > > Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. > > So... back in the form which uses clsAZExport to export data from SQL Server... > > At this point their example breaks down entirely. I am not writing to the debug window, I am trying > to write to a control on a form. While the debug window can be written to from anywhere, a control > on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. > > And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared > in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I > did all this I would click on any object that raises an event and I would see a list of their > events, but I do not, or I do not know how to see them. As an example if I have a text box, it has > events. If I click on that I can see its events, select one and voila, a place to say what to do. > How do I do that for an event raised by my class dimensioned and used in my form? > > If anyone is following this and knows what I am trying to do and what to do next, please speak up. > From shamil at smsconsulting.spb.ru Mon Jan 25 11:34:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Mon, 25 Jan 2010 20:34:09 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DCBBA.5070108@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> Hi John -- Here is one of myriads possible solutions how to handle events in caller classes - for form's(/their controls') code behind it will be similar with an exception that you might have to use .Invoke while processing events in event sinks as the latter could run in a different thread than your form's main thread: using System; namespace ConsoleApplication { public class SpRunner { public class SpRunnerStatusReportEventArgs:EventArgs { public int CurrentCount {get; set;} public int MaxCount {get;set; } } public EventHandler StatusReport; public void Run() { const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { if (StatusReport != null) { SpRunnerStatusReportEventArgs e = new SpRunnerStatusReportEventArgs(); e.CurrentCount = i; e.MaxCount = MAX_COUNT; StatusReport(this, e); } } } } class Program { static void Main(string[] args) { SpRunner runner = new SpRunner(); runner.StatusReport += new EventHandler(statusReport); runner.Run(); } private static void statusReport(object sender, SpRunner.SpRunnerStatusReportEventArgs e) { System.Console.WriteLine("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); } } } Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 25, 2010 7:50 PM To: VBA Subject: [dba-VB] C#: Raising events Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Jan 25 12:32:21 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 13:32:21 -0500 Subject: [dba-VB] C#: Raising events In-Reply-To: <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> Message-ID: <4B5DE3B5.1050708@colbyconsulting.com> Shamil, Unfortunately you are doing the same thing every other example is doing, writing the data to the console. I need to write to a control on a form. What I can apparently see from this is that the delegate and the event args need to be in the class that raises the event? These exact same things (delegate and event args class) will be used over and over again in other classes / forms so I was TRYING to place them down in the class that actually implements my stored procedure class. IOW I have a completely separate project that implements the stored procedure class. In that I placed the eventargument class as well as the delegate. these three things will be used in many many different classes / forms. Everything needs to run stored procedures and I was TRYING to "encapsulate" the delegate as well as the eventargs class in the same container as the stored procedure class. What I am seeing you do is to encapsulate the eventargs class and the delegate in the object that raises the event? John W. Colby www.ColbyConsulting.com Shamil Salakhetdinov wrote: > Hi John -- > > Here is one of myriads possible solutions how to handle events in caller > classes - for form's(/their controls') code behind it will be similar with > an exception that you might have to use .Invoke while processing events in > event sinks as the latter could run in a different thread than your form's > main thread: > > using System; > > namespace ConsoleApplication > { > > public class SpRunner > { > public class SpRunnerStatusReportEventArgs:EventArgs > { > public int CurrentCount {get; set;} > public int MaxCount {get;set; } > } > > public EventHandler StatusReport; > public void Run() > { > const int MAX_COUNT = 5; > for (int i = 1; i <= MAX_COUNT; i++) > { > if (StatusReport != null) > { > SpRunnerStatusReportEventArgs e = new > SpRunnerStatusReportEventArgs(); > e.CurrentCount = i; > e.MaxCount = MAX_COUNT; > StatusReport(this, e); > } > } > } > } > > class Program > { > static void Main(string[] args) > { > SpRunner runner = new SpRunner(); > runner.StatusReport += > new > EventHandler(statusReport); > runner.Run(); > } > > private static void statusReport(object sender, > SpRunner.SpRunnerStatusReportEventArgs e) > { > System.Console.WriteLine("{0}: Processing {1} of {2}...", > sender.GetType(), e.CurrentCount, e.MaxCount); > } > } > } > > Thank you. > > -- > Shamil From Gustav at cactus.dk Mon Jan 25 13:38:38 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 25 Jan 2010 20:38:38 +0100 Subject: [dba-VB] C#: Raising events Message-ID: Hi John I lost you too somewhere down the line ... However, here's an example where a manual update at one form (Main) raises an event which requeries another form (Employees). Perhaps that can guide you a little. It writes to the console too but for debugging only. Some code has been snipped. Note the custom attributes. using System; using System.IO; using System.Windows.Forms; namespace DLMail { public partial class FormMain : Form { public DataSetDL DlDataSet = new DataSetDL(); public FormEmployer EmployerForm; public FormEmployee EmployeeForm; public FormPaySlip PaySlipForm; public FormSystem SystemForm; private string _dropFolder = @"Drop"; private string _dropPath; private string _execPath; private string _dataPath; private string _dataFileName = @"DLMail.xml"; private string _dataBaseFile; private int _employerId = -1; private string _employerName = String.Empty; private string _pdfPassword = String.Empty; public string ExecPath { get { return _execPath; } } public string DataPath { get { return _dataPath; } } public string DataBaseFile { get { return _dataBaseFile; } } /// /// The path to the folder where to copy new pay slip PDF files. /// public string DropPath { get { return _dropPath; } } public int EmployerId { get { return _employerId; } } public string EmployerName { get { return _employerName; } } public string PdfPassword { get { return _pdfPassword; } } // Delegate declaration. public delegate void ChangingHandler(object sender, EmployerArgs employerArgs); // Event declaration. public event ChangingHandler EmployerChanged; public void ChangeEmployer() { // Call the event. EmployerArgs employerArgs = new EmployerArgs(_employerId, _employerName, _pdfPassword, _dataPath); // Running on Windows Vista, first time run of EmployerChanged // raises a null reference error. try { EmployerChanged(this, employerArgs); } catch (Exception exception) { Console.WriteLine(exception.Source); } } public FormMain() { InitializeComponent(); InitializeDataSet(); InitializeFolders(); } private void FormMain_Load(object sender, EventArgs e) { FillEmployerComboBox(); this.EmployerChanged += new ChangingHandler(FormMain_EmployerChanged); } private void InitializeDataSet() { _execPath = Path.GetDirectoryName(Application.ExecutablePath); _dataBaseFile = Path.Combine(_execPath, _dataFileName); if (!File.Exists(_dataBaseFile)) { //snip } else { DlDataSet.ReadXml(_dataBaseFile); DataSetDL .DataTablePaySlipTypeDataTable paySlipTypeDataTable = DlDataSet .DataTablePaySlipType ; } } private void InitializeFolders() { string dropPath = Path.Combine(_execPath, _dropFolder); //snip _dropPath = dropPath; } private void FillEmployerComboBox() { int selectedIndex = -1; if (EmployerComboBox.SelectedIndex > -1) { selectedIndex = EmployerComboBox.SelectedIndex; } DataSetDL.DataTableEmployerDataTable dataTableEmployer = DlDataSet.DataTableEmployer; EmployerComboBox.SelectedItem = "Id"; EmployerComboBox.DisplayMember = "Organisation"; EmployerComboBox.DataSource = dataTableEmployer; if (selectedIndex != -1) { EmployerComboBox.SelectedIndex = selectedIndex; } } private void EmployerComboBox_SelectedIndexChanged(object sender, EventArgs e) { ComboBox comboBox = (ComboBox)sender; if (comboBox.SelectedItem != null) { int employerId = Convert.ToInt32(comboBox.SelectedValue); if (!employerId.Equals(_employerId)) { _employerId = employerId; _employerName = comboBox.Text; SetDataPath(); // Raise event. this.ChangeEmployer(); } } } void FormMain_EmployerChanged(object sender, EmployerArgs employerArgs) { Console.WriteLine("Change: " + employerArgs.EmployerId().ToString()); } private void SetDataPath() { DataSetDL.DataTableEmployerRow employerRow = DlDataSet.DataTableEmployer.FindById(_employerId); if (employerRow.IsPdfPasswordNull()) { _pdfPassword = string.Empty; } else { _pdfPassword = employerRow.PdfPassword.Trim(); } _dataPath = Path.Combine(_execPath, employerRow.DataPath); } private void EmployeeButton_Click(object sender, EventArgs e) { if (EmployeeForm == null) { EmployeeForm = new FormEmployee(); EmployeeForm.Show(); EmployeeForm.FormClosed += new FormClosedEventHandler(EmployeeForm_FormClosed); } else { EmployeeForm.Focus(); } } private void EmployeeForm_FormClosed(object sender, FormClosedEventArgs e) { EmployeeForm = null; SaveData(); } private void SaveData() { this.DlDataSet.WriteXml(_dataBaseFile); } } // Custom attributes. public class EmployerArgs : System.EventArgs { private int employerId = 0; private string employerName = String.Empty; private string pdfPassword = String.Empty; private string dataPath = String.Empty; public EmployerArgs(int id, string name, string password, string path) { this.employerId = id; this.employerName = name; this.pdfPassword = password; this.dataPath = path; } public int EmployerId() { return employerId; } public string EmployerName() { return employerName; } public string PdfPassword() { return pdfPassword; } public string DataPath() { return dataPath; } } } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace DLMail { public partial class FormEmployee : Form { private string _dataBaseFile; private int _employerId; public FormEmployee() { InitializeComponent(); InitializeDataSet(); } private void InitializeDataSet() { FormMain formMain = (FormMain)Application.OpenForms[0]; _dataBaseFile = formMain.DataBaseFile; _employerId = formMain.EmployerId; this.dataSetDL = formMain.DlDataSet; ChangeEmployer(); formMain.EmployerChanged += new FormMain.ChangingHandler(formMain_EmployerChanged); } void formMain_EmployerChanged(object sender, EmployerArgs formArgs) { _employerId = formArgs.EmployerId(); ChangeEmployer(); } private void ChangeEmployer() { string filter = String.Empty; // Select only employees of the selected employer. filter = "EmployerId = " + _employerId.ToString(); this.dataTableEmployeeBindingSource.Filter = filter; this.dataTableEmployeeBindingSource.DataSource = this.dataSetDL; } } } /gustav >>> jwcolby at colbyconsulting.com 25-01-2010 17:50:02 >>> Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. From shamil at smsconsulting.spb.ru Mon Jan 25 23:53:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 08:53:09 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7 Ultimate 64 bit Message-ID: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil From shamil at smsconsulting.spb.ru Tue Jan 26 00:20:46 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 09:20:46 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <002601ca9e4f$b3f6a050$1be3e0f0$@spb.ru> John -- As I noted my sample code was one of myriads possible variants - below it yet another one - just a sample. As for setting form controls' properties you have to use .InvokeRequired and .Invoke to check calling context and to properly set controls' properties - you can google/bing for such samples of wait here for some to appear in this or related threads. Thank you. -- Shamil P.S. using System; // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount ; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } // front-end namespace ConsoleApplication { class Program { static void Main(string[] args) { My.BusinessLayerClassLib.SpRunnerManager runner = new My.BusinessLayerClassLib.SpRunnerManager(); runner.StatusReport += new EventHandler(statusReport); runner.Run(); } private static void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { System.Console.WriteLine("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); } } } __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From bill_patten at embarqmail.com Tue Jan 26 01:03:53 2010 From: bill_patten at embarqmail.com (Bill Patten) Date: Mon, 25 Jan 2010 23:03:53 -0800 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002101ca9e4b$d80b3770$8821a650$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? 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 Tue Jan 26 01:31:34 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 10:31:34 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: <002701ca9e59$97cd42d0$c767c870$@spb.ru> Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 02:20:36 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 11:20:36 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Hi Bill -- I have posted my sample test executable here: http://sms-web.biz/jet/64BIT.zip BTW, AFAIU the following trick should help to run this sample app on 64bit system: http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? 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 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 03:14:14 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 12:14:14 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <002e01ca9e67$ef1aede0$cd50c9a0$@spb.ru> HI All -- Here is some information I collected related to the subject of this thread: Running .NET Apps in 32-bit mode on 64-bit Windows http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx 64 Bit Windows, IIS, and Microsoft Access (part 1 of 2) http://www.insideria.com/2009/09/64-bit-windows-iis-and-microso.html http://www.insideria.com/2009/09/64-bit-windows-iis-and-microso-1.html Microsoft Data Access Components (MDAC) 2.8 http://www.microsoft.com/downloads/details.aspx?familyid=6C050FE3-C795-4B7D- B037-185D0506396C&displaylang=en How to obtain the latest (SP8) service pack for the Microsoft Jet 4.0 Database Engine http://support.microsoft.com/kb/239114/en Microsoft Jet Database Engine http://en.wikipedia.org/wiki/Microsoft_Jet_Database_Engine Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, January 26, 2010 11:21 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Bill -- I have posted my sample test executable here: http://sms-web.biz/jet/64BIT.zip BTW, AFAIU the following trick should help to run this sample app on 64bit system: http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill <<< snip >>> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Tue Jan 26 06:16:00 2010 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 26 Jan 2010 12:16:00 +0000 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > From shamil at smsconsulting.spb.ru Tue Jan 26 08:10:39 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 17:10:39 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <003c01ca9e91$582840c0$0878c240$@spb.ru> Thank you, Mark, But did you have MS Jet 4.0 SP8 (and MDAC 2.8) installed on your system before you run my sample app? This PC costs here currently approx. 1000 euro or even more. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Tuesday, January 26, 2010 3:16 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > _______________________________________________ From shamil at smsconsulting.spb.ru Tue Jan 26 08:51:18 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 17:51:18 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <004301ca9e97$07026c10$15074430$@spb.ru> Hi Mark and all, I have posted another test here: http://sms-web.biz/jet/AnotherTest.zip It has Jet db communication within class library: - JetDbTest.ConsoleApp.exe - FE - JetDbTest.ClassLibrary.dll - classlib and it also has two versions of executables" - 1st - compiled for any CPU; - 2nd - compiled for x86 CPU - 32 bit Could you please test how that will work? Current hypothesis/expectation here are that: - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Tuesday, January 26, 2010 3:16 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From bill_patten at embarqmail.com Tue Jan 26 12:51:32 2010 From: bill_patten at embarqmail.com (Bill Patten) Date: Tue, 26 Jan 2010 10:51:32 -0800 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit In-Reply-To: <002701ca9e59$97cd42d0$c767c870$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002701ca9e59$97cd42d0$c767c870$@spb.ru> Message-ID: <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> Hi Shamil, I knew that when I offered to help I could get in over my head, I did. I did my best, but was not able to make the corFlag work, I'm sure it was me not the corflag. I saw that Mark was able to send you good information so hopefully that is what you needed. The x86 did work. I can send you the various log files if that will help you. As near as I can tell the computer parts comes out to about 1300 US. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 11:31 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows7Ultimate64 bit Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru _______________________________________________ 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 Tue Jan 26 10:00:33 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 19:00:33 +0300 Subject: [dba-VB] C#: Raising events (Part 2) In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004b01ca9ea0$b23193f0$1694bbd0$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke (Part 2) - you can put code from Part 1 and Part 1 into one code file replacing Program.cs in Console app, set references to System.Windows.Forms and System.Drawing and run it: // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } __________ Information from ESET NOD32 Antivirus, version of virus signature database 4807 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 09:59:29 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 18:59:29 +0300 Subject: [dba-VB] C#: Raising events (Part 1) In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004a01ca9ea0$8c5b2560$a5117020$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke (Part 1): using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsFormsApp { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new TestForm()); } } // TestForm Designer partial class TestForm { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.cmdTest = new System.Windows.Forms.Button(); this.txtTest = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // cmdTest // this.cmdTest.Location = new System.Drawing.Point(128, 205); this.cmdTest.Name = "cmdTest"; this.cmdTest.Size = new System.Drawing.Size(75, 23); this.cmdTest.TabIndex = 0; this.cmdTest.Text = "&Test"; this.cmdTest.UseVisualStyleBackColor = true; this.cmdTest.Click += new System.EventHandler(this.cmdTest_Click); // // txtTest // this.txtTest.Location = new System.Drawing.Point(12, 13); this.txtTest.Multiline = true; this.txtTest.Name = "txtTest"; this.txtTest.Size = new System.Drawing.Size(311, 175); this.txtTest.TabIndex = 1; // // TestForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(335, 240); this.Controls.Add(this.txtTest); this.Controls.Add(this.cmdTest); this.Name = "TestForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Test Form"; this.Load += new System.EventHandler(this.TestForm_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button cmdTest; private System.Windows.Forms.TextBox txtTest; } // TestForm Code Behind public partial class TestForm : Form { public TestForm() { InitializeComponent(); } private My.BusinessLayerClassLib.SpRunnerManager _runner; private void TestForm_Load(object sender, EventArgs e) { _runner = new My.BusinessLayerClassLib.SpRunnerManager(); _runner.StatusReport += new EventHandler(statusReport); } private void cmdTest_Click(object sender, EventArgs e) { txtTest.Text = null; _runner.Run(); } private void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { string message = string.Format("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); if (txtTest.InvokeRequired) { object[] args = { message }; this.Invoke(new logDelegate(log), args); } else log(message); } private delegate void logDelegate(string message); private void log(string message) { txtTest.Text = message + System.Environment.NewLine + txtTest.Text; } } } ...Continued in part 2.... From shamil at smsconsulting.spb.ru Tue Jan 26 09:16:55 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 18:16:55 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004901ca9e9a$99fbf920$cdf3eb60$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke: using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsFormsApp { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new TestForm()); } } // TestForm Designer partial class TestForm { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.cmdTest = new System.Windows.Forms.Button(); this.txtTest = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // cmdTest // this.cmdTest.Location = new System.Drawing.Point(128, 205); this.cmdTest.Name = "cmdTest"; this.cmdTest.Size = new System.Drawing.Size(75, 23); this.cmdTest.TabIndex = 0; this.cmdTest.Text = "&Test"; this.cmdTest.UseVisualStyleBackColor = true; this.cmdTest.Click += new System.EventHandler(this.cmdTest_Click); // // txtTest // this.txtTest.Location = new System.Drawing.Point(12, 13); this.txtTest.Multiline = true; this.txtTest.Name = "txtTest"; this.txtTest.Size = new System.Drawing.Size(311, 175); this.txtTest.TabIndex = 1; // // TestForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(335, 240); this.Controls.Add(this.txtTest); this.Controls.Add(this.cmdTest); this.Name = "TestForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Test Form"; this.Load += new System.EventHandler(this.TestForm_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button cmdTest; private System.Windows.Forms.TextBox txtTest; } // TestForm Code Behind public partial class TestForm : Form { public TestForm() { InitializeComponent(); } private My.BusinessLayerClassLib.SpRunnerManager _runner; private void TestForm_Load(object sender, EventArgs e) { _runner = new My.BusinessLayerClassLib.SpRunnerManager(); _runner.StatusReport += new EventHandler(statusReport); } private void cmdTest_Click(object sender, EventArgs e) { txtTest.Text = null; _runner.Run(); } private void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { string message = string.Format("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); if (txtTest.InvokeRequired) { object[] args = { message }; this.Invoke(new logDelegate(log), args); } else log(message); } private delegate void logDelegate(string message); private void log(string message) { txtTest.Text = message + System.Environment.NewLine + txtTest.Text; } } } // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } From marklbreen at gmail.com Tue Jan 26 16:54:00 2010 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 26 Jan 2010 22:54:00 +0000 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> Message-ID: Sorry for delay, it was held up due to size of message, I have truncated it here. Mark ---------- Forwarded message ---------- From: Mark Breen Date: 2010/1/26 Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit To: "Discussion concerning Visual Basic and related programming issues." < dba-vb at databaseadvisors.com> Hello Shamil, see below for results of tests, I only need to run it against, JetDbTest.ConsoleApp.exe I did not run against dll file 32 bit file worked well without corflag, - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. thanks Mark ======================= Here is result of x86 with no corflags ran ======================= LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:07:47 - Select test started. LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:07:47 - Select test finished. LOG: 26/01/2010 16:07:47 - Insert test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Insert test finished. LOG: 26/01/2010 16:07:47 - Update test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Update test finished. LOG: 26/01/2010 16:07:47 - Delete test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Delete test finished. LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ======================= Here is msg after running corflags ======================= C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\Cor Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\AnotherTest\AnyCPU>pause Press any key to continue . . . ======================= Here is good result for AnyCPU after running coreflags ======================= LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:10:50 - Select test started. LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:10:50 - Select test finished. LOG: 26/01/2010 16:10:50 - Insert test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Insert test finished. LOG: 26/01/2010 16:10:50 - Update test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Update test finished. LOG: 26/01/2010 16:10:50 - Delete test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Delete test finished. LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... From shamil at smsconsulting.spb.ru Wed Jan 27 00:25:55 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 09:25:55 +0300 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> Message-ID: <009401ca9f19$97189590$c549c0b0$@spb.ru> Hi Mark -- Thank you for your testing. Here is the final test set with sources - it would take a couple of minutes to download, unzip and run: http://sms-web.biz/jet/FinalTest.zip It has - 1) AnyCPU - AnyCPU build as it's made by VS2008; - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using CorFlags.exe; - 4) x86 - x86 32bit build. It's expected (after your two rounds of tests) that now (1) will fail, and (2),(3) and (4) will run OK. BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system after setup, or was that installed with MS Windows SDK you have there? Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Wednesday, January 27, 2010 1:54 AM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Sorry for delay, it was held up due to size of message, I have truncated it here. Mark ---------- Forwarded message ---------- From: Mark Breen Date: 2010/1/26 Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit To: "Discussion concerning Visual Basic and related programming issues." < dba-vb at databaseadvisors.com> Hello Shamil, see below for results of tests, I only need to run it against, JetDbTest.ConsoleApp.exe I did not run against dll file 32 bit file worked well without corflag, - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. thanks Mark ======================= Here is result of x86 with no corflags ran ======================= LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:07:47 - Select test started. LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:07:47 - Select test finished. LOG: 26/01/2010 16:07:47 - Insert test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Insert test finished. LOG: 26/01/2010 16:07:47 - Update test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Update test finished. LOG: 26/01/2010 16:07:47 - Delete test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Delete test finished. LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ======================= Here is msg after running corflags ======================= C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\Cor Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\AnotherTest\AnyCPU>pause Press any key to continue . . . ======================= Here is good result for AnyCPU after running coreflags ======================= LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:10:50 - Select test started. LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:10:50 - Select test finished. LOG: 26/01/2010 16:10:50 - Insert test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Insert test finished. LOG: 26/01/2010 16:10:50 - Update test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Update test finished. LOG: 26/01/2010 16:10:50 - Delete test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Delete test finished. LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... _______________________________________________ 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 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Wed Jan 27 00:58:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 09:58:09 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit In-Reply-To: <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002701ca9e59$97cd42d0$c767c870$@spb.ru> <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> Message-ID: <009a01ca9f1e$16fa5420$44eefc60$@spb.ru> Thank you for your help, Bill. Yes, Mark's tests did answer my questions. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 9:52 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit Hi Shamil, I knew that when I offered to help I could get in over my head, I did. I did my best, but was not able to make the corFlag work, I'm sure it was me not the corflag. I saw that Mark was able to send you good information so hopefully that is what you needed. The x86 did work. I can send you the various log files if that will help you. As near as I can tell the computer parts comes out to about 1300 US. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 11:31 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows7Ultimate64 bit Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Wed Jan 27 06:23:02 2010 From: marklbreen at gmail.com (Mark Breen) Date: Wed, 27 Jan 2010 12:23:02 +0000 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <009401ca9f19$97189590$c549c0b0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> <009401ca9f19$97189590$c549c0b0$@spb.ru> Message-ID: Hello Shamil, All assumptions below are correct. Additionally, when I ran the same routines on any CPU, it worked again, as expected. Not sure what is meant by the following, or how to check? >BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system >after setup, or was that installed with MS Windows SDK you have there? Office 07 is on this box now, but it was on before I started. Do you want me to check something further? thanks Mark 2010/1/27 Shamil Salakhetdinov > Hi Mark -- > > Thank you for your testing. > > Here is the final test set with sources - it would take a couple of minutes > to download, unzip and run: > > http://sms-web.biz/jet/FinalTest.zip > > It has > > - 1) AnyCPU - AnyCPU build as it's made by VS2008; > - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; > - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using > CorFlags.exe; > - 4) x86 - x86 32bit build. > > It's expected (after your two rounds of tests) that now (1) will fail, and > (2),(3) and (4) will run OK. > > BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system > after setup, or was that installed with MS Windows SDK you have there? > > Thank you. > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Wednesday, January 27, 2010 1:54 AM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on > Windows 7Ultimate 64 bit > > Sorry for delay, > > it was held up due to size of message, I have truncated it here. > > Mark > > ---------- Forwarded message ---------- > From: Mark Breen > Date: 2010/1/26 > Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on > Windows > 7Ultimate 64 bit > To: "Discussion concerning Visual Basic and related programming issues." < > dba-vb at databaseadvisors.com> > > > Hello Shamil, > > see below for results of tests, > > I only need to run it against, JetDbTest.ConsoleApp.exe I did not run > against dll file > > 32 bit file worked well without corflag, > > - first one (any CPU) will need to use CorFlags.EXE run against at least > JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and > JetDbTest.ClassLibrary.dll; > > - and second one should run OK "out-of-the-box" on your system as it was > compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 > OLE DB 32bit Drivers already installed. > > > thanks > > Mark > > > > ======================= > Here is result of x86 with no corflags ran > ======================= > > > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:07:47 - Select test started. > LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:07:47 - Select test finished. > LOG: 26/01/2010 16:07:47 - Insert test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Insert test finished. > LOG: 26/01/2010 16:07:47 - Update test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Update test finished. > LOG: 26/01/2010 16:07:47 - Delete test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Delete test finished. > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > > ======================= > Here is msg after running corflags > ======================= > > > C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft > SDKs\Windows\v6.0A\Bin\x64\Cor > Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ > Microsoft (R) .NET Framework CorFlags Conversion Tool. Version > 3.5.21022.8 > Copyright (c) Microsoft Corporation. All rights reserved. > > > C:\AnotherTest\AnyCPU>pause > Press any key to continue . . . > > > ======================= > Here is good result for AnyCPU after running coreflags > ======================= > > > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:10:50 - Select test started. > LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:10:50 - Select test finished. > LOG: 26/01/2010 16:10:50 - Insert test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Insert test finished. > LOG: 26/01/2010 16:10:50 - Update test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Update test finished. > LOG: 26/01/2010 16:10:50 - Delete test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Delete test finished. > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > _______________________________________________ > 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 4808 (20100126) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.esetnod32.ru > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature > database 4808 (20100126) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.esetnod32.ru > > > _______________________________________________ > 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 Jan 27 08:37:30 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 17:37:30 +0300 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> <009401ca9f19$97189590$c549c0b0$@spb.ru> Message-ID: <00ee01ca9f5e$429602b0$c7c20810$@spb.ru> Hello Mark -- Thank you. No, no need to check anything else further. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Wednesday, January 27, 2010 3:23 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hello Shamil, All assumptions below are correct. Additionally, when I ran the same routines on any CPU, it worked again, as expected. Not sure what is meant by the following, or how to check? >BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system >after setup, or was that installed with MS Windows SDK you have there? Office 07 is on this box now, but it was on before I started. Do you want me to check something further? thanks Mark 2010/1/27 Shamil Salakhetdinov > Hi Mark -- > > Thank you for your testing. > > Here is the final test set with sources - it would take a couple of minutes > to download, unzip and run: > > http://sms-web.biz/jet/FinalTest.zip > > It has > > - 1) AnyCPU - AnyCPU build as it's made by VS2008; > - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; > - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using > CorFlags.exe; > - 4) x86 - x86 32bit build. > > It's expected (after your two rounds of tests) that now (1) will fail, and > (2),(3) and (4) will run OK. > > BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system > after setup, or was that installed with MS Windows SDK you have there? > > Thank you. > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Wednesday, January 27, 2010 1:54 AM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on > Windows 7Ultimate 64 bit > > Sorry for delay, > > it was held up due to size of message, I have truncated it here. > > Mark > > ---------- Forwarded message ---------- > From: Mark Breen > Date: 2010/1/26 > Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on > Windows > 7Ultimate 64 bit > To: "Discussion concerning Visual Basic and related programming issues." < > dba-vb at databaseadvisors.com> > > > Hello Shamil, > > see below for results of tests, > > I only need to run it against, JetDbTest.ConsoleApp.exe I did not run > against dll file > > 32 bit file worked well without corflag, > > - first one (any CPU) will need to use CorFlags.EXE run against at least > JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and > JetDbTest.ClassLibrary.dll; > > - and second one should run OK "out-of-the-box" on your system as it was > compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 > OLE DB 32bit Drivers already installed. > > > thanks > > Mark > > > > ======================= > Here is result of x86 with no corflags ran > ======================= > > > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:07:47 - Select test started. > LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:07:47 - Select test finished. > LOG: 26/01/2010 16:07:47 - Insert test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Insert test finished. > LOG: 26/01/2010 16:07:47 - Update test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Update test finished. > LOG: 26/01/2010 16:07:47 - Delete test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Delete test finished. > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > > ======================= > Here is msg after running corflags > ======================= > > > C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft > SDKs\Windows\v6.0A\Bin\x64\Cor > Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ > Microsoft (R) .NET Framework CorFlags Conversion Tool. Version > 3.5.21022.8 > Copyright (c) Microsoft Corporation. All rights reserved. > > > C:\AnotherTest\AnyCPU>pause > Press any key to continue . . . > > > ======================= > Here is good result for AnyCPU after running coreflags > ======================= > > > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:10:50 - Select test started. > LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:10:50 - Select test finished. > LOG: 26/01/2010 16:10:50 - Insert test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Insert test finished. > LOG: 26/01/2010 16:10:50 - Update test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Update test finished. > LOG: 26/01/2010 16:10:50 - Delete test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Delete test finished. > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > _______________________________________________ > 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 4810 (20100127) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Thu Jan 28 04:09:57 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 28 Jan 2010 13:09:57 +0300 Subject: [dba-VB] FYI: The mind just simply can't comprehend Message-ID: <016f01caa002$0caddca0$260995e0$@spb.ru> Hi All, Just wanted to share one interesting weblog entry and my opinion/experience on it - the subject line is taken from the following Sara Ford's weblog entry: "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m anage-an-agile-team-after-6-years-of-waterfall.aspx "The mind just simply can't comprehend" - this is what happens with every(?) experienced developer's mind used to develop and debug their software via long running (heavy) debug sessions as well as with "waterfallish" PMs - the mind of experienced in "doing it other way" developers and managers just can't comprehend how Test Driven Development can results in robust "bullet proof" software usually developed with a lot less pressure and stress - and (sic!) with higher quality, adaptability to the future changes, agility. That's a long way to get one's mind starting to really comprehend what happens when you take that route - the sooner you'll start following it - the better for your business. Thank you. -- Shamil From max.wanadoo at gmail.com Thu Jan 28 04:30:45 2010 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 28 Jan 2010 10:30:45 +0000 Subject: [dba-VB] FYI: The mind just simply can't comprehend In-Reply-To: <016f01caa002$0caddca0$260995e0$@spb.ru> References: <016f01caa002$0caddca0$260995e0$@spb.ru> Message-ID: Shamil, to write lenghty blogs like that simply tells me that she has too much time on her hands. that could all be precised down to a paragraph. max On 28/01/2010, Shamil Salakhetdinov wrote: > Hi All, > > > > Just wanted to share one interesting weblog entry and my opinion/experience > on it - the subject line is taken from the following Sara Ford's weblog > entry: > > > > "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" > > http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m > anage-an-agile-team-after-6-years-of-waterfall.aspx > > > > "The mind just simply can't comprehend" - this is what happens with every(?) > experienced developer's mind used to develop and debug their software via > long running (heavy) debug sessions as well as with "waterfallish" PMs - the > mind of experienced in "doing it other way" developers and managers just > can't comprehend how Test Driven Development can results in robust "bullet > proof" software usually developed with a lot less pressure and stress - and > (sic!) with higher quality, adaptability to the future changes, agility. > > > > That's a long way to get one's mind starting to really comprehend what > happens when you take that route - the sooner you'll start following it - > the better for your business. > > > > 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 Thu Jan 28 04:45:22 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 28 Jan 2010 13:45:22 +0300 Subject: [dba-VB] FYI: The mind just simply can't comprehend In-Reply-To: References: <016f01caa002$0caddca0$260995e0$@spb.ru> Message-ID: <017401caa006$ff2f7a70$fd8e6f50$@spb.ru> Max, She probably writes that blog in her spare time "just for fun" as we do post here? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Thursday, January 28, 2010 1:31 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] FYI: The mind just simply can't comprehend Shamil, to write lenghty blogs like that simply tells me that she has too much time on her hands. that could all be precised down to a paragraph. max On 28/01/2010, Shamil Salakhetdinov wrote: > Hi All, > > > > Just wanted to share one interesting weblog entry and my opinion/experience > on it - the subject line is taken from the following Sara Ford's weblog > entry: > > > > "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" > > http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m > anage-an-agile-team-after-6-years-of-waterfall.aspx > > > > "The mind just simply can't comprehend" - this is what happens with every(?) > experienced developer's mind used to develop and debug their software via > long running (heavy) debug sessions as well as with "waterfallish" PMs - the > mind of experienced in "doing it other way" developers and managers just > can't comprehend how Test Driven Development can results in robust "bullet > proof" software usually developed with a lot less pressure and stress - and > (sic!) with higher quality, adaptability to the future changes, agility. > > > > That's a long way to get one's mind starting to really comprehend what > happens when you take that route - the sooner you'll start following it - > the better for your business. > > > > Thank you. > > > > -- > > Shamil > > > __________ Information from ESET NOD32 Antivirus, version of virus signature database 4813 (20100128) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Sat Jan 30 06:20:08 2010 From: marklbreen at gmail.com (Mark Breen) Date: Sat, 30 Jan 2010 12:20:08 +0000 Subject: [dba-VB] [AccessD] C# automation of office In-Reply-To: <4B59EA1D.1080700@colbyconsulting.com> References: <4B59EA1D.1080700@colbyconsulting.com> Message-ID: Hello John, Sorry this is late in coming, the following code is take from a live project of mine where we write to Excel from VS2008. I have snipped sections of code from one routine, and I have highlighted with my comments the five seperate bits I have given you, each bit is only a few lines of code, but they may be all you need to get Excel talking. I hope the code formats ok here, if not, let me know and I will send you a text file. Note a few things below 1) you can insert comments easily 2) you can insert columns easily 3) selecting a range if often the first step to performing an action HINT: Record a macro in Excel to add color and then you will have the code to do that from within C# thanks Mark // This bit shows the using statements you will need using Microsoft.Office.Interop.Excel; using Microsoft.Office.Tools.Excel; // This bit shows how to op an connection to Excel if (grdParts.RowCount > 0) { if (MessageBox.Show("Export Master Parts List?", "Export", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == (DialogResult.Yes)) { this.Cursor = Cursors.WaitCursor; Int32 intPos = bsParts.Position; try { if (SaveChanges()) { Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook xlWB = xlApp.Workbooks.Add(XlWBATemplate.xlWBATWorksheet); Microsoft.Office.Interop.Excel.Worksheet xlWS = (Microsoft.Office.Interop.Excel.Worksheet)xlWB.Worksheets[1]; xlApp.Visible = true; xlWS.Cells[2, 6] = "Parts List "; xlWS.Cells[3, 6] = "Date " + DateTime.Now.ToLongDateString(); // This bit shows how to write comments to excel Microsoft.Office.Interop.Excel.Range nRange; nRange = (Microsoft.Office.Interop.Excel.Range)xlWS.Cells[intRowIndex + intRowIncrement, intColumnIndex - 11]; nRange.AddComment(strFullComments.Replace("\r", "")); nRange.Comment.Shape.TextFrame.AutoSize = true; // This but shows how to insert a column Range rng = (Range)xlWS.Cells[1,2]; Range column = rng.EntireColumn; column.Insert(XlInsertShiftDirection.xlShiftToRight, false); column.Insert(XlInsertShiftDirection.xlShiftToRight, false); // this bit shows how to save the sheet String strFileName = "C:\\McAfee Prd Report_" + DateTime.Now.ToLongDateString() + "-" + DateTime.Now.ToLongTimeString().Replace(":", "") + ".xls"; xlWS.SaveAs(strFileName, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); On 22 January 2010 18:10, jwcolby wrote: > Does anyone have a good information source for automating office > (specifically Excel) from C#? > > I have a spreadsheet which has code inside of it which pulls data out of > SQL Server and dumps it > into pages of the spreadsheet. I WAS using Access to do this but my Office > 2007 install broke my > forms (event properties no longer wire to the code behind form). Thus from > C# I need to cause a > spreadsheet to open, call a method of the code and pass a server / database > string to it. > > Any help will be greatly appreciated. > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Mon Jan 4 11:05:56 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 04 Jan 2010 12:05:56 -0500 Subject: [dba-VB] Version control Message-ID: <4B421FF4.2040003@colbyconsulting.com> What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- John W. Colby www.ColbyConsulting.com From Gustav at cactus.dk Mon Jan 4 11:53:41 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jan 2010 18:53:41 +0100 Subject: [dba-VB] Version control Message-ID: Hi John Those of us, including you, who attend the Northwind.NET project (Shamil's SCRUM project) obtained a developer license for VisualSVN: Hi Gustav, Here is the VisualSVN license for Northwind.NET project. You can forward this license key to all members of your project but please don't distribute it outside of the project team. -------------------------------------------------- -------------------------------------------------- If you like to provide a reference to VisualSVN on your web site please get the logo at http://www.visualsvn.com/company/logos. Good luck with your project :) -- Regards, Olga Dolidze VisualSVN Support I have planed to set up the server for this (free) server for VisualSVN but I haven't had the server capacity until recently: http://www.visualsvn.com/server/ Should be piece of cake ... /gustav >>> jwcolby at colbyconsulting.com 04-01-2010 18:05 >>> What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Jan 4 12:45:40 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 4 Jan 2010 12:45:40 -0600 Subject: [dba-VB] Version control In-Reply-To: <4B421FF4.2040003@colbyconsulting.com> References: <4B421FF4.2040003@colbyconsulting.com> Message-ID: We just switched to SourceGear's Vault. It is an easy transition from SourceSafe and has some very nice features. The only thing I've found it lacking is the sourcesafe properties from the VS Files submenu. Have to go to VaultClient to see the links. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 04, 2010 9:06 AM To: VBA Subject: [dba-VB] Version control What do you guys use, how easy is it, how long does it take to set up, any words of caution / advice? TIA, -- 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 Tue Jan 5 09:57:35 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jan 2010 10:57:35 -0500 Subject: [dba-VB] Microsoft partner Message-ID: <4B43616F.5050509@colbyconsulting.com> I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- John W. Colby www.ColbyConsulting.com From garykjos at gmail.com Tue Jan 5 10:26:52 2010 From: garykjos at gmail.com (Gary Kjos) Date: Tue, 5 Jan 2010 10:26:52 -0600 Subject: [dba-VB] [dba-SQLServer] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> References: <4B43616F.5050509@colbyconsulting.com> Message-ID: I'm a Microsoft partner on my own too. Had to come up with a company name the last time. Gary Kjos Consulting Services. I guess I would be interested in at least looking at the idea of combining with some DBA people. GK On Tue, Jan 5, 2010 at 9:57 AM, jwcolby wrote: > I am getting calls from Microsoft re my partnership. ?The caller today gave me a free certificate > for a training course on server virtualization. ?It is for the Server 2008 Hyper V virtualization > stuff. ?I just clicked through to see what it is and it looks interesting. ?This is the only > certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to > convince me how valuable my membership is. ?My membership is expiring this month. > > If you have a membership and are interested in such stuff, you might want to call and ask if you are > eligible for this. > > BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of > obtaining the credentials for partner companies, please speak up. ?As a "sole proprietor" it is > difficult for me to get enough of these credentials to qualify. ?However I am told that we as a > group could form a virtual organization and do this. ?Each member would need to get one (or more) > credentials, then we would need to band together and present as an organization. > > It might be worth doing. > > -- > John W. Colby > www.ColbyConsulting.com > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- Gary Kjos garykjos at gmail.com From mmattys at rochester.rr.com Tue Jan 5 10:39:49 2010 From: mmattys at rochester.rr.com (Michael R Mattys) Date: Tue, 5 Jan 2010 11:39:49 -0500 Subject: [dba-VB] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> Message-ID: Hi John, My brother and I are looking for such opportunities also. So ... count us in. Let us know what information will be required. Michael R Mattys Business Process Developers www.mattysconsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of jwcolby Sent: Tuesday, January 05, 2010 10:58 AM To: Access Developers discussion and problem solving; VBA; Dba-Sqlserver Subject: [dba-VB] Microsoft partner I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- 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 shamil at smsconsulting.spb.ru Tue Jan 5 11:01:49 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 5 Jan 2010 20:01:49 +0300 Subject: [dba-VB] Microsoft partner In-Reply-To: <4B43616F.5050509@colbyconsulting.com> References: <4B43616F.5050509@colbyconsulting.com> Message-ID: <000901ca8e28$c742cbc0$55c86340$@spb.ru> Hi John -- I would be interested to join such a virtual organization (if it could be international) to get MS Partner Status: I'm MCP, MCAD.NET and MCSD.NET. As far as I know MS Partner Status lets to purchase MSDN Prof. subscription (5 licenses?) for about USD400-500? - I'd be interested to participate in sharing of the costs of such MSDN subscription... Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, January 05, 2010 6:58 PM To: Access Developers discussion and problem solving; VBA; Dba-Sqlserver Subject: [dba-VB] Microsoft partner I am getting calls from Microsoft re my partnership. The caller today gave me a free certificate for a training course on server virtualization. It is for the Server 2008 Hyper V virtualization stuff. I just clicked through to see what it is and it looks interesting. This is the only certificate they are giving away today, not sure WHY they are giving it to me, other than perhaps to convince me how valuable my membership is. My membership is expiring this month. If you have a membership and are interested in such stuff, you might want to call and ask if you are eligible for this. BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- 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 __________ Information from ESET NOD32 Antivirus, version of virus signature database 4745 (20100105) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4745 (20100105) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 5 17:15:22 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 6 Jan 2010 02:15:22 +0300 Subject: [dba-VB] SCRUM/Agile Teamwork: The Leadership - Self-management Dilemma Message-ID: <000901ca8e5c$f62b2ac0$e2818040$@spb.ru> Hi All - I suppose the subject article is one of the best on Agile Teamwork I've ever read - the best in fact IMO: http://www.infoq.com/articles/agile-teamwork;jsessionid=F3CDBBECDB2B79035FC5 F417CE5757B8 I went through a free quiz/questionnaire they handle to evaluate Agile Teams: http://quiz.brightgreenprojects.com/agile_team_report And I have got the following results as I perceived them for our Northwind.NET agile teamwork project: ==== 75% - Advising team performance factor. 91% - Innovating team performance factor. 83% - Promoting team performance factor. 91% - Developing team performance factor. 58% - Organizing team performance factor. 83% - Producing team performance factor. 75% - Inspecting team performance factor. 85% - Maintaining team performance factor. You scored over 80% for the Linking team performance factor. ==== If your score on all sectors is over 80% then you consider your agile team to be well on the way to high performance. If your score is in the range 60-80% for all sectors then your team is probably doing some things well but there is definite scope for improvement. If your score on any sector is below 50% then this is an area where your team can make substantial improvements to the way it is working. These sectors should be an immediate development priority for your team. === It would be interesting to get results of your passing through this quiz to find out how well our results will correlate. Not urgent. Thank you. -- Shamil From Gustav at cactus.dk Wed Jan 6 02:33:20 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jan 2010 09:33:20 +0100 Subject: [dba-VB] Microsoft partner Message-ID: Hi John and the Board of Directors Could such an organisation be Database Advisors Inc? /gustav >>> jwcolby at colbyconsulting.com 05-01-2010 16:57 >>> BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is difficult for me to get enough of these credentials to qualify. However I am told that we as a group could form a virtual organization and do this. Each member would need to get one (or more) credentials, then we would need to band together and present as an organization. It might be worth doing. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Wed Jan 6 06:54:32 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 07:54:32 -0500 Subject: [dba-VB] Microsoft partner In-Reply-To: References: Message-ID: <4B448808.8050401@colbyconsulting.com> It could be. There are pros and cons from Database Advisor's perspective. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi John and the Board of Directors > > Could such an organisation be Database Advisors Inc? > > /gustav > > >>>> jwcolby at colbyconsulting.com 05-01-2010 16:57 >>> > > BTW, if anyone receiving this is interested in forming a virtual organization for the purpose of > obtaining the credentials for partner companies, please speak up. As a "sole proprietor" it is > difficult for me to get enough of these credentials to qualify. However I am told that we as a > group could form a virtual organization and do this. Each member would need to get one (or more) > credentials, then we would need to band together and present as an organization. > > It might be worth doing. > From jwcolby at colbyconsulting.com Wed Jan 6 07:28:11 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 08:28:11 -0500 Subject: [dba-VB] [AccessD] Microsoft partner In-Reply-To: <034a01ca8e5a$131eb1e0$0701a8c0@MSIMMSWS> References: <4B43616F.5050509@colbyconsulting.com> <034a01ca8e5a$131eb1e0$0701a8c0@MSIMMSWS> Message-ID: <4B448FEB.70602@colbyconsulting.com> Mark, Understand that I am NOT a very active "partner", in fact as far as I can tell I am more an "associate". I have never made any effort to do the qualifications etc. From what I can tell, for various reasons it is not a good idea to approach the "partnership" from a "how many referrals" angle. While MS does have a "referral" process, if you are going to pursue the partnership it would probably work best to approach it from a "what can I learn" and "what software can I get" all for a reduced price. If you ever get any referrals that is a bonus. All of that said with the understanding that I am not really active in their program. I would like to be, but more in order to get trained up a little. There are areas that I would like to know more about. Personally, I have never had much use for Microsoft's "credentials", but many people do get them. I have always been about "what do I know" more than "what strings of characters can I put after my name". OTOH if I had spent 10 years getting a "doctor" title that would probably be important to me. In terms of my proposal however I think forming a "virtual consulting company" would be about referrals, however the referrals would likely come from other members of the company. If there are 10 guys from this list, we would undoubtedly have a wide range of backgrounds and expertise. If someone asks if I can do virtualization, I would be able to say "I'll get back to you" and go see if any of you are strong in that area. Or maybe even have a spreadsheet or word document that would tell me "Member XYZ claims to be an 'expert' in these areas". That kind of thing. AND... those "strings of characters" are important to some clients. Thus being able to put a whole string of Microsoft credentials on my web site might attract business. I would not necessarily perform the work, it might go to another partner in the company. More and more, where you live affects your ability to perform your work very little. We can remote in to do programming, database design or maintenance and so forth. If you don't have to physically touch something then it can often be done remotely. A "virtual" company consisting of highly skilled people scattered around the world could work well. John W. Colby www.ColbyConsulting.com Mark Simms wrote: > John - I'm just kind of curious about the MSFT Partnership program.... > Do you get any decent leads or referals from them ? > > > From jwcolby at colbyconsulting.com Wed Jan 6 07:31:38 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jan 2010 08:31:38 -0500 Subject: [dba-VB] Transfer database schema objects and data to another server/database with SMO Message-ID: <4B4490BA.6050006@colbyconsulting.com> http://www.mssqltips.com/tip.asp?tip=1910&home -- John W. Colby www.ColbyConsulting.com From marklbreen at gmail.com Fri Jan 15 03:16:44 2010 From: marklbreen at gmail.com (Mark Breen) Date: Fri, 15 Jan 2010 09:16:44 +0000 Subject: [dba-VB] Django Anyone? Message-ID: Hello All, I recently heard about a framework named Django. As some that is only really a MS person, and little exposure to outside that world, has anyone any experience of this project? Any feedback or reviews? Does anyone have a perspective on how, or on which levels it compares to DotNetNuke (VB.Net)? http://www.djangoproject.com/ http://docs.djangoproject.com/en/dev/intro/overview/ I took the opinion that the vb list is for programmers and that this is programming related, hope that is OK? thanks Mark From DWUTKA at Marlow.com Fri Jan 15 12:40:25 2010 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 15 Jan 2010 12:40:25 -0600 Subject: [dba-VB] VB 6 quirk In-Reply-To: References: Message-ID: Ok, I'm sure not many of you are using VB 6 anymore. I really don't develop much anymore myself. However, I have a user that is running into a quirk with Adobe. It's a form pdf, that creates an XFDF extension. Inside this 'data file' (that she receives in email), it's got a tag that shows a full URL of what the user used to view the pdf form. This is an http://.... URL. On her full version of Acrobat, it has a problem dealing with the URLs, it just keeps prompting if you want to allow access to http://... Now, if you go into that .xfdf data file, and just change that href property to the actual network path (\\server\share\...), then it opens just fine. It seems that Acrobat Reader is adding the URL on the end users end, so it's not something we can fix in the pdf form. (At least we can't find a property to do so). Since it's a pretty simple fix to change the URL to the UNC path, I figured I'd whip up a little VB program to do that. Did that, piece of cake. Wanted to make it an 'invisible process', by having the program just monitor a folder where she could save these emailed .xfdf data files too. When a new file is added to the monitored folder, it does it's job, and saves the new file as 'converted_.....xfdf'. Program works like a charm..IN DEBUG mode. Compile it, and run it, and the CreateFile API which gets the handle to start the monitoring process kicks back a DLLError 998. Now, why would code work perfectly in debug mode, but not work in a compiled state. Here is my file monitoring class: The line 'If hDir=-1' is getting skipped in debug mode (because it's getting a valid handle), and in a compiled state, it dumps out the LastDllError as 998 (actually, it was doing 998, until I added the strPathToMonitor variable,a nd now it's doing 1305. I'm stumped. Anyone have any ideas? Option Explicit Event FileActivity(strFileName As String, Action As FS_File_Actions) Public PathToMonitor As String Dim blKeepMonitoring As Boolean Private Declare Function FS_CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long Private Declare Function FS_ReadDirChanges Lib "kernel32" Alias "ReadDirectoryChangesW" (ByVal hDir As Long, ByVal lpBuffer As Long, ByVal lenBuffer As Long, ByVal bWatchSubtree As Boolean, ByVal dwNotifyFilter As Long, ByRef dwBytesReturned As Long, ByVal lpOverLapped As Long, ByVal dwCallBack As Long) As Long Private Declare Function FS_CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Long) As Long Private Declare Function FS_CreateEvent Lib "kernel32" Alias "CreateEventA" (lpEventAttributes As Any, ByVal bManualReset As Long, ByVal bInitialState As Long, ByVal lpName As String) As Long Private Declare Function FS_ResetEvent Lib "kernel32" Alias "ResetEvent" (ByVal hEvent As Long) As Long Private Declare Sub FS_CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Long, ByVal Source As Long, ByVal Length As Long) Private Declare Function FS_WaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Private Const FILE_LIST_DIRECTORY = (&H1) Private Const FILE_SHARE_DELETE = &H4 Private Const FILE_SHARE_READ = &H1 Private Const FILE_SHARE_WRITE = &H2 Private Const OPEN_EXISTING = 3 Private Const FILE_FLAG_BACKUP_SEMANTICS = &H2000000 Private Const FILE_FLAG_OVERLAPPED = &H40000000 Private Const FILE_NOTIFY_CHANGE_ATTRIBUTES = &H4 Private Const FILE_NOTIFY_CHANGE_CREATION = &H40 Private Const FILE_NOTIFY_CHANGE_DIR_NAME = &H2 Private Const FILE_NOTIFY_CHANGE_FILE_NAME = &H1 Private Const FILE_NOTIFY_CHANGE_LAST_ACCESS = &H20 Private Const FILE_NOTIFY_CHANGE_LAST_WRITE = &H10 Private Const FILE_NOTIFY_CHANGE_SECURITY = &H100 Private Const FILE_NOTIFY_CHANGE_SIZE = &H8 Private Const WAIT_TIMEOUT = 258& Public Enum FS_File_Actions FILE_ACTION_ADDED = &H1 FILE_ACTION_MODIFIED = &H3 FILE_ACTION_REMOVED = &H2 FILE_ACTION_RENAMED_NEW_NAME = &H5 FILE_ACTION_RENAMED_OLD_NAME = &H4 End Enum Private Type FS_FILE_NOTIFY_INFORMATION NextEntryOffset As Long Action As FS_File_Actions FileNameLength As Long FileName(1024 - 1) As Byte End Type Private Type FS_OVERLAPPED Internal As Long InternalHigh As Long Offset As Long OffsetHigh As Long hEvent As Long End Type Public Function StartMonitoring() 'On Error GoTo ErrorHandler Dim hDir As Long Dim dwReturn As Long Dim intReturnSize As Long Dim ovr As FS_OVERLAPPED Dim hEvent As Long Dim intWatchFilter As Long Dim fni As FS_FILE_NOTIFY_INFORMATION Dim fniBuf(0 To 1024 * 5 - 1) As Byte Dim BufferPos As Long Dim strFileName As String Dim strPathToMonitor As String strPathToMonitor = PathToMonitor blKeepMonitoring = True intWatchFilter = FILE_NOTIFY_CHANGE_ATTRIBUTES + FILE_NOTIFY_CHANGE_CREATION + FILE_NOTIFY_CHANGE_DIR_NAME + FILE_NOTIFY_CHANGE_FILE_NAME + FILE_NOTIFY_CHANGE_LAST_ACCESS + FILE_NOTIFY_CHANGE_LAST_WRITE + FILE_NOTIFY_CHANGE_SECURITY + FILE_NOTIFY_CHANGE_SIZE hDir = FS_CreateFile(strPathToMonitor, FILE_LIST_DIRECTORY, FILE_SHARE_READ Or FILE_SHARE_DELETE Or FILE_SHARE_WRITE, Null, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS Or FILE_FLAG_OVERLAPPED, 0) If hDir = -1 Then MsgBox "Invalid Handle Value...Error: " & Err.LastDllError End If hEvent = FS_CreateEvent(0&, True, True, "FS_IOEvent") ovr.hEvent = hEvent dwReturn = FS_ReadDirChanges(hDir, VarPtr(fniBuf(0)), UBound(fniBuf) + 1, True, intWatchFilter, intReturnSize, VarPtr(ovr), 0&) If dwReturn = 0 Then MsgBox "Error Calling ReadDirChanges" MsgBox Err.LastDllError MsgBox ovr.hEvent MsgBox hDir End If Do Until blKeepMonitoring = False BufferPos = 0 dwReturn = FS_WaitForSingleObject(hEvent, 100) If dwReturn <> WAIT_TIMEOUT Then 'MsgBox fniBuf(0) FS_CopyMemory VarPtr(fni), VarPtr(fniBuf(BufferPos)), Len(fni) strFileName = fni.FileName strFileName = Left(strFileName, fni.FileNameLength / 2) RaiseEvent FileActivity(strFileName, fni.Action) While fni.NextEntryOffset <> 0 BufferPos = BufferPos + fni.NextEntryOffset FS_CopyMemory VarPtr(fni), VarPtr(fniBuf(BufferPos)), Len(fni) strFileName = fni.FileName strFileName = Left(strFileName, fni.FileNameLength / 2) RaiseEvent FileActivity(strFileName, fni.Action) Wend FS_ResetEvent hEvent dwReturn = FS_ReadDirChanges(hDir, VarPtr(fniBuf(0)), UBound(fniBuf) + 1, True, intWatchFilter, intReturnSize, VarPtr(ovr), 0&) End If DoEvents Loop ErrorHandler: FS_CloseHandle hEvent FS_CloseHandle hDir End Function Public Function StopMonitoring() blKeepMonitoring = False End Function Private Sub Class_Initialize() blKeepMonitoring = False End Sub The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From jwcolby at colbyconsulting.com Mon Jan 18 14:40:19 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jan 2010 15:40:19 -0500 Subject: [dba-VB] 2008 backup / restore scripts Message-ID: <4B54C733.5060006@colbyconsulting.com> I obtained a developer copy of SQL Server 2008, which has full backup / restore with compression if I understand correctly. I had been using Idera's SQL Safe free version but that is no longer free. Of course now all of my backups are locked away in a version of a program that I can no longer use. Free is only free until it's not, whereupon it is a liability. Sigh. Anyway... I am wondering if anyone has a stored procedure that will use the 2008 built-in backup to do a full backup with compression. I built a C# program to use the Idera scripts to do my backups and restores. I am hoping that I can get a similar native 2008 stored procedure that I can call to do the same thing. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Tue Jan 19 08:05:51 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 19 Jan 2010 09:05:51 -0500 Subject: [dba-VB] SQL Server: An interesting data load article Message-ID: <4B55BC3F.20304@colbyconsulting.com> http://msdn.microsoft.com/en-us/library/dd537533.aspx -- John W. Colby www.ColbyConsulting.com From davidmcafee at gmail.com Wed Jan 20 16:28:20 2010 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 20 Jan 2010 14:28:20 -0800 Subject: [dba-VB] VB.Net Wait for file to Download before launching Message-ID: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> Does anyone know how to do this? I have this program that checks for updates : If IsUpdateAvailable() Then DownloadUpdate() LaunchUpdateInstaller() LaunchApp() Else LaunchApp() End If The Update detection and Download work great: Private Sub DownloadUpdate() If Directory.Exists(InstallFilesPath) Then 'if the local path exists then check for the actual file If File.Exists(InstallFilesPath + InstallFile) Then 'Check to see if the new file is already installed 'Delete file File.Delete(InstallFilesPath + InstallFile) 'Then download it DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) Else ' If the source file can't be found, Download new copy DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If Else 'Directory did not exist, so create it and copy new file over Directory.CreateDirectory(InstallFilesPath) DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If End Sub Private Sub LaunchApp() 'This sub launches the actual Program System.Diagnostics.Process.Start(AppPath + AppName) End Sub The trouble is that it wants to run the LaunchApp() sub immediatley after calling the LaunchUpdateInstaller() sub. I was thinking of putting in a timer of some sort, but I was wondering if there is some quicker/better way of doing this. MTIA, David McAfee From cfoust at infostatsystems.com Wed Jan 20 17:26:52 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 20 Jan 2010 17:26:52 -0600 Subject: [dba-VB] VB.Net Wait for file to Download before launching In-Reply-To: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> References: <8786a4c01001201428w6ceb4b26u9481ad12c2f15f11@mail.gmail.com> Message-ID: You can use a small text file on the drive as a flag. Start it when you call the installer and then keep checking for it at intervals. When it's no longer there (the installer removes it), launch the application. Or you could do it the other way around and have the installer remove a file you create just before you call it. Charlotte -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Wednesday, January 20, 2010 2:28 PM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] VB.Net Wait for file to Download before launching Does anyone know how to do this? I have this program that checks for updates : If IsUpdateAvailable() Then DownloadUpdate() LaunchUpdateInstaller() LaunchApp() Else LaunchApp() End If The Update detection and Download work great: Private Sub DownloadUpdate() If Directory.Exists(InstallFilesPath) Then 'if the local path exists then check for the actual file If File.Exists(InstallFilesPath + InstallFile) Then 'Check to see if the new file is already installed 'Delete file File.Delete(InstallFilesPath + InstallFile) 'Then download it DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) Else ' If the source file can't be found, Download new copy DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If Else 'Directory did not exist, so create it and copy new file over Directory.CreateDirectory(InstallFilesPath) DownloadFile(NetPath + InstallFile, InstallFilesPath + InstallFile) End If End Sub Private Sub LaunchApp() 'This sub launches the actual Program System.Diagnostics.Process.Start(AppPath + AppName) End Sub The trouble is that it wants to run the LaunchApp() sub immediatley after calling the LaunchUpdateInstaller() sub. I was thinking of putting in a timer of some sort, but I was wondering if there is some quicker/better way of doing this. MTIA, David McAfee _______________________________________________ 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 Jan 21 06:52:16 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 21 Jan 2010 13:52:16 +0100 Subject: [dba-VB] Webcast: ADO.NET Entity Framework 4 Message-ID: Hi all Tour the Top 10 Treats in Entity Framework 4: http://www.oreillynet.com/pub/e/1517 by EF guru, Julie Lerman. /gustav From jwcolby at colbyconsulting.com Thu Jan 21 07:58:41 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 21 Jan 2010 08:58:41 -0500 Subject: [dba-VB] How unique are SQL Server error numbers? Message-ID: <4B585D91.4010604@colbyconsulting.com> I am calling stored procedures and passing back the error number and error string to my C# program. I am doing things like "create field, create index" etc. If I am trying to create a field and it already exists I get an error: pErrorDesc "Column names in each table must be unique. Column name 'AddrValid' in table '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." And pErrorNo "2705" So my question is, can I count on a 2705 being this "column name must be unique"? If so, in my C# program, I can count that as a successful field creation rather than a failure of the stored procedure. ATM I am saying that a failure occurred and not performing the next step, whereas I really can do the next step (update that field). TIA for your assistance. -- John W. Colby www.ColbyConsulting.com From davidmcafee at gmail.com Thu Jan 21 08:41:37 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 06:41:37 -0800 Subject: [dba-VB] How unique are SQL Server error numbers? In-Reply-To: <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> References: <4B585D91.4010604@colbyconsulting.com> <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> Message-ID: <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> John, you can trap for built in errors (such as 2705) in TSQL, or you can raise your own if/when certain conditions are met. Sent from my Droid phone. On Jan 21, 2010 6:00 AM, "jwcolby" wrote: I am calling stored procedures and passing back the error number and error string to my C# program. I am doing things like "create field, create index" etc. If I am trying to create a field and it already exists I get an error: pErrorDesc "Column names in each table must be unique. Column name 'AddrValid' in table '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." And pErrorNo "2705" So my question is, can I count on a 2705 being this "column name must be unique"? If so, in my C# program, I can count that as a successful field creation rather than a failure of the stored procedure. ATM I am saying that a failure occurred and not performing the next step, whereas I really can do the next step (update that field). TIA for your assistance. -- 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 Thu Jan 21 10:49:59 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 21 Jan 2010 11:49:59 -0500 Subject: [dba-VB] How unique are SQL Server error numbers? In-Reply-To: <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> References: <4B585D91.4010604@colbyconsulting.com> <8786a4c01001210640g6bc427a7w11bcf56afb912d96@mail.gmail.com> <8786a4c01001210641t6eec982n5e4ecbc7735e8d94@mail.gmail.com> Message-ID: <4B5885B7.5030606@colbyconsulting.com> David, I have built up a library of stored procedures that I have, up to this point, executed manually or in another stored procedure. Being a programmer at heart, then next logical step is to execute these SPs from a C# program at the click of a button. That is what I am up to now. I am breaking the stored procedures down now that I can control them from C#. Where before I might Make a table Create a cover query in a source table. Append data from the source into the new table Create a couple of indexes in the new table I would do all of the above in a single stored procedure. I now want to be able to do each of these steps individually and know back in C# what happened. Perhaps the make table failed for some reason. Creating the cover index on the source failed, but it failed because the index already exists. Appending data from source to destination worked, but how many records went? Etc. Having a real programming environment from which to cause these to happen and log the results is a HUGE step up from what I was capable of directly in TSQL. I view it as the best of both worlds. John W. Colby www.ColbyConsulting.com David McAfee wrote: > John, you can trap for built in errors (such as 2705) in TSQL, or you can > raise your own if/when certain conditions are met. > > Sent from my Droid phone. > > On Jan 21, 2010 6:00 AM, "jwcolby" wrote: > > I am calling stored procedures and passing back the error number and error > string to my C# program. > I am doing things like "create field, create index" etc. If I am trying to > create a field and it > already exists I get an error: > > pErrorDesc "Column names in each table must be unique. Column name > 'AddrValid' in table > '_DataDepotEmailNew.dbo.AZImportFrom' is specified more than once." > > And > > pErrorNo "2705" > > So my question is, can I count on a 2705 being this "column name must be > unique"? If so, in my C# > program, I can count that as a successful field creation rather than a > failure of the stored procedure. > > ATM I am saying that a failure occurred and not performing the next step, > whereas I really can do > the next step (update that field). > > TIA for your assistance. > > -- > 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 > _______________________________________________ > 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 Thu Jan 21 16:58:41 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 14:58:41 -0800 Subject: [dba-VB] .Net Setup, launch application after installation Message-ID: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> OK, am I the only one having a hard time with this? Visual Studio 2008 doesn't offer a simple method of launching the application after installation (via Setup/MSI), or at least provide an easy way to prompt the user if they want to launch the app on the finished screen. I used to be able to so this from Install Shield, Wise and hell, even via WinZip Self Extractor. I've been following tips from here: http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage But I still don't have the ability to launch the app that is being installed. Do any of you .Net gurus know of an easy way to do so? Thanks, David From cfoust at infostatsystems.com Thu Jan 21 17:22:24 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 21 Jan 2010 17:22:24 -0600 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> Message-ID: We use an installShield installer and it has provision for a file to execute when the installation ends. Is that what you mean? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, January 21, 2010 2:59 PM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] .Net Setup, launch application after installation OK, am I the only one having a hard time with this? Visual Studio 2008 doesn't offer a simple method of launching the application after installation (via Setup/MSI), or at least provide an easy way to prompt the user if they want to launch the app on the finished screen. I used to be able to so this from Install Shield, Wise and hell, even via WinZip Self Extractor. I've been following tips from here: http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage But I still don't have the ability to launch the app that is being installed. Do any of you .Net gurus know of an easy way to do so? Thanks, David _______________________________________________ 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 Thu Jan 21 17:39:30 2010 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jan 2010 15:39:30 -0800 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> Message-ID: <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Yes. I've used it before as well (also Wise and even WinZipSE). I'm trying to do this natively out of the VS2008 setup & deployment project. I can't believe there isn't anything natively built in to do so. On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust wrote: > We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee > Sent: Thursday, January 21, 2010 2:59 PM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] .Net Setup, launch application after installation > > OK, am I the only one having a hard time with this? > > Visual Studio 2008 doesn't offer a simple method of launching the > application after installation (via Setup/MSI), or at least provide an > easy way to prompt the user if they want to launch the app on the > finished screen. > > I used to be able to so this from Install Shield, Wise and hell, even > via WinZip Self Extractor. > > I've been following tips from here: > http://www.codeproject.com/KB/install/Installation.aspx?msg=3340422#xx3340422xx > and here: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage > > But I still don't have the ability to launch the app that is being installed. > > Do any of you .Net gurus know of an easy way to do so? > > Thanks, > David > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Fri Jan 22 07:56:31 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 08:56:31 -0500 Subject: [dba-VB] Free SQL Server tools Message-ID: <4B59AE8F.2030206@colbyconsulting.com> For all the small shops out there, this just in: http://www.sqlservercentral.com/articles/Tools/64908/ -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Jan 22 08:03:33 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 09:03:33 -0500 Subject: [dba-VB] C# hot keys Message-ID: <4B59B035.5050806@colbyconsulting.com> In Visual Studio F6 and F5 were build and run. Suddenly F6 no longer does the build. Where do I go to troubleshoot this? -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Jan 22 10:33:53 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 22 Jan 2010 10:33:53 -0600 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Message-ID: Maybe you're looking at it from the wrong end. The .Net purpose is to give you control, but that doesn't mean you don't have to build your own tools. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, January 21, 2010 3:40 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] .Net Setup, launch application after installation Yes. I've used it before as well (also Wise and even WinZipSE). I'm trying to do this natively out of the VS2008 setup & deployment project. I can't believe there isn't anything natively built in to do so. On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust wrote: > We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? > > Charlotte Foust > From davidmcafee at gmail.com Fri Jan 22 11:52:54 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 09:52:54 -0800 Subject: [dba-VB] .Net Setup, launch application after installation In-Reply-To: References: <8786a4c01001211458w4368598ev9e98c17847dda230@mail.gmail.com> <8786a4c01001211539r406f255fh4d8c136ac346253b@mail.gmail.com> Message-ID: <8786a4c01001220952j668dae93rfd18d8a4a6f1456e@mail.gmail.com> I know, I just can't believe they didn't give that option in the MSI builder. I've followed this guys blog: http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx?CommentPosted=true#commentmessage It launches after install (if the checkbox remains checked) in all (XP32, Vista 64, Win 7 32/64) my supported OS's except Vista 32 bit. I think this guy had a similar proglem: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.platformsdk.msi&tid=1dbfd840-d667-47bc-bcd7-7fa4c615afb6&cat=&lang=&cr=&sloc=&p=1 My issue is that I don't know enough about Custom Actions or Jscript to modify the .JS file to alter the "no impersonation" bit setting. I can't believe such a trivial item is taking all of my time. David On Fri, Jan 22, 2010 at 8:33 AM, Charlotte Foust wrote: > Maybe you're looking at it from the wrong end. ?The .Net purpose is to give you control, but that doesn't mean you don't have to build your own tools. > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee > Sent: Thursday, January 21, 2010 3:40 PM > To: Discussion concerning Visual Basic and related programming issues. > Subject: Re: [dba-VB] .Net Setup, launch application after installation > > Yes. I've used it before as well (also Wise and even WinZipSE). > I'm trying to do this natively out of the VS2008 setup & deployment project. > I can't believe there isn't anything natively built in to do so. > > > On Thu, Jan 21, 2010 at 3:22 PM, Charlotte Foust > wrote: >> We use an installShield installer and it has provision for a file to execute when the installation ends. ?Is that what you mean? >> >> Charlotte Foust From davidmcafee at gmail.com Fri Jan 22 12:07:39 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 10:07:39 -0800 Subject: [dba-VB] C# hot keys In-Reply-To: <4B59B035.5050806@colbyconsulting.com> References: <4B59B035.5050806@colbyconsulting.com> Message-ID: <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> F5 still runs/debugs Ctrl+Shift+B to build On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: > In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go > to troubleshoot this? > > -- > John W. Colby From jwcolby at colbyconsulting.com Fri Jan 22 12:10:37 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 13:10:37 -0500 Subject: [dba-VB] C# automation of office Message-ID: <4B59EA1D.1080700@colbyconsulting.com> Does anyone have a good information source for automating office (specifically Excel) from C#? I have a spreadsheet which has code inside of it which pulls data out of SQL Server and dumps it into pages of the spreadsheet. I WAS using Access to do this but my Office 2007 install broke my forms (event properties no longer wire to the code behind form). Thus from C# I need to cause a spreadsheet to open, call a method of the code and pass a server / database string to it. Any help will be greatly appreciated. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Fri Jan 22 12:25:20 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 13:25:20 -0500 Subject: [dba-VB] C# hot keys In-Reply-To: <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> Message-ID: <4B59ED90.30607@colbyconsulting.com> Are you saying that F6 no longer runs debug? What does F6 do instead? John W. Colby www.ColbyConsulting.com David McAfee wrote: > F5 still runs/debugs > > Ctrl+Shift+B to build > > On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >> In Visual Studio F6 and F5 were build and run. Suddenly F6 no longer does the build. Where do I go >> to troubleshoot this? >> >> -- >> John W. Colby > > _______________________________________________ > 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 Jan 22 12:32:33 2010 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 22 Jan 2010 10:32:33 -0800 Subject: [dba-VB] C# hot keys In-Reply-To: <4B59ED90.30607@colbyconsulting.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> <4B59ED90.30607@colbyconsulting.com> Message-ID: <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> Waste a keystroke? :P I don't know, I don't see it anywhere in the menus. On Fri, Jan 22, 2010 at 10:25 AM, jwcolby wrote: > Are you saying that F6 no longer runs debug? ?What does F6 do instead? > > John W. Colby > www.ColbyConsulting.com > > > David McAfee wrote: >> F5 still runs/debugs >> >> Ctrl+Shift+B to build >> >> On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >>> In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go >>> to troubleshoot this? >>> >>> -- >>> John W. Colby >> >> _______________________________________________ >> dba-VB mailing list >> dba-VB at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-vb >> http://www.databaseadvisors.com >> >> > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Fri Jan 22 15:53:59 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 22 Jan 2010 16:53:59 -0500 Subject: [dba-VB] Visual Studio grinds to a halt Message-ID: <4B5A1E77.5060206@colbyconsulting.com> I am running an Access / Excel automation on my dev laptop. It is doing a set of long running queries to populate a spreadsheet with sets of counts, running VBA, accessing the SQL Server on another machine over my network etc. I am also running Visual Studio trying to get some work done. Suddenly VS halts and throws up a "waiting for Excel" message. No idea at what level. The entire system is not hung, i.e. I can use other open apps, just not Access / Excel and ... Visual Studio. 8( -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Fri Jan 22 16:00:37 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 22 Jan 2010 16:00:37 -0600 Subject: [dba-VB] C# hot keys In-Reply-To: <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> References: <4B59B035.5050806@colbyconsulting.com> <8786a4c01001221007x13d1bcb4k2ffe6fde2198b43f@mail.gmail.com> <4B59ED90.30607@colbyconsulting.com> <8786a4c01001221032h2e5d8783hee6b5287b5a8dc2a@mail.gmail.com> Message-ID: You can change that by going to Tools -> Options -> Import and Export and reset your settings. It's nuts but it allows you to select the VB defaults again. Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Friday, January 22, 2010 10:33 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] C# hot keys Waste a keystroke? :P I don't know, I don't see it anywhere in the menus. On Fri, Jan 22, 2010 at 10:25 AM, jwcolby wrote: > Are you saying that F6 no longer runs debug? ?What does F6 do instead? > > John W. Colby > www.ColbyConsulting.com > > > David McAfee wrote: >> F5 still runs/debugs >> >> Ctrl+Shift+B to build >> >> On Fri, Jan 22, 2010 at 6:03 AM, jwcolby wrote: >>> In Visual Studio F6 and F5 were build and run. ?Suddenly F6 no longer does the build. ?Where do I go >>> to troubleshoot this? >>> >>> -- >>> John W. Colby >> From jwcolby at colbyconsulting.com Mon Jan 25 10:50:02 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 11:50:02 -0500 Subject: [dba-VB] C#: Raising events Message-ID: <4B5DCBBA.5070108@colbyconsulting.com> Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Jan 25 11:02:19 2010 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 25 Jan 2010 11:02:19 -0600 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DCBBA.5070108@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? Charlotte Foust -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 25, 2010 8:50 AM To: VBA Subject: [dba-VB] C#: Raising events Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- 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 Mon Jan 25 11:33:18 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 12:33:18 -0500 Subject: [dba-VB] C#: Raising events In-Reply-To: References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: <4B5DD5DE.7090704@colbyconsulting.com> Charlotte, > I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? LOL. Me too! And no, that is what I do not know how to do. clsAccuzipImportFrom raises an event evStoredProc in many different methods of clsAccuzipImportFrom. The intention is to pass the stored procedure object that it uses up to frmAccuzipImport. clsAccuzipImportFrom is dimensioned in frmAccuzipImport: clsAccuzipImportFrom clsAZImp; frmAccuzipImport need to sink evStoredProc raised in clsAZImp. John W. Colby www.ColbyConsulting.com Charlotte Foust wrote: > I got lost in the middle, John, but did you add a handler for the class object event to the object where you're sinking the event? > > Charlotte Foust > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, January 25, 2010 8:50 AM > To: VBA > Subject: [dba-VB] C#: Raising events > > Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably > are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. > > What I want to do is execute stored procedures, and publish status information about each SP > executed on my form starts a process running. > > I have a class which encapsulates my stored procedure stuff for creating the command object, > capturing the parameters and eventually executing the stored procedure. > > I assume that this object might raise an event when the stored procedure returns i.e. > sCmd.ExecuteNonQuery() returns control to C# ? > > OTOH, I have other classes which USE the SP class. These are the classes that actually call > specific stored procedures, pass parameters, and control the program flow depending on whether the > called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which > passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure > and want to display on the form the name of the sp and whether it completed satisfactorily, how long > it took and so forth. > > I am going to go with the classes which execute sequences of SPs being the class that raises the > event. I am looking at this as an example: > > http://www.codeproject.com/KB/cs/csevents01.aspx > > clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. > > clsAZExport uses a sequence of stored procedures to perform an export process. > > So... I create an event delegate definition which defines the event I will raise. Where do I place > this? For the moment I have placed it inside of the container where clsStoredProc is defined. > > I now have to create evargStoredProcedure - a public class for the argument that this event will > pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where > is this class created? Do I just define a new class at the project level for this event argument. > It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so > placing it in the code container for that class seems appropriate. For the moment I have placed it > inside of the container where clsStoredProc is defined. > > > Now, in every method of clsAZExport I add two lines: > > evargStoredProcedure svargSP = new evargStoredProcedure(sp); > evStoredProc(this, svargSP); > > This apparently creates the arguments object and then raises the event. > > Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. > > So... back in the form which uses clsAZExport to export data from SQL Server... > > At this point their example breaks down entirely. I am not writing to the debug window, I am trying > to write to a control on a form. While the debug window can be written to from anywhere, a control > on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. > > And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared > in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I > did all this I would click on any object that raises an event and I would see a list of their > events, but I do not, or I do not know how to see them. As an example if I have a text box, it has > events. If I click on that I can see its events, select one and voila, a place to say what to do. > How do I do that for an event raised by my class dimensioned and used in my form? > > If anyone is following this and knows what I am trying to do and what to do next, please speak up. > From shamil at smsconsulting.spb.ru Mon Jan 25 11:34:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Mon, 25 Jan 2010 20:34:09 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DCBBA.5070108@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> Message-ID: <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> Hi John -- Here is one of myriads possible solutions how to handle events in caller classes - for form's(/their controls') code behind it will be similar with an exception that you might have to use .Invoke while processing events in event sinks as the latter could run in a different thread than your form's main thread: using System; namespace ConsoleApplication { public class SpRunner { public class SpRunnerStatusReportEventArgs:EventArgs { public int CurrentCount {get; set;} public int MaxCount {get;set; } } public EventHandler StatusReport; public void Run() { const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { if (StatusReport != null) { SpRunnerStatusReportEventArgs e = new SpRunnerStatusReportEventArgs(); e.CurrentCount = i; e.MaxCount = MAX_COUNT; StatusReport(this, e); } } } } class Program { static void Main(string[] args) { SpRunner runner = new SpRunner(); runner.StatusReport += new EventHandler(statusReport); runner.Run(); } private static void statusReport(object sender, SpRunner.SpRunnerStatusReportEventArgs e) { System.Console.WriteLine("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); } } } Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, January 25, 2010 7:50 PM To: VBA Subject: [dba-VB] C#: Raising events Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. I have a class which encapsulates my stored procedure stuff for creating the command object, capturing the parameters and eventually executing the stored procedure. I assume that this object might raise an event when the stored procedure returns i.e. sCmd.ExecuteNonQuery() returns control to C# ? OTOH, I have other classes which USE the SP class. These are the classes that actually call specific stored procedures, pass parameters, and control the program flow depending on whether the called SP succeeds or fails etc. THESE classes should raise an event, sunk on the form, which passes up the SP class instance just executed, IOW I just executed a "Create index" stored procedure and want to display on the form the name of the sp and whether it completed satisfactorily, how long it took and so forth. I am going to go with the classes which execute sequences of SPs being the class that raises the event. I am looking at this as an example: http://www.codeproject.com/KB/cs/csevents01.aspx clsStoredProc creates the command object, packages the parameters, and executes the stored procedure. clsAZExport uses a sequence of stored procedures to perform an export process. So... I create an event delegate definition which defines the event I will raise. Where do I place this? For the moment I have placed it inside of the container where clsStoredProc is defined. I now have to create evargStoredProcedure - a public class for the argument that this event will pass up to the form. The argument is going to be the current instance of the clsStoredProc. Where is this class created? Do I just define a new class at the project level for this event argument. It seems that it is part and parcel of using clsStoredProcedure (which is in its own project) so placing it in the code container for that class seems appropriate. For the moment I have placed it inside of the container where clsStoredProc is defined. Now, in every method of clsAZExport I add two lines: evargStoredProcedure svargSP = new evargStoredProcedure(sp); evStoredProc(this, svargSP); This apparently creates the arguments object and then raises the event. Man oh man, is this a PITA (after VBA). I haven't even begun to sink the event yet. So... back in the form which uses clsAZExport to export data from SQL Server... At this point their example breaks down entirely. I am not writing to the debug window, I am trying to write to a control on a form. While the debug window can be written to from anywhere, a control on a specific form is decidedly specific. Thus the form has to somehow sink the evStoredProc. And I grind to a halt, unable to figure out what to do next. It seems that my clsAZExport declared in the form has an event evStoredProc, and that I need to wire that. I kind of figured that once I did all this I would click on any object that raises an event and I would see a list of their events, but I do not, or I do not know how to see them. As an example if I have a text box, it has events. If I click on that I can see its events, select one and voila, a place to say what to do. How do I do that for an event raised by my class dimensioned and used in my form? If anyone is following this and knows what I am trying to do and what to do next, please speak up. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Mon Jan 25 12:32:21 2010 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jan 2010 13:32:21 -0500 Subject: [dba-VB] C#: Raising events In-Reply-To: <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> Message-ID: <4B5DE3B5.1050708@colbyconsulting.com> Shamil, Unfortunately you are doing the same thing every other example is doing, writing the data to the console. I need to write to a control on a form. What I can apparently see from this is that the delegate and the event args need to be in the class that raises the event? These exact same things (delegate and event args class) will be used over and over again in other classes / forms so I was TRYING to place them down in the class that actually implements my stored procedure class. IOW I have a completely separate project that implements the stored procedure class. In that I placed the eventargument class as well as the delegate. these three things will be used in many many different classes / forms. Everything needs to run stored procedures and I was TRYING to "encapsulate" the delegate as well as the eventargs class in the same container as the stored procedure class. What I am seeing you do is to encapsulate the eventargs class and the delegate in the object that raises the event? John W. Colby www.ColbyConsulting.com Shamil Salakhetdinov wrote: > Hi John -- > > Here is one of myriads possible solutions how to handle events in caller > classes - for form's(/their controls') code behind it will be similar with > an exception that you might have to use .Invoke while processing events in > event sinks as the latter could run in a different thread than your form's > main thread: > > using System; > > namespace ConsoleApplication > { > > public class SpRunner > { > public class SpRunnerStatusReportEventArgs:EventArgs > { > public int CurrentCount {get; set;} > public int MaxCount {get;set; } > } > > public EventHandler StatusReport; > public void Run() > { > const int MAX_COUNT = 5; > for (int i = 1; i <= MAX_COUNT; i++) > { > if (StatusReport != null) > { > SpRunnerStatusReportEventArgs e = new > SpRunnerStatusReportEventArgs(); > e.CurrentCount = i; > e.MaxCount = MAX_COUNT; > StatusReport(this, e); > } > } > } > } > > class Program > { > static void Main(string[] args) > { > SpRunner runner = new SpRunner(); > runner.StatusReport += > new > EventHandler(statusReport); > runner.Run(); > } > > private static void statusReport(object sender, > SpRunner.SpRunnerStatusReportEventArgs e) > { > System.Console.WriteLine("{0}: Processing {1} of {2}...", > sender.GetType(), e.CurrentCount, e.MaxCount); > } > } > } > > Thank you. > > -- > Shamil From Gustav at cactus.dk Mon Jan 25 13:38:38 2010 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 25 Jan 2010 20:38:38 +0100 Subject: [dba-VB] C#: Raising events Message-ID: Hi John I lost you too somewhere down the line ... However, here's an example where a manual update at one form (Main) raises an event which requeries another form (Employees). Perhaps that can guide you a little. It writes to the console too but for debugging only. Some code has been snipped. Note the custom attributes. using System; using System.IO; using System.Windows.Forms; namespace DLMail { public partial class FormMain : Form { public DataSetDL DlDataSet = new DataSetDL(); public FormEmployer EmployerForm; public FormEmployee EmployeeForm; public FormPaySlip PaySlipForm; public FormSystem SystemForm; private string _dropFolder = @"Drop"; private string _dropPath; private string _execPath; private string _dataPath; private string _dataFileName = @"DLMail.xml"; private string _dataBaseFile; private int _employerId = -1; private string _employerName = String.Empty; private string _pdfPassword = String.Empty; public string ExecPath { get { return _execPath; } } public string DataPath { get { return _dataPath; } } public string DataBaseFile { get { return _dataBaseFile; } } /// /// The path to the folder where to copy new pay slip PDF files. /// public string DropPath { get { return _dropPath; } } public int EmployerId { get { return _employerId; } } public string EmployerName { get { return _employerName; } } public string PdfPassword { get { return _pdfPassword; } } // Delegate declaration. public delegate void ChangingHandler(object sender, EmployerArgs employerArgs); // Event declaration. public event ChangingHandler EmployerChanged; public void ChangeEmployer() { // Call the event. EmployerArgs employerArgs = new EmployerArgs(_employerId, _employerName, _pdfPassword, _dataPath); // Running on Windows Vista, first time run of EmployerChanged // raises a null reference error. try { EmployerChanged(this, employerArgs); } catch (Exception exception) { Console.WriteLine(exception.Source); } } public FormMain() { InitializeComponent(); InitializeDataSet(); InitializeFolders(); } private void FormMain_Load(object sender, EventArgs e) { FillEmployerComboBox(); this.EmployerChanged += new ChangingHandler(FormMain_EmployerChanged); } private void InitializeDataSet() { _execPath = Path.GetDirectoryName(Application.ExecutablePath); _dataBaseFile = Path.Combine(_execPath, _dataFileName); if (!File.Exists(_dataBaseFile)) { //snip } else { DlDataSet.ReadXml(_dataBaseFile); DataSetDL .DataTablePaySlipTypeDataTable paySlipTypeDataTable = DlDataSet .DataTablePaySlipType ; } } private void InitializeFolders() { string dropPath = Path.Combine(_execPath, _dropFolder); //snip _dropPath = dropPath; } private void FillEmployerComboBox() { int selectedIndex = -1; if (EmployerComboBox.SelectedIndex > -1) { selectedIndex = EmployerComboBox.SelectedIndex; } DataSetDL.DataTableEmployerDataTable dataTableEmployer = DlDataSet.DataTableEmployer; EmployerComboBox.SelectedItem = "Id"; EmployerComboBox.DisplayMember = "Organisation"; EmployerComboBox.DataSource = dataTableEmployer; if (selectedIndex != -1) { EmployerComboBox.SelectedIndex = selectedIndex; } } private void EmployerComboBox_SelectedIndexChanged(object sender, EventArgs e) { ComboBox comboBox = (ComboBox)sender; if (comboBox.SelectedItem != null) { int employerId = Convert.ToInt32(comboBox.SelectedValue); if (!employerId.Equals(_employerId)) { _employerId = employerId; _employerName = comboBox.Text; SetDataPath(); // Raise event. this.ChangeEmployer(); } } } void FormMain_EmployerChanged(object sender, EmployerArgs employerArgs) { Console.WriteLine("Change: " + employerArgs.EmployerId().ToString()); } private void SetDataPath() { DataSetDL.DataTableEmployerRow employerRow = DlDataSet.DataTableEmployer.FindById(_employerId); if (employerRow.IsPdfPasswordNull()) { _pdfPassword = string.Empty; } else { _pdfPassword = employerRow.PdfPassword.Trim(); } _dataPath = Path.Combine(_execPath, employerRow.DataPath); } private void EmployeeButton_Click(object sender, EventArgs e) { if (EmployeeForm == null) { EmployeeForm = new FormEmployee(); EmployeeForm.Show(); EmployeeForm.FormClosed += new FormClosedEventHandler(EmployeeForm_FormClosed); } else { EmployeeForm.Focus(); } } private void EmployeeForm_FormClosed(object sender, FormClosedEventArgs e) { EmployeeForm = null; SaveData(); } private void SaveData() { this.DlDataSet.WriteXml(_dataBaseFile); } } // Custom attributes. public class EmployerArgs : System.EventArgs { private int employerId = 0; private string employerName = String.Empty; private string pdfPassword = String.Empty; private string dataPath = String.Empty; public EmployerArgs(int id, string name, string password, string path) { this.employerId = id; this.employerName = name; this.pdfPassword = password; this.dataPath = path; } public int EmployerId() { return employerId; } public string EmployerName() { return employerName; } public string PdfPassword() { return pdfPassword; } public string DataPath() { return dataPath; } } } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace DLMail { public partial class FormEmployee : Form { private string _dataBaseFile; private int _employerId; public FormEmployee() { InitializeComponent(); InitializeDataSet(); } private void InitializeDataSet() { FormMain formMain = (FormMain)Application.OpenForms[0]; _dataBaseFile = formMain.DataBaseFile; _employerId = formMain.EmployerId; this.dataSetDL = formMain.DlDataSet; ChangeEmployer(); formMain.EmployerChanged += new FormMain.ChangingHandler(formMain_EmployerChanged); } void formMain_EmployerChanged(object sender, EmployerArgs formArgs) { _employerId = formArgs.EmployerId(); ChangeEmployer(); } private void ChangeEmployer() { string filter = String.Empty; // Select only employees of the selected employer. filter = "EmployerId = " + _employerId.ToString(); this.dataTableEmployeeBindingSource.Filter = filter; this.dataTableEmployeeBindingSource.DataSource = this.dataSetDL; } } } /gustav >>> jwcolby at colbyconsulting.com 25-01-2010 17:50:02 >>> Silly me, I thought that events would be easy in C#. I guess once you figure them out they probably are, but coming from VBA where all the behind the scenes stuff is done for you, it is kinda confusing. What I want to do is execute stored procedures, and publish status information about each SP executed on my form starts a process running. From shamil at smsconsulting.spb.ru Mon Jan 25 23:53:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 08:53:09 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7 Ultimate 64 bit Message-ID: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil From shamil at smsconsulting.spb.ru Tue Jan 26 00:20:46 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 09:20:46 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <002601ca9e4f$b3f6a050$1be3e0f0$@spb.ru> John -- As I noted my sample code was one of myriads possible variants - below it yet another one - just a sample. As for setting form controls' properties you have to use .InvokeRequired and .Invoke to check calling context and to properly set controls' properties - you can google/bing for such samples of wait here for some to appear in this or related threads. Thank you. -- Shamil P.S. using System; // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount ; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } // front-end namespace ConsoleApplication { class Program { static void Main(string[] args) { My.BusinessLayerClassLib.SpRunnerManager runner = new My.BusinessLayerClassLib.SpRunnerManager(); runner.StatusReport += new EventHandler(statusReport); runner.Run(); } private static void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { System.Console.WriteLine("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); } } } __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From bill_patten at embarqmail.com Tue Jan 26 01:03:53 2010 From: bill_patten at embarqmail.com (Bill Patten) Date: Mon, 25 Jan 2010 23:03:53 -0800 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002101ca9e4b$d80b3770$8821a650$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? 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 Tue Jan 26 01:31:34 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 10:31:34 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: <002701ca9e59$97cd42d0$c767c870$@spb.ru> Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 02:20:36 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 11:20:36 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> Message-ID: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Hi Bill -- I have posted my sample test executable here: http://sms-web.biz/jet/64BIT.zip BTW, AFAIU the following trick should help to run this sample app on 64bit system: http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? 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 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 03:14:14 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 12:14:14 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <002e01ca9e67$ef1aede0$cd50c9a0$@spb.ru> HI All -- Here is some information I collected related to the subject of this thread: Running .NET Apps in 32-bit mode on 64-bit Windows http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx 64 Bit Windows, IIS, and Microsoft Access (part 1 of 2) http://www.insideria.com/2009/09/64-bit-windows-iis-and-microso.html http://www.insideria.com/2009/09/64-bit-windows-iis-and-microso-1.html Microsoft Data Access Components (MDAC) 2.8 http://www.microsoft.com/downloads/details.aspx?familyid=6C050FE3-C795-4B7D- B037-185D0506396C&displaylang=en How to obtain the latest (SP8) service pack for the Microsoft Jet 4.0 Database Engine http://support.microsoft.com/kb/239114/en Microsoft Jet Database Engine http://en.wikipedia.org/wiki/Microsoft_Jet_Database_Engine Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Tuesday, January 26, 2010 11:21 AM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Bill -- I have posted my sample test executable here: http://sms-web.biz/jet/64BIT.zip BTW, AFAIU the following trick should help to run this sample app on 64bit system: http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 -bit-Windows.aspx Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill <<< snip >>> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Tue Jan 26 06:16:00 2010 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 26 Jan 2010 12:16:00 +0000 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > From shamil at smsconsulting.spb.ru Tue Jan 26 08:10:39 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 17:10:39 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <003c01ca9e91$582840c0$0878c240$@spb.ru> Thank you, Mark, But did you have MS Jet 4.0 SP8 (and MDAC 2.8) installed on your system before you run my sample app? This PC costs here currently approx. 1000 euro or even more. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Tuesday, January 26, 2010 3:16 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > _______________________________________________ From shamil at smsconsulting.spb.ru Tue Jan 26 08:51:18 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 17:51:18 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> Message-ID: <004301ca9e97$07026c10$15074430$@spb.ru> Hi Mark and all, I have posted another test here: http://sms-web.biz/jet/AnotherTest.zip It has Jet db communication within class library: - JetDbTest.ConsoleApp.exe - FE - JetDbTest.ClassLibrary.dll - classlib and it also has two versions of executables" - 1st - compiled for any CPU; - 2nd - compiled for x86 CPU - 32 bit Could you please test how that will work? Current hypothesis/expectation here are that: - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Tuesday, January 26, 2010 3:16 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hell Shamil, As you know, your program did not work here on Win2k8 Server machine. When I ran core flags it runs well. Coreflags runs in 1 second or less. Here is the text from the steps I did. The text is long but the commands are at the bottom. Approx price for the machine you spec-ed is between 600 - 800 euro. thanks Mark ==================================== Table of Contents ==================================== 1-the error I got 2-Result after running Core Flags 3-Contents of the command I ran on W2k8 to turn on 32 bit mode 4-Contents of the command I ran on W2k8 to turn off 32 bit mode 5-Result of turning on 32 bit mode 6-Result of turning off 32 bit mode ==================================== 1-Error 1 ==================================== LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 11:31:29 - Select test started. LOG: 26/01/2010 11:31:29 - SelectTest: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.SelectTest.Run() LOG: 26/01/2010 11:31:29 - Select test finished. LOG: 26/01/2010 11:31:29 - Insert test started. LOG: 26/01/2010 11:31:29 - Insert: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.InsertTest.Run() LOG: 26/01/2010 11:31:29 - Insert test finished. LOG: 26/01/2010 11:31:29 - Update test started. LOG: 26/01/2010 11:31:29 - Update: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.UpdateTest.Run() LOG: 26/01/2010 11:31:29 - Update test finished. LOG: 26/01/2010 11:31:29 - Delete test started. LOG: 26/01/2010 11:31:29 - Delete: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. STACK TRACE: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString cons tr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOpti ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC onnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at JetDbTest.ConsoleApp.DeleteTest.Run() LOG: 26/01/2010 11:31:29 - Delete test finished. LOG: 26/01/2010 11:31:29 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 2-Result after running Core Flags ==================================== LOG: 26/01/2010 12:05:08 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 12:05:08 - Select test started. LOG: 26/01/2010 12:05:09 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 12:05:09 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 12:05:09 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 12:05:09 - Select test finished. LOG: 26/01/2010 12:05:09 - Insert test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Insert test finished. LOG: 26/01/2010 12:05:09 - Update test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Update test finished. LOG: 26/01/2010 12:05:09 - Delete test started. LOG: 26/01/2010 12:05:09 - ret = 1 LOG: 26/01/2010 12:05:09 - Delete test finished. LOG: 26/01/2010 12:05:09 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ==================================== 3-Contents of the command I ran on W2k8 to turn on 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ ==================================== 4-Contents of the command I ran on W2k8 to turn off 32 bit mode ==================================== "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c:\64Bit\JetDbTest.ConsoleApp.Exe /32Bit- ==================================== 5-Result of turning on 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . ==================================== 6-Result of turning off 32 bit mode ==================================== C:\64BIT>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\CorFlags.EXE" c: \64Bit\JetDbTest.ConsoleApp.Exe /32Bit- Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\64BIT>pause Press any key to continue . . . 2010/1/26 Shamil Salakhetdinov > Hi Bill -- > > I have posted my sample test executable here: > > http://sms-web.biz/jet/64BIT.zip > > BTW, AFAIU the following trick should help to run this sample app on 64bit > system: > > > http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64 > -bit-Windows.aspx > > Thank you. > > -- > Shamil > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From bill_patten at embarqmail.com Tue Jan 26 12:51:32 2010 From: bill_patten at embarqmail.com (Bill Patten) Date: Tue, 26 Jan 2010 10:51:32 -0800 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit In-Reply-To: <002701ca9e59$97cd42d0$c767c870$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002701ca9e59$97cd42d0$c767c870$@spb.ru> Message-ID: <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> Hi Shamil, I knew that when I offered to help I could get in over my head, I did. I did my best, but was not able to make the corFlag work, I'm sure it was me not the corflag. I saw that Mark was able to send you good information so hopefully that is what you needed. The x86 did work. I can send you the various log files if that will help you. As near as I can tell the computer parts comes out to about 1300 US. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 11:31 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows7Ultimate64 bit Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru _______________________________________________ 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 Tue Jan 26 10:00:33 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 19:00:33 +0300 Subject: [dba-VB] C#: Raising events (Part 2) In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004b01ca9ea0$b23193f0$1694bbd0$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke (Part 2) - you can put code from Part 1 and Part 1 into one code file replacing Program.cs in Console app, set references to System.Windows.Forms and System.Drawing and run it: // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } __________ Information from ESET NOD32 Antivirus, version of virus signature database 4807 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Tue Jan 26 09:59:29 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 18:59:29 +0300 Subject: [dba-VB] C#: Raising events (Part 1) In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004a01ca9ea0$8c5b2560$a5117020$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke (Part 1): using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsFormsApp { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new TestForm()); } } // TestForm Designer partial class TestForm { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.cmdTest = new System.Windows.Forms.Button(); this.txtTest = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // cmdTest // this.cmdTest.Location = new System.Drawing.Point(128, 205); this.cmdTest.Name = "cmdTest"; this.cmdTest.Size = new System.Drawing.Size(75, 23); this.cmdTest.TabIndex = 0; this.cmdTest.Text = "&Test"; this.cmdTest.UseVisualStyleBackColor = true; this.cmdTest.Click += new System.EventHandler(this.cmdTest_Click); // // txtTest // this.txtTest.Location = new System.Drawing.Point(12, 13); this.txtTest.Multiline = true; this.txtTest.Name = "txtTest"; this.txtTest.Size = new System.Drawing.Size(311, 175); this.txtTest.TabIndex = 1; // // TestForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(335, 240); this.Controls.Add(this.txtTest); this.Controls.Add(this.cmdTest); this.Name = "TestForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Test Form"; this.Load += new System.EventHandler(this.TestForm_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button cmdTest; private System.Windows.Forms.TextBox txtTest; } // TestForm Code Behind public partial class TestForm : Form { public TestForm() { InitializeComponent(); } private My.BusinessLayerClassLib.SpRunnerManager _runner; private void TestForm_Load(object sender, EventArgs e) { _runner = new My.BusinessLayerClassLib.SpRunnerManager(); _runner.StatusReport += new EventHandler(statusReport); } private void cmdTest_Click(object sender, EventArgs e) { txtTest.Text = null; _runner.Run(); } private void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { string message = string.Format("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); if (txtTest.InvokeRequired) { object[] args = { message }; this.Invoke(new logDelegate(log), args); } else log(message); } private delegate void logDelegate(string message); private void log(string message) { txtTest.Text = message + System.Environment.NewLine + txtTest.Text; } } } ...Continued in part 2.... From shamil at smsconsulting.spb.ru Tue Jan 26 09:16:55 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 26 Jan 2010 18:16:55 +0300 Subject: [dba-VB] C#: Raising events In-Reply-To: <4B5DE3B5.1050708@colbyconsulting.com> References: <4B5DCBBA.5070108@colbyconsulting.com> <000901ca9de4$9b4e8880$d1eb9980$@spb.ru> <4B5DE3B5.1050708@colbyconsulting.com> Message-ID: <004901ca9e9a$99fbf920$cdf3eb60$@spb.ru> Hi John -- Here is a promised WinForms sample code with .InvokeRequired and .Invoke: using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsFormsApp { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new TestForm()); } } // TestForm Designer partial class TestForm { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.cmdTest = new System.Windows.Forms.Button(); this.txtTest = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // cmdTest // this.cmdTest.Location = new System.Drawing.Point(128, 205); this.cmdTest.Name = "cmdTest"; this.cmdTest.Size = new System.Drawing.Size(75, 23); this.cmdTest.TabIndex = 0; this.cmdTest.Text = "&Test"; this.cmdTest.UseVisualStyleBackColor = true; this.cmdTest.Click += new System.EventHandler(this.cmdTest_Click); // // txtTest // this.txtTest.Location = new System.Drawing.Point(12, 13); this.txtTest.Multiline = true; this.txtTest.Name = "txtTest"; this.txtTest.Size = new System.Drawing.Size(311, 175); this.txtTest.TabIndex = 1; // // TestForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(335, 240); this.Controls.Add(this.txtTest); this.Controls.Add(this.cmdTest); this.Name = "TestForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Test Form"; this.Load += new System.EventHandler(this.TestForm_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button cmdTest; private System.Windows.Forms.TextBox txtTest; } // TestForm Code Behind public partial class TestForm : Form { public TestForm() { InitializeComponent(); } private My.BusinessLayerClassLib.SpRunnerManager _runner; private void TestForm_Load(object sender, EventArgs e) { _runner = new My.BusinessLayerClassLib.SpRunnerManager(); _runner.StatusReport += new EventHandler(statusReport); } private void cmdTest_Click(object sender, EventArgs e) { txtTest.Text = null; _runner.Run(); } private void statusReport(object sender, My.CoreClassLib.SpRunnerStatusReportEventArgs e) { string message = string.Format("{0}: Processing {1} of {2}...", sender.GetType(), e.CurrentCount, e.MaxCount); if (txtTest.InvokeRequired) { object[] args = { message }; this.Invoke(new logDelegate(log), args); } else log(message); } private delegate void logDelegate(string message); private void log(string message) { txtTest.Text = message + System.Environment.NewLine + txtTest.Text; } } } // classlib1 namespace My.CoreClassLib { public class SpRunnerStatusReportEventArgs : EventArgs { public int CurrentCount { get; set; } public int MaxCount { get; set; } } } // classlib2 namespace My.UtilsClassLib { public class SpStatusReporter { public SpStatusReporter( EventHandler statusReport) { _statusReport = statusReport; } private EventHandler _statusReport; public void ReportStatus(int currentCount, int maxCount) { if (_statusReport != null) { My.CoreClassLib.SpRunnerStatusReportEventArgs e = new My.CoreClassLib.SpRunnerStatusReportEventArgs(); e.CurrentCount = currentCount; e.MaxCount = maxCount; _statusReport(this, e); } } } } // classlib3 namespace My.BusinessLayerClassLib { public class SpRunnerManager { public EventHandler StatusReport; private My.UtilsClassLib.SpStatusReporter _reporter; public void Run() { if (_reporter == null) _reporter = new My.UtilsClassLib.SpStatusReporter(StatusReport); const int MAX_COUNT = 5; for (int i = 1; i <= MAX_COUNT; i++) { _reporter.ReportStatus(i, MAX_COUNT); } } } } From marklbreen at gmail.com Tue Jan 26 16:54:00 2010 From: marklbreen at gmail.com (Mark Breen) Date: Tue, 26 Jan 2010 22:54:00 +0000 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> Message-ID: Sorry for delay, it was held up due to size of message, I have truncated it here. Mark ---------- Forwarded message ---------- From: Mark Breen Date: 2010/1/26 Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit To: "Discussion concerning Visual Basic and related programming issues." < dba-vb at databaseadvisors.com> Hello Shamil, see below for results of tests, I only need to run it against, JetDbTest.ConsoleApp.exe I did not run against dll file 32 bit file worked well without corflag, - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. thanks Mark ======================= Here is result of x86 with no corflags ran ======================= LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:07:47 - Select test started. LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:07:47 - Select test finished. LOG: 26/01/2010 16:07:47 - Insert test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Insert test finished. LOG: 26/01/2010 16:07:47 - Update test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Update test finished. LOG: 26/01/2010 16:07:47 - Delete test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Delete test finished. LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ======================= Here is msg after running corflags ======================= C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\Cor Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\AnotherTest\AnyCPU>pause Press any key to continue . . . ======================= Here is good result for AnyCPU after running coreflags ======================= LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:10:50 - Select test started. LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:10:50 - Select test finished. LOG: 26/01/2010 16:10:50 - Insert test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Insert test finished. LOG: 26/01/2010 16:10:50 - Update test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Update test finished. LOG: 26/01/2010 16:10:50 - Delete test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Delete test finished. LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... From shamil at smsconsulting.spb.ru Wed Jan 27 00:25:55 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 09:25:55 +0300 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> Message-ID: <009401ca9f19$97189590$c549c0b0$@spb.ru> Hi Mark -- Thank you for your testing. Here is the final test set with sources - it would take a couple of minutes to download, unzip and run: http://sms-web.biz/jet/FinalTest.zip It has - 1) AnyCPU - AnyCPU build as it's made by VS2008; - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using CorFlags.exe; - 4) x86 - x86 32bit build. It's expected (after your two rounds of tests) that now (1) will fail, and (2),(3) and (4) will run OK. BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system after setup, or was that installed with MS Windows SDK you have there? Thank you. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Wednesday, January 27, 2010 1:54 AM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Sorry for delay, it was held up due to size of message, I have truncated it here. Mark ---------- Forwarded message ---------- From: Mark Breen Date: 2010/1/26 Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit To: "Discussion concerning Visual Basic and related programming issues." < dba-vb at databaseadvisors.com> Hello Shamil, see below for results of tests, I only need to run it against, JetDbTest.ConsoleApp.exe I did not run against dll file 32 bit file worked well without corflag, - first one (any CPU) will need to use CorFlags.EXE run against at least JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and JetDbTest.ClassLibrary.dll; - and second one should run OK "out-of-the-box" on your system as it was compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 OLE DB 32bit Drivers already installed. thanks Mark ======================= Here is result of x86 with no corflags ran ======================= LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:07:47 - Select test started. LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:07:47 - Select test finished. LOG: 26/01/2010 16:07:47 - Insert test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Insert test finished. LOG: 26/01/2010 16:07:47 - Update test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Update test finished. LOG: 26/01/2010 16:07:47 - Delete test started. LOG: 26/01/2010 16:07:47 - ret = 1 LOG: 26/01/2010 16:07:47 - Delete test finished. LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... ======================= Here is msg after running corflags ======================= C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\Cor Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 3.5.21022.8 Copyright (c) Microsoft Corporation. All rights reserved. C:\AnotherTest\AnyCPU>pause Press any key to continue . . . ======================= Here is good result for AnyCPU after running coreflags ======================= LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test started. LOG: 26/01/2010 16:10:50 - Select test started. LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 LOG: 26/01/2010 16:10:50 - Select test finished. LOG: 26/01/2010 16:10:50 - Insert test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Insert test finished. LOG: 26/01/2010 16:10:50 - Update test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Update test finished. LOG: 26/01/2010 16:10:50 - Delete test started. LOG: 26/01/2010 16:10:50 - ret = 1 LOG: 26/01/2010 16:10:50 - Delete test finished. LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test finished . Press any key to continue... _______________________________________________ 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 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Wed Jan 27 00:58:09 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 09:58:09 +0300 Subject: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit In-Reply-To: <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002701ca9e59$97cd42d0$c767c870$@spb.ru> <4E8CE330B33349A6940B3CC910EDFA1E@BPCS> Message-ID: <009a01ca9f1e$16fa5420$44eefc60$@spb.ru> Thank you for your help, Bill. Yes, Mark's tests did answer my questions. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 9:52 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows 7Ultimate 64 bit Hi Shamil, I knew that when I offered to help I could get in over my head, I did. I did my best, but was not able to make the corFlag work, I'm sure it was me not the corflag. I saw that Mark was able to send you good information so hopefully that is what you needed. The x86 did work. I can send you the various log files if that will help you. As near as I can tell the computer parts comes out to about 1300 US. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 11:31 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases onWindows7Ultimate64 bit Thank you, Bill, I will write the sample app within an hour. BTW, if you know what would be an average cost for such a box there in your country?: Case: IN-WIN "IW-J614TA F430" ATX 2.03, black (550W, ATX12V V2.03) Processor: Intel "Core i7-920" (2.66Hgz, 4x256KB+8MB, EM64T) Socket1366 Cooler: Socket1366 ASUS "PM007-8LB4W" Motherboard: Socket1366 ASUS "P6T" (iX58, 6xDDR3, SATA II-RAID, SATA II, U133, 3xPCI-E, SB, 1Gbit LAN, IEEE1394a, USB2.0, ATX) RAM: 3x1GB DDR3 SDRAM Kingston "ValueRAM" KVR1333D3N9/1G (PC10600, 1333Mgz, CL9) HDD: 2TB Samsung "EcoGreen F3 HD203WI" 5400r/min., 32MB (SATA II) VideCard: PCI-E 896MB ASUS "ENGTX260 GL+/2DI/896MD3/A" (GeForce GTX 260, DDR3, 2xDVI) -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Tuesday, January 26, 2010 10:04 AM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi Shamil, I am running Windows 7 Ultimate 64 and will be willing to try and test it for you. Bill -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Monday, January 25, 2010 9:53 PM To: "'Discussion concerning Visual Basic and related programming issues.'" Subject: [dba-VB] Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hi All - One of my customers report that .NET 32 bit apps which use Jet database do not work properly on Windows 7 Ultimate 64 bit. Unfortunately I do not yet have 64 bit system. Does anybody here have such a system for me to write a very simple test app to see what happens on 64bit system with 32bit .Net apps when working with Jet? Thank you. -- Shamil __________ Information from ESET NOD32 Antivirus, version of virus signature database 4808 (20100126) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Wed Jan 27 06:23:02 2010 From: marklbreen at gmail.com (Mark Breen) Date: Wed, 27 Jan 2010 12:23:02 +0000 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: <009401ca9f19$97189590$c549c0b0$@spb.ru> References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> <009401ca9f19$97189590$c549c0b0$@spb.ru> Message-ID: Hello Shamil, All assumptions below are correct. Additionally, when I ran the same routines on any CPU, it worked again, as expected. Not sure what is meant by the following, or how to check? >BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system >after setup, or was that installed with MS Windows SDK you have there? Office 07 is on this box now, but it was on before I started. Do you want me to check something further? thanks Mark 2010/1/27 Shamil Salakhetdinov > Hi Mark -- > > Thank you for your testing. > > Here is the final test set with sources - it would take a couple of minutes > to download, unzip and run: > > http://sms-web.biz/jet/FinalTest.zip > > It has > > - 1) AnyCPU - AnyCPU build as it's made by VS2008; > - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; > - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using > CorFlags.exe; > - 4) x86 - x86 32bit build. > > It's expected (after your two rounds of tests) that now (1) will fail, and > (2),(3) and (4) will run OK. > > BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system > after setup, or was that installed with MS Windows SDK you have there? > > Thank you. > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Wednesday, January 27, 2010 1:54 AM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on > Windows 7Ultimate 64 bit > > Sorry for delay, > > it was held up due to size of message, I have truncated it here. > > Mark > > ---------- Forwarded message ---------- > From: Mark Breen > Date: 2010/1/26 > Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on > Windows > 7Ultimate 64 bit > To: "Discussion concerning Visual Basic and related programming issues." < > dba-vb at databaseadvisors.com> > > > Hello Shamil, > > see below for results of tests, > > I only need to run it against, JetDbTest.ConsoleApp.exe I did not run > against dll file > > 32 bit file worked well without corflag, > > - first one (any CPU) will need to use CorFlags.EXE run against at least > JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and > JetDbTest.ClassLibrary.dll; > > - and second one should run OK "out-of-the-box" on your system as it was > compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 > OLE DB 32bit Drivers already installed. > > > thanks > > Mark > > > > ======================= > Here is result of x86 with no corflags ran > ======================= > > > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:07:47 - Select test started. > LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:07:47 - Select test finished. > LOG: 26/01/2010 16:07:47 - Insert test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Insert test finished. > LOG: 26/01/2010 16:07:47 - Update test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Update test finished. > LOG: 26/01/2010 16:07:47 - Delete test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Delete test finished. > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > > ======================= > Here is msg after running corflags > ======================= > > > C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft > SDKs\Windows\v6.0A\Bin\x64\Cor > Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ > Microsoft (R) .NET Framework CorFlags Conversion Tool. Version > 3.5.21022.8 > Copyright (c) Microsoft Corporation. All rights reserved. > > > C:\AnotherTest\AnyCPU>pause > Press any key to continue . . . > > > ======================= > Here is good result for AnyCPU after running coreflags > ======================= > > > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:10:50 - Select test started. > LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:10:50 - Select test finished. > LOG: 26/01/2010 16:10:50 - Insert test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Insert test finished. > LOG: 26/01/2010 16:10:50 - Update test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Update test finished. > LOG: 26/01/2010 16:10:50 - Delete test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Delete test finished. > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > _______________________________________________ > 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 4808 (20100126) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.esetnod32.ru > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature > database 4808 (20100126) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.esetnod32.ru > > > _______________________________________________ > 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 Jan 27 08:37:30 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 27 Jan 2010 17:37:30 +0300 Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit In-Reply-To: References: <002101ca9e4b$d80b3770$8821a650$@spb.ru> <002b01ca9e60$71e236a0$55a6a3e0$@spb.ru> <004301ca9e97$07026c10$15074430$@spb.ru> <009401ca9f19$97189590$c549c0b0$@spb.ru> Message-ID: <00ee01ca9f5e$429602b0$c7c20810$@spb.ru> Hello Mark -- Thank you. No, no need to check anything else further. -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Wednesday, January 27, 2010 3:23 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on Windows 7Ultimate 64 bit Hello Shamil, All assumptions below are correct. Additionally, when I ran the same routines on any CPU, it worked again, as expected. Not sure what is meant by the following, or how to check? >BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system >after setup, or was that installed with MS Windows SDK you have there? Office 07 is on this box now, but it was on before I started. Do you want me to check something further? thanks Mark 2010/1/27 Shamil Salakhetdinov > Hi Mark -- > > Thank you for your testing. > > Here is the final test set with sources - it would take a couple of minutes > to download, unzip and run: > > http://sms-web.biz/jet/FinalTest.zip > > It has > > - 1) AnyCPU - AnyCPU build as it's made by VS2008; > - 2) AnyCPUExePatched - AnyCPU build with .exe patched using CorFlags.exe; > - 3) AnyCPUExe&DllPatched - AnyCPU build with .exe and .dll patched using > CorFlags.exe; > - 4) x86 - x86 32bit build. > > It's expected (after your two rounds of tests) that now (1) will fail, and > (2),(3) and (4) will run OK. > > BTW, did you get installed additionally MS Jet 4.0 OLEDB on your system > after setup, or was that installed with MS Windows SDK you have there? > > Thank you. > > -- > Shamil > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Wednesday, January 27, 2010 1:54 AM > To: Discussion concerning Visual Basic and related programming issues. > Subject: [dba-VB] Fwd: Running .NET 32 bit apps with Jet databases on > Windows 7Ultimate 64 bit > > Sorry for delay, > > it was held up due to size of message, I have truncated it here. > > Mark > > ---------- Forwarded message ---------- > From: Mark Breen > Date: 2010/1/26 > Subject: Re: [dba-VB] Running .NET 32 bit apps with Jet databases on > Windows > 7Ultimate 64 bit > To: "Discussion concerning Visual Basic and related programming issues." < > dba-vb at databaseadvisors.com> > > > Hello Shamil, > > see below for results of tests, > > I only need to run it against, JetDbTest.ConsoleApp.exe I did not run > against dll file > > 32 bit file worked well without corflag, > > - first one (any CPU) will need to use CorFlags.EXE run against at least > JetDbTest.ConsoleApp.exe, and at most both JetDbTest.ConsoleApp.exe and > JetDbTest.ClassLibrary.dll; > > - and second one should run OK "out-of-the-box" on your system as it was > compiled for 32 bit system and your 64bit system (AFAIU) has got MS Jet 4 > OLE DB 32bit Drivers already installed. > > > thanks > > Mark > > > > ======================= > Here is result of x86 with no corflags ran > ======================= > > > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:07:47 - Select test started. > LOG: 26/01/2010 16:07:47 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:07:47 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:07:47 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:07:47 - Select test finished. > LOG: 26/01/2010 16:07:47 - Insert test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Insert test finished. > LOG: 26/01/2010 16:07:47 - Update test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Update test finished. > LOG: 26/01/2010 16:07:47 - Delete test started. > LOG: 26/01/2010 16:07:47 - ret = 1 > LOG: 26/01/2010 16:07:47 - Delete test finished. > LOG: 26/01/2010 16:07:47 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > > ======================= > Here is msg after running corflags > ======================= > > > C:\AnotherTest\AnyCPU>"C:\Program Files\Microsoft > SDKs\Windows\v6.0A\Bin\x64\Cor > Flags.EXE" C:\AnotherTest\AnyCPU\JetDbTest.ConsoleApp.Exe /32Bit+ > Microsoft (R) .NET Framework CorFlags Conversion Tool. Version > 3.5.21022.8 > Copyright (c) Microsoft Corporation. All rights reserved. > > > C:\AnotherTest\AnyCPU>pause > Press any key to continue . . . > > > ======================= > Here is good result for AnyCPU after running coreflags > ======================= > > > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > started. > > LOG: 26/01/2010 16:10:50 - Select test started. > LOG: 26/01/2010 16:10:50 - 1. 1 - Speedy Express - (503) 555-9831 > LOG: 26/01/2010 16:10:50 - 2. 2 - United Package - (503) 555-3199 > LOG: 26/01/2010 16:10:50 - 3. 3 - Federal Shipping - (503) 555-9931 > LOG: 26/01/2010 16:10:50 - Select test finished. > LOG: 26/01/2010 16:10:50 - Insert test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Insert test finished. > LOG: 26/01/2010 16:10:50 - Update test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Update test finished. > LOG: 26/01/2010 16:10:50 - Delete test started. > LOG: 26/01/2010 16:10:50 - ret = 1 > LOG: 26/01/2010 16:10:50 - Delete test finished. > LOG: 26/01/2010 16:10:50 - JobDbTest.Console - v.0.0.1 (26-JAN-10) test > finished > . > Press any key to continue... > _______________________________________________ > 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 4810 (20100127) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From shamil at smsconsulting.spb.ru Thu Jan 28 04:09:57 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 28 Jan 2010 13:09:57 +0300 Subject: [dba-VB] FYI: The mind just simply can't comprehend Message-ID: <016f01caa002$0caddca0$260995e0$@spb.ru> Hi All, Just wanted to share one interesting weblog entry and my opinion/experience on it - the subject line is taken from the following Sara Ford's weblog entry: "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m anage-an-agile-team-after-6-years-of-waterfall.aspx "The mind just simply can't comprehend" - this is what happens with every(?) experienced developer's mind used to develop and debug their software via long running (heavy) debug sessions as well as with "waterfallish" PMs - the mind of experienced in "doing it other way" developers and managers just can't comprehend how Test Driven Development can results in robust "bullet proof" software usually developed with a lot less pressure and stress - and (sic!) with higher quality, adaptability to the future changes, agility. That's a long way to get one's mind starting to really comprehend what happens when you take that route - the sooner you'll start following it - the better for your business. Thank you. -- Shamil From max.wanadoo at gmail.com Thu Jan 28 04:30:45 2010 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 28 Jan 2010 10:30:45 +0000 Subject: [dba-VB] FYI: The mind just simply can't comprehend In-Reply-To: <016f01caa002$0caddca0$260995e0$@spb.ru> References: <016f01caa002$0caddca0$260995e0$@spb.ru> Message-ID: Shamil, to write lenghty blogs like that simply tells me that she has too much time on her hands. that could all be precised down to a paragraph. max On 28/01/2010, Shamil Salakhetdinov wrote: > Hi All, > > > > Just wanted to share one interesting weblog entry and my opinion/experience > on it - the subject line is taken from the following Sara Ford's weblog > entry: > > > > "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" > > http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m > anage-an-agile-team-after-6-years-of-waterfall.aspx > > > > "The mind just simply can't comprehend" - this is what happens with every(?) > experienced developer's mind used to develop and debug their software via > long running (heavy) debug sessions as well as with "waterfallish" PMs - the > mind of experienced in "doing it other way" developers and managers just > can't comprehend how Test Driven Development can results in robust "bullet > proof" software usually developed with a lot less pressure and stress - and > (sic!) with higher quality, adaptability to the future changes, agility. > > > > That's a long way to get one's mind starting to really comprehend what > happens when you take that route - the sooner you'll start following it - > the better for your business. > > > > 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 Thu Jan 28 04:45:22 2010 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 28 Jan 2010 13:45:22 +0300 Subject: [dba-VB] FYI: The mind just simply can't comprehend In-Reply-To: References: <016f01caa002$0caddca0$260995e0$@spb.ru> Message-ID: <017401caa006$ff2f7a70$fd8e6f50$@spb.ru> Max, She probably writes that blog in her spare time "just for fun" as we do post here? -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Thursday, January 28, 2010 1:31 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] FYI: The mind just simply can't comprehend Shamil, to write lenghty blogs like that simply tells me that she has too much time on her hands. that could all be precised down to a paragraph. max On 28/01/2010, Shamil Salakhetdinov wrote: > Hi All, > > > > Just wanted to share one interesting weblog entry and my opinion/experience > on it - the subject line is taken from the following Sara Ford's weblog > entry: > > > > "How I Learned to Program Manage an Agile Team after 6 years of Waterfall" > > http://blogs.msdn.com/saraford/archive/2009/03/16/how-i-learned-to-program-m > anage-an-agile-team-after-6-years-of-waterfall.aspx > > > > "The mind just simply can't comprehend" - this is what happens with every(?) > experienced developer's mind used to develop and debug their software via > long running (heavy) debug sessions as well as with "waterfallish" PMs - the > mind of experienced in "doing it other way" developers and managers just > can't comprehend how Test Driven Development can results in robust "bullet > proof" software usually developed with a lot less pressure and stress - and > (sic!) with higher quality, adaptability to the future changes, agility. > > > > That's a long way to get one's mind starting to really comprehend what > happens when you take that route - the sooner you'll start following it - > the better for your business. > > > > Thank you. > > > > -- > > Shamil > > > __________ Information from ESET NOD32 Antivirus, version of virus signature database 4813 (20100128) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From marklbreen at gmail.com Sat Jan 30 06:20:08 2010 From: marklbreen at gmail.com (Mark Breen) Date: Sat, 30 Jan 2010 12:20:08 +0000 Subject: [dba-VB] [AccessD] C# automation of office In-Reply-To: <4B59EA1D.1080700@colbyconsulting.com> References: <4B59EA1D.1080700@colbyconsulting.com> Message-ID: Hello John, Sorry this is late in coming, the following code is take from a live project of mine where we write to Excel from VS2008. I have snipped sections of code from one routine, and I have highlighted with my comments the five seperate bits I have given you, each bit is only a few lines of code, but they may be all you need to get Excel talking. I hope the code formats ok here, if not, let me know and I will send you a text file. Note a few things below 1) you can insert comments easily 2) you can insert columns easily 3) selecting a range if often the first step to performing an action HINT: Record a macro in Excel to add color and then you will have the code to do that from within C# thanks Mark // This bit shows the using statements you will need using Microsoft.Office.Interop.Excel; using Microsoft.Office.Tools.Excel; // This bit shows how to op an connection to Excel if (grdParts.RowCount > 0) { if (MessageBox.Show("Export Master Parts List?", "Export", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == (DialogResult.Yes)) { this.Cursor = Cursors.WaitCursor; Int32 intPos = bsParts.Position; try { if (SaveChanges()) { Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook xlWB = xlApp.Workbooks.Add(XlWBATemplate.xlWBATWorksheet); Microsoft.Office.Interop.Excel.Worksheet xlWS = (Microsoft.Office.Interop.Excel.Worksheet)xlWB.Worksheets[1]; xlApp.Visible = true; xlWS.Cells[2, 6] = "Parts List "; xlWS.Cells[3, 6] = "Date " + DateTime.Now.ToLongDateString(); // This bit shows how to write comments to excel Microsoft.Office.Interop.Excel.Range nRange; nRange = (Microsoft.Office.Interop.Excel.Range)xlWS.Cells[intRowIndex + intRowIncrement, intColumnIndex - 11]; nRange.AddComment(strFullComments.Replace("\r", "")); nRange.Comment.Shape.TextFrame.AutoSize = true; // This but shows how to insert a column Range rng = (Range)xlWS.Cells[1,2]; Range column = rng.EntireColumn; column.Insert(XlInsertShiftDirection.xlShiftToRight, false); column.Insert(XlInsertShiftDirection.xlShiftToRight, false); // this bit shows how to save the sheet String strFileName = "C:\\McAfee Prd Report_" + DateTime.Now.ToLongDateString() + "-" + DateTime.Now.ToLongTimeString().Replace(":", "") + ".xls"; xlWS.SaveAs(strFileName, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); On 22 January 2010 18:10, jwcolby wrote: > Does anyone have a good information source for automating office > (specifically Excel) from C#? > > I have a spreadsheet which has code inside of it which pulls data out of > SQL Server and dumps it > into pages of the spreadsheet. I WAS using Access to do this but my Office > 2007 install broke my > forms (event properties no longer wire to the code behind form). Thus from > C# I need to cause a > spreadsheet to open, call a method of the code and pass a server / database > string to it. > > Any help will be greatly appreciated. > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >