João S. B.'s Q&A profile
Visual Studio 2008 (Pre-release) LINQ2SQL Cast Exception on Average Aggregate only after I add an OrderBy on a Joined table
Hi, I am having an issue with the Avergage operator. I am joining two tables, and projecting some aggregates in the result. As soon as I join to another table, it fails. Average equates nicely in the un-joined example, but fails in the join. I thought I'd bring it up in case i'm doing something silly, but the query does seem reasonable. Let me know if you need more information. This works: var q = from call in db. CallLog where call.Incoming == true group call by call.Number into g select new { Avg = g.Average( c => c.Duration ) }; foreach ( var call in q) Console .WriteLine(call.Avg); SELECT [t1].[value] AS [Avg] FROM ( SELECT AVG([t0].[Duration]) AS [value] FROM [Call ...Show All
SQL Server Linked Objects - SSAS 2005
Can I add the data of several cubes in one main cube May be with linked objects Example: Sales data for company with one headquarter (main factory) and 2 foreign factories. I can build a single cube with all the data and having an entity (or factory) dimension to recognize the data source and define roles on that dimension to grant access to the data. Can I also build 3 cubes and link the 2 foreign factory cubes to the main factory cube The structure of all cubes are almost identical. I wanna just add the content (dimension data and fact data) to the existing main factory cube. The underlying idea is to use the foreign cubes twice. As local cubes at the foreign factories (because of bad internet connection) and as source cubes ...Show All
Smart Device Development Audiosys.h - switching between headset and speakers
Hi, I am developing a sound application on Windows Mobile 5. I wanted to switch the sound output from external speakers to headset speakers. There is a message: waveOutMessage(Handle, MM_WOM_FORCESPEAKERS,....); but the required header file Audiosys.h is missing. If any of you have it, can you please help me out Also, do you guys know of any other method to solve the problem. Thanks, Vijay Pls check the following link for more appropriate forums for this topic. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=286724&SiteID=1 Srikanth bogadapati ...Show All
Smart Device Development PPC emulator does not display xml files
Hi, My PPC app is actually developed using VS2003 and upgraded to VS2005, i.e CF2.0. Now i've a strange prob. My app creates few xml files to temp store info. when the app was run in 2003 i was able to check the app with the IE in the emulator. But after upgrading, i mean in 2005 its not displaying the contents of the xml file. What do i do - Hari Both the emulators are different. VS2005 is ARM emulator and supports PPC03 SE onwards. This could be due to the difference in components in different images. I would recommend you to post your query to microsoft.public.windowsce.app.development where it has got better chances of being ...Show All
SQL Server Converting DB from SQL 7.5 Binary format to SQL 2000 Unicode
I have a database in SQL 7.5 Binary format on which I am trying to convert the collation to case insensitive from case sensitive. The master database is already case insensitive. I have converted collation of database on the same server with the proper collation. Could someone please give me some guidance on conversion for the DB of SQL7.5 Binary to SQL 2000 DB Unicode. ...Show All
Visual C# Casting Arrays?
Hi, I have a method which returns an object array: object[] sortArray(object[] input, int[] order); And I want to be able to cast the array that it returns, for example: string[] array = (string[])sortArray(input, order); While this compiles, at run time I get a casting error (InvalidCastException, Specified cast is not valid). How should I be casting the array, or can I cast it at all Thanks. here Is a much better way: string [] array = Array .ConvertAll< object , string >(input, delegate ( object obj) { return ( string )obj; }); &nbs ...Show All
Visual Studio Team System Check-in from different directory
Is there any way I can check in a file from a different directory from the one it was checked out, e.g. check-out dir = c:\project, check-in dir d:\equipment In VSS there was a edit box that allowed the directory to be overridden. Thanks, Jeff I wonder if you could put the files onto a shelveset, updated your workspace and then unshelve to the new folder where you should be able to check them back in. Might be worth a try. - Steve ...Show All
Windows Search Technologies Windows Desktop search
Is windows desktop search able to access and retireve previous saved versions of a word document This is a feature google desktop does under "cache" Will Vista incorporate this feature It should. It is the only reason I have google desktop, which seems to slow my computer down. The advantage to having it is if you happen to delete something on a document and then click save you can retrieve the information you deleted quickly, rather than buying and running an expensive recover and restore data program. I lost data recently this way, deleting much more than I realized. Thanks, Gino ...Show All
.NET Development String.Split Method (Char[]) - System.OutOfMemoryException()
Hi all, I am using String.Split Method (Char[]) to split a long article. Lets say the string may contain about 1 millions words. I would like to split it by the blank space (' ') in between the words. But it seems that the system throw an out of memory error. Anyone encounter these kind of problem Any ideas to overcome it Thanks in advance. In addition to the above 2 suggestions from Ryan I can also suggest you do the split in 2 waves. First split the string based on pages or lines and only then do a second split on each resulting string based on spaces for words. This would most likely (depands on your article) be possible with current memory constrains. Remember that every string h ...Show All
.NET Development Installing in mapped network drive.
Hi, I am developing an installer packege in VS 2005. One of our clients reported that he could not install our application in mapped network drive. One Unhandled exception "System.Security.SecurityException" is thrown. We investigated further and the issue can be resolved by changing the Trust Level of Local Intranet to full. But I want to know, if there is any way to resolve this issue using signing the assembly or any other methods How we can set zone or assembly Trust to full using signing Please let me know your valuable suggestions.... Thanks! Rathish P S. This has been aswered many times before. Search the forums. For example: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=85425&SiteID=1 ...Show All
.NET Development CLR hosting and MethodImplOptions.InternalCall
Is it possible for an unmanaged application that hosts the CLR to register functions as internal calls for the CLR For example the managed assembly would contain [ MethodImplAttribute ( MethodImplOptions .InternalCall)] extern static string NativeFunction(); and the host would register the unmanaged function that should be called when NativeFunction is called from managed code. Is this possible If yes, how (Can this work with MethodImplOptions .Unmanaged ) ...Show All
SQL Server How can one Connect (remotely) to SQLExpress which is installed on "Windows XP Home"
Hi all, I have to deal with a private network of laptops which are all equiped with preinstalled "Windows XP home" I've installed SQLExpress on one of these, but I cannot connect on it from the rest of the laptops. (I've successfuly done this with "Windows XP profesional" though, and local connections work fine as well). I've already setup the SQLExpress to accept conections throuigh TCP/IP but I can not think of something else. (Security comes to mind, but I do not know how to resolve it on "Windows XP Home"). Thank you Ioannis Hi Ioannis, Did opening the firewall solve this issue for you Regards, Mike Wachal SQL Express team ---- Mark ...Show All
Visual Studio 2008 (Pre-release) ListView background color when not focused
Hi I've been playing with ListViews for the past few days and have finally managed to get it styled the way I want. Now I've got one last problem: the background color of the selected row changes to a light grey when the ListView looses focus. Basically what I'm trying to do is get a ListView to look like a grid (totally transparent), but with the extra features (like automatic column sizing) of the ListView just in case I need them. So far I've created a list view that is totally transparent. The column headings are plain text, with the background showing through. There are no mouse over effects, no resize ability, no column drag ability i.e. the column headings are not buttons any more. Perfect. The same applies to the items: co ...Show All
.NET Development Suggestion: Overload TryParse to accept defaults
Hello- Most simple types (bool, int, double, etc) support a static TryParse function that will take a string, and a typed variable to try to parse that string into. It would be handy if there was a second overload of this TryParse function in each case that would also take a default value. Here's how it currently looks: bool foo; if (!bool.TryParse("true", out foo)) foo = true; Here's how it could look: bool foo; bool.TryParse("true", out foo, true); Thanks for the consideration, Eric Hey Stephen- Feeling like a stupid user in action here, but I'd actually tried going there first. I couldn't figure out how to get to a point where I can submit th ...Show All
Windows Forms Readonly databinding with a business object
I tried to bind a property of a business object to a TextBox control. I used a BindingSource component to accomplish this task. So far so good :-) The property of the business object is a read only property. I thought that data binding recognize this and set the TextBox control to read only. I was wrong. But it's even worse. If I change the text in the TextBox control I can't leave the focus from the TextBox anymore. The focus is trapped in the TextBox control and the user doesn't get any error message. Is it possible that data binding recognize the read only property and set the bound control to read only Can I prevent the TextBox to trap the focus I think the usability for trapping the focus in a control if the validation ...Show All
