Mike McGrath's Q&A profile
Visual Basic What's the deal with Generics
Hi, I have the following Function Public Function EnterOrder( ByVal custCollection As Generic.List( Of CustomerDTO), ByVal OrderDTO As OrderDTO) As Boolean Dim customerBOCollection As New Generic.List( Of CustomerBO)(custCollection) ...............Do stuff End Function I get an error when I run the program basically saying unable to convert CustomerDTO to CustomerBO. What other way around this do I have CustomerDTO is my serialized object and CustomerBO (name speaks for itself) is the one with the rules etc. With one customer it works like this Dim customerBO as new CustomerBO(CustomerDTO) I now need to pass a collection of customers and I was turning to Generics for assistance. Any ideas ...Show All
Visual Studio Team System File Upload Not working with VSTS
Hi,I am going to my File Upload as a pop-up page.I have tried to supply the file path directly in the upload control and using browse button also.But it fails every time.It leads my custom error page with the following error.Original MessageUnable to validate data. OriginalException: at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)What could be wrong in my script.Thanks,Madhu Also, are you using SP1 We fixed some problems with recording in SP1, so you should try installing it and re-recording the test. One of the problems fixed is that EventAr ...Show All
Software Development for Windows Vista intrin.h unexpected behaviour
Just installed the Vista SDK, updated all my paths, tried to compile my current project and got this: C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\include\intrin.h(912) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\include\intrin.h(912) : see declaration of '_interlockedbittestandset' C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\include\intrin.h(913) : error C2733: second C linkage of overloaded function '_interlockedbittestandreset' not allowed C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\include\intrin.h(913) : see declaration of '_interlockedbittestandreset' Anyone got any clues ...Show All
Visual Studio Team System C#
hi forum how to solve this problem Inconsistent accessibility: field type 'DataGrid_Hyperlink.DataGridLinkLabelColumn.LinkLabelLinkClickedEventHandler' is less accessible than field 'DataGrid_Hyperlink.DataGridLinkLabelColumn.LinkClicked' thanking u in advance the only time i have seen messages like this are when i've changed the modifier from public to private or protected, therefore "trying" to hide the inherited method. ...Show All
.NET Development Unable to read data from the transport connection
I am trying to connect to a FTP server with a 3rd party FTP component (using FTP over SSL). I am able to get a directory listing, and download files from the server without any problem. But, when I am trying to upload a file to the server, I get this error: "Unable to read data from the transport connection: An established connection was aborted by the software in your host machine." I am using VB 2005 on .net framework 2.0. The FTP component is in 2.0. Just to try if the uploading works with other FTP component, I downloaded one more component and tried it. I am able to upload files without any problem. I emailed the tech at the frst FTP component (one that does not work), and he tested it from his side, and it works fine ...Show All
SQL Server Missing Data/MDX Query Problems
I've also posted this on microsoft.public.sqlserver.olap. Hello all, I'm running into a unique situation where I'm not able to get the desired results via an MDX query. I have a fact table that look like the following: create table FactLabor ( ID int not null, EquipHierarchyKey int not null, LaborMinutes int null ) ID EquipHierarchyKey LaborMinutes 1 11631 60 2 9165 30 The dimension table looks like this: create table DimEquipHierarchy ( EquipHierarchyKey int not null, Level1EquipID int not null, Level2EquipID int null, Level3EquipID int null, Level4EquipID int null, Level5EquipID int null ) EquipHierarchyKey Level1 Level2 Level3 Level4 Level5 11631 88965 66714 NULL NULL NULL ...Show All
Visual C# Passing Parameter to method and Return type
Hello All, Good Day! I am in the process of studying C#. I made a method with paramters and with out parameters. What is the key difference between passing and not passing parameters to a method. Also, I made a Void method and return type method. What makes the difference between these both The book that I am using doesnt really explain why we need to do that. Experienced peoples, please share your views with real time examples. Thanks, John What is the key difference between passing and not passing parameters to a method. Simple parameters are passed to functions, Functions use those parameters and do their Task. While Out Parameters are passed to that functions, ...Show All
Visual Studio Express Editions Going to give winsock2 a go. Thanks
This is my code: #include <afxsock.h> int main(){} And this is the error messages I get, cannot find " afxsock.h" Then linked up the directory where I found it (C:\Program Files\Microsoft Platform SDK\Include\mfc) then it complained again and needed windows.h I linked it up again and tried to compile, however now it needs something called uafxcwd.lib which lies in (C:\Program Files\Microsoft Platform SDK\Lib\AMD64\atlmfc) and (C:\Program Files\Microsoft Platform SDK\Lib\IA64\mfc) - What do I have to do to finally get this compiled Will it go on forever asking me for libraries can I add a master include library that will eliminate all my problems forever Cheers Idar ...Show All
Visual Studio 2008 (Pre-release) Shouldn't Join be part of the Query Expression Pattern?
The C# 3.0 specification states that "The recommended shape of a generic type C<T> that supports the query expression pattern" is as follows: delegate R Func<A,R>(A arg); class C<T> { public C<T> Where(Func<T,bool> predicate); public C<S> Select<S>(Func<T,S> selector); public C<S> SelectMany<S>(Func<T,C<S>> selector); public O<T> OrderBy<K>(Func<T,K> keyExpr); public O<T> OrderByDescending<K>(Func<T,K> keyExpr); public C<G<K,T>> GroupBy<K>(Func<T,K> keyExpr); public C<G<K,E>> GroupBy<K,E>(Func<T,K> keyExpr, Func<T,E> elemExpr); } cla ...Show All
Visual Studio Express Editions Help regarding the learning resources
Hi, I followed the learning resources on http://msdn.microsoft.com/vstudio/express/visualcsharp/learning/default.aspx Lesson 9: Databinding Data to User Interface Controls. Here the problem I encountered: After adding the database and the data source. I selected datagridview than drag and drop the customer data source to my form. Started the program, I realise from the datagridview I could not save changes to my database. Why is this so Is the save button not programmed correctly To Markku Behm, The database was created locally on one com. I am using SQL server 2005 EE, I changed the property value of the .mdf to 'Do not copy' an exception occurs. I than tried the 'Copy if newer' but still the database is not ...Show All
Smart Device Development Slow Connection Manager / GPRS connection
Hi, I'm using the following code in a loop every second to check that the GPRS connection is active, and if not then connect it. It worked fine under VS2003 but since changing to VS2005 it runs incredibly slowly and makes the program inoperable. Can anyone shed some light on it or offer any improvements Thanks if ( ( ( Global.connMgr.Status != ConnectionStatus.Connected ) && ( Global.connMgr.Status != ConnectionStatus.WaitingForNetwork ) && ( Global.connMgr.Status != ConnectionStatus.WaitingForPath ) && ( Global.connMgr.Status != ConnectionStatus.WaitingForPhone ) && ( Global.connMgr.Status != ConnectionStatus.WaitingForResource ) && ( Global.connMgr.Status != ConnectionStatus ...Show All
.NET Development Dataset with two tables from different sources
I am trying to resolve a problem. I have the following. One dataset, we'll call dsPatientInformation Table #1 inside dsPatientInformation called tbPatientDemo. tbPatientDemo source comes from a SQL DB and has fields, PatientID, PatientName, PatientState Table #2 inside dsPatientInformation called tbPatientBalance. tbPatientBalance source comes from ACCESS and has two fields, PatientID, PatientBalance I need data to end up in the following format, PatientID, PatientName, PatientState, PatientBalance Now yes I could add a new column to Table #1 called PatientBalance, then loop through the rows of Table #1 and perform a lookup on Table #2 to insert the patient balance into my new column. Using a merge would just append the r ...Show All
Visual Studio Team System Bill of materials
Hi, I’m looking for a command to retrieve a list of files tagged with a certain label. The purpose is to have a ‘bill of materials’, a list of the names and versions of all files used for a certain build or release of our software. How can I create such a list using tf.exe, tfpt.exe or any any other command line tool Those lists are archived internally for audits etc. Thanks, Tom ...Show All
Game Technologies: DirectX, XNA, XACT, etc. PIX doesn't work with MechCommander
I am trying to run MechCommander in PIX, but it doesn't work - no Run file is saved. I recompiled MechCommander for DirectX9, using the Include and Lib directories from the DX9 SDK, June edition. I deleted all the *8* files to make sure there is no reference to DirectX8. However, when running MC2Rel.exe from PIX, no stats are displayed and no output file is saved. Anybody knows why this happens This is because GameOS is running DirectX 7.0. When you switched out the DX version only part of the game will be recompiled using the new version of DX. Most of the render and memory management stuff exsists inside GameOS which we did not ship the source code for (it is a lib). ...Show All
Visual C# Reading Console Arguments Bug...
I'm passing some command line arguments to my console app and the string[] args is combining two of the arguments together. I run something like this: blah.exe /a testing /dir "C:\" /args blah and it args[4] is C:\" /args It only happens when I have a trailing \ and then a ", but how else would I do it for a directory A possible workaround would be to run this: blah.exe /a testing /dir "C:\\" /args blah blah.exe /a testing /dir "C:\Program Files\\" /args blah I know that this isn't and elegant solution... maybe someone else can post something better. Regards, Fernando ...Show All
