Gouri Sankar's Q&A profile
Visual Studio Express Editions reading numeric data from excel sheet
Hi All , I am trying to read data from the excel sheet but i am facing problem when there is any numeric data is cell it gets Null value. Can some one please help me how can i read the numeric value from the excel sheets. If the same cell is having some other kind of data it is reading that data. Thanls Avinash Kundal I seem to have this one resolved. From what I understand, in your case, if there is a numeric value it will not display it - correct My excel had this: somestuff 123 ---- hi --- 5678 --- blue43 46 someNumber3 After some research, I believe the problem is in the connection string. The connection string should have the extended property HDR=NO; the code I used for the conn ...Show All
SQL Server Announcing the Analysis Services Stored Procedure Project
A few months ago, a few community-spririted Analysis Services guys (including me) got together to create some example Analysis Services stored procedures. I'm happy to announce that beta 1 of our project is now available to download here: http://www.codeplex.com/Wiki/View.aspx ProjectName=ASStoredProcedures The idea was to create a set of useful extensions to MDX to help solve common problems and at the same time provide some example source code to help people writing their own stored procedures. Please take a look and tell us what you think! Just so I understand: You are saying that the following MDX script will make the server calculate [measures].[summation] once in the scope iif statement: Create Member [Measures].[Summat ...Show All
Visual Studio 2008 (Pre-release) Determining height and width of an image without loading it into memory?
Given an image on disk (jpg, gif or png), how would I go about determining it's height and width without loading the entire image into memory Wolfgang's absolutely right -- metadata can be stored in very different places in different image container formats (jpg, tiff, etc...), and in general it's difficult to access this data in a coherent fashion. Fortunately, WPF does have a way of consistently getting PixelWidth/PixelHeight without decoding the bits themselves. The key is to use the BitmapCacheOptions Property: BitmapDecoder decoder = BitmapDecoder.Create(new Uri(@"d:\sample.jpg"), BitmapCreateOptions.None , BitmapCacheOption.None ); BitmapFrame frame = decoder.Frames[0]; Console.WriteLine("Wid ...Show All
SQL Server Problems connecting to SSAS instance over HTTP in Excel 2003
Our Biz users are all running Excel 2003, and we've recently set up a bunch of cubes that we'd like to open up to them. I followed the steps here: http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx to set up HTTP access to SSAS2005. It works great from my machine, I figured because I had SQL 05 installed locally and all the requisite drivers, etc. On our biz users' desktops, however, it wasn't as peachy. I first figured out I had to install MSXML6 and the SSAS 9.0 driver on their machine to connect to the cube. I downloaded those from here: http://www.microsoft.com/downloads/details.aspx familyid=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en Once I was able to set up the connection to the cube, and abo ...Show All
Visual Studio Tools for Office Poor Performance of Smart Docs
Hi friends, I'm part of a development group that develops a large application using VSTO technology and Office 2003. I'm responsible for the integration into MS-Word (fun fun fun!). The application is quite finished but I run into some performace problems now... And they are quite strange... I have a timer that starts in the beginning of the ThisDocument_Startup event handler and ends at the end of this method. My problem is that my smart document loads in about 30 seconds (!) when my timer shows that my code finishes after only 5 seconds... I've ran some tests and I concluded that the more Dlls I use in my doc, the more loading time I get. This is one conclusion but it still doesn't really explain what is taking sooooooo long for Word to ...Show All
Windows Forms How determine if control activated via mouse or keyboard?
It's important for some of my application controls to know whether they were activated by the mouse or keyboard. How can I determine this I thought that the EventArgs for the Enter event could tell me, but they don't. I thought of checking if the mouse was in the control.. but that doesn't mean the mouse was actually clicked. Then I thought that I could just trap the MouseClick, and flag this for subsequent Enter event, but no such luck. A mouse click causes the Enter event to fire FIRST as follows: <do the click> Enter Event Focus Event MouseDown Event MouseClick Event etc. By the time I catch the MouseClick event, the Enter event has already been processed. There must be some simple way to ...Show All
Visual Studio Custom connect code not getting called
I have in my diagram an element (call it ElementA) that is represented in the diagram as a compartment item in a compartment shape. ElementA has a 1-1 reference relationship to another element (ElementB). Neither ElementB nor the relationship have a visual representation in the diagram (other than the TreeView). The reference from ElementA to ElementB is set via a drop-down in the properties window. I want to to perform some custom logic when the ElementA -> ElementB relationship is first created. I provided a custom implementation of ConnectSourceToTarget for the (RelationshipName)Builder class. When establishing the relationship via the properties window, ConnectSourceToTarget is never called. In fact, no methods in the builder cla ...Show All
Visual C++ C++/CLI - SortedList vs get_Item/set_Item
Hi, Converting actually applications originally from Managed C++, I couldn't find any C++/CLI equivalent of following statements: SLst_estime-> set_Item (Descr_Itm, cur_Estm_Itm); CL_PriceLst^ cur_Estm_Itm = dynamic_cast <CL_PriceLst^>(SLst_estime-> get_Item (Descr_Itm)); SLst_estime is actually a SortedList, "Descr_Itm" being my key value and "cur_Estm_Itm", and object from class "CL_PriceLst". Any hint of what is now the equivalent of "set_Item" and "get_Item" Couldn't find any infos in my book or MSDN...:( Thanks in advance, Stephane ...Show All
.NET Development Efficient way to make a rolling cache of strings?
I need to have a cache of strings that holds up to a given number of strings and then after that point, dumps oldest strings out while adding new strings. Anyone have a suggestion for the best way to do this The ArrayList and other collection classes that let you specify an initial size don't stop at that size... as soon as you approach it's capacity, it doubles itself. It seems like a cache would have been a good class to add to the .NET collections framework, but thats another thread. You need a FIFO (first in, first out) data structure. One of the solutions is using a Generic Queue in System.Collections.Generic. Have a look at this code: Queue<string> mycache = new Queue<string>(3); // will hold 3 strings mycache ...Show All
.NET Development Best Practice - Implementing Dispose / Exposing the Disposable Resources
I apologize if this thread is in the wrong forum. Our general rule of thumb is if our class owns a class level unmanaged resource or a managed resource that contains a Dispose method then we implement IDisposable on our class. So, for instance, we have a class level DataTable that we instantiate from within the class, since it has a Dispose on it, we implement dispose. No problem there. My question is, if we expose that class level DataTable that our class owns via a property, or return it via a function or even return it via a reference parameter....should we still clean it up via dispose We are divided here at our shop. I say no, my boss says yes. We are currently cleaning it up in the dispose. 8) My thought is we are sending t ...Show All
.NET Development Generic Collections and XML Serialization
Hopefully somebody can help me out with this weird behavior [I sure hope it is something stupid I just missed]. Here is what I've got: public interface IContent { void Reset(); } public class ContentChunk : Collection<IContent>, IContent, IXmlSerializable { public void ReadXml(System.Xml.XmlReader reader) { System.Xml.Serialization.XmlSerializer objectSerializer; reader.Read(); // move past container while (reader.NodeType != System.Xml.XmlNodeType.EndElement) { string fieldClass = reader.GetAttribute("fieldClass"); reader.ReadStartElement("ContentBlock", ""); objectSerializer = new System.Xml.Serialization.XmlSerializer(Type.GetType(fieldClass)); ...Show All
Internet Explorer Development Selectively Removing IE History
Hi all. Is there a way to effectively traverse the URL history and selectively delete entries (our pages) from it. We have a web based application that uses a client side ActiveX control, so we have full access to the Windows API. Any help or direction would be greatly appreciated. -BG I was able to put together a prototype that successfully calls the DeleteUrl method from IUrlHisotyrStg. After this is done I can confirm that the selected URL's are gone if I enumerate thru the history again. So far so good, but... If I pull up IE, the URLs are still listed in the history and they're also still in the Temporary Internet Files directory. So I'm really not sure what I've accomplished by doing ...Show All
Visual Studio Team System CTP6 bug - Lost file association for .sql files
2 and ahalf minutes into using CTP6 and I'm already reporting what I think is a bug Thankfully its not a biggie. Prior to installing CTP6 I could double-click on a .sql file and it would open up in SSMS. Now I get an error dialog: "This file does not have a program associated with it for performing this action. Create an association in the Folder Options control panel." Easily fixed of course! Anyone else get that -Jamie I have now. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx FeedbackID=229354 -Jamie ...Show All
SQL Server SQL Server 2005 to SQL Server 2000
I have a slight problem: I have a database, that needs copying from SQL Server 2005 on one machine to SQL Server 2000 on another. This database is about 300+MB and contains about 100 tables, 51 views and various other bits and bobs. It is crucial that we have a simple procedure for doing this, and since the backup/restore facility doesn't work from 2005 to 2000 SQL Servers, I am left with a script to generate a skeleton database, and then an SSIS package, that I have built using the wizard, to do the rest, only the SSIS package doesn't work properly with more than about 16 tables. It would seem that with less than 16 tables, the SSIS package stays simple, containing the data about each table to copy, but with more than 16, it crea ...Show All
Visual Studio Team System GET Task Definition and Attributes??
Hi All, Is there some detailed documentation and samples of the Get task in Team Build I used this blog, but didn't really detail what i wanted to do. http://blogs.msdn.com/nagarajp/archive/2005/10/21/483590.aspx Can anyone tell me what atrtibutes I have to set to get the contents of a certain folder in Source Control to a specific physical filepath location on the harddisk This doesn't work: < Get Condition = " '$(SkipGet)'!='true' " FileSpec = " $/MySourcePath/HelloWorld/**/* " Workspace = " C:/Temp " Recursive = " $(RecursiveGet) " /> THanks Md Md, The mapping betwe ...Show All
