Charles Tam's Q&A profile
SQL Server MDX - Case ?
Hi, Im using AS 2005 and I want to display a measure depending on the level of the hierarchy My hierarchy is as following : Level A Level B Level C Level D if the user selects Level A, I display the measure Sum_LevelA if the user selects Level B, I display the measure Sum_LevelB I suppose I should use MDX to do this (kind of CASE ) but im a newbie at MDX. Thanks in advance for your help. JL Here is the best way to do it in AS2005: CREATE MySum; SCOPE (MySum); Dim.LevelA.LevelA.MEMBERS = Sum_LevelA; Dim.LevelB.LevelB.MEMBERS = Sum_LevelB; ... END SCOPE; HTH, Mosha ( http://www.mosha.com/msolap ) ...Show All
Visual C# overloading == operator in c# fails checking for null values
Hi, I have developed one class called CProductInfo providing == and != operator features. I have one problem. When I use this class in my program, say CProductInfo product = null; and later, when i check for emptiness, if (product==null) it returns false as if the product instance is not empty. I tried various ways to eliminate this run-time error, but it just does not happen. Also I don't think there is use full tips on net for this. Can someone help Thanks in advance - Constantine <<<< THE BRIEF SOURCE CODE FOR CProductInfo IS BELOW >>>>> using System; using System.Data; using System.Data.SqlClient; using MyDataLibrary; namespace ProductManager2006 { public ...Show All
.NET Development Connection problem to an Excel File with ado.net (OleDb.OleDbConnection)
Hi everyone, I'm trying to add tables and data to an excel file with ado.net And I got this message : Driver ISAM not found while it's trying to open the connection I let you my connection string, I don't think there is error, neither in the register because, I checked it. olecon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & My.Application.Info.DirectoryPath & "\..\" & "Activity.xls" & ";Extended Properties=""Excel 10.0;HDR=YES""" olecon.open() I'm using Excel 2002 on the computer. Is soemeone ever had this problem thanks david There is no Excel 10.0 Extented Properties setting. The driver hasn't been updated since 8.0 so you should ...Show All
Visual Studio Express Editions Problem with WMI and PrintUI.dll
Sorry if this is the wrong place to post, but I can't see anything dedicated to scripting/wmi I have a script which uses PrintUI.dll to add a per-machine printer. This script runs as a 'startup script', assigned using Group Policy. I have another script which uses WMI to enumerate printer connections and set a default based on certain criteria. When I test the script by running it manually, it enumerates all local and network printers, including the per-machine printer added by the first script. When I assign the script as a logon script however, it does not 'see' the per-machine printer, even though it appears once the logon process is complete. Does anyone know of a good workaround (I can think of a few 'icky' ones) ...Show All
Visual Basic in my windows application i need to open the ms outlook
in my windows application of vb.net i need to open the outlook and set the to and from mail id and also a formated mail body can any one help me how to open the outlook from vb.net programming and set the to and from adress and also the formated mail body take a look at this: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=717220&SiteID=1 or this: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=654502&SiteID=1 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Value of '\\UNC\*.exe' is not valid for 'filePath'.
Hello all, This question is related in a way to XNA Game Studio Express, but may be out of the scope of this forum. After building and launching even a new Windows Game project an unhandled exception occurs: Value of '\\xpm-dc-01\User Data$\greg\My Documents\Visual Studio 2005\Projects\WindowsGame1\WindowsGame1\bin\x86\Debug\WindowsGame1.exe' is not valid for 'filePath'. I have gathered this is an ArgumentException thrown by the Icon.ExtractAssociatedIcon method ( http://msdn2.microsoft.com/en-us/library/system.drawing.icon.extractassociatedicon.aspx ). Clearly the value indicates a Universal Naming Convention (UNC) path. Is there a seamless way around this besides creating the project at a local location It may be important t ...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 Can I retrieve a result set from a sp into a variable within a Execute SQL Task?
Can I retrieve a result set from a sp into a variable within a Execute SQL Task agentf1 wrote: I am passing the sql in a variable and have a resultset set up to retreive the output/result set from the SP. So where exactly is the problem If you need the sql statment to be dynamic; you may want to use an expression inside of the Execute SQL Task to set the SQLStatementSource property: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=662860&SiteID=1 Now the second part would be to get the SP output into a SSIS variable; for that you can follow Jamies sugestion. If the SP returns more than one row you will need a SSIS variable of Object type. ...Show All
Visual Basic NO SQL Servers node in VS 2005 PROFESSIONAL Edition Server Explorer
I have VS 2005 PROFESSIONAL Edition. When I drop the Servers node in the Server Explorer, I do not see a "SQL Servers" node in the tree. It is my understanding that VS 2005 PROFESSIONAL should show this node. Any ideas why this is not the case Thanks for your assistance. Manuelmpf, I check the http://msdn.microsoft.com/vstudio/tour/vs2005_guided_tour/GuidedTourGoals.htm website and compared the difference among the Express, Professional and Enterprise edition of Visual Studio 2005. If you use the Express Edition, there is no Server Explorer at all but the Database Explore. However, if you don't install anyy SQL Server Database on your operating system, I don't thhink the Server Explorer ...Show All
SQL Server Issues with privileges
I am having trouble with providing the minimum security to a user. After issuing the following: GRANT EXECUTE ON SCHEMA :: DBO TO skillsnetuser ; I test the permissions with exec as login = 'skillsnetuser' exec prcElmtList 1 , 1 , 102268 revert ; and receive this message Msg 229, Level 14, State 5, Line 2 SELECT permission denied on object 'Org', database 'SNAccess_Dev', schema 'dbo'. The principal that owns the dbo schema is dbo and is the principle for all procedures and tables in that schema. What can I do to shed some light on what is causing this access problem Sorry for the late response, I have been trying to repro why ownership chaini ...Show All
Visual Studio Team System Sql Server Error When Performing Merge
I'm trying to perform a merge from a parent tree to a branched tree and am encountering the following error: A database error occurred (SQL error 2627) --> Violation of PRIMARY KEY constraing 'PK_tbl_Lock'. Cannot insert duplicate key in object 'dbo.tbl_Lock'. I'm running TFS RTM and SQL Server 2005 Standard Edition SP1 as a single-tier deployment. How can I correct this problem Mike Hi Mike, This looks similar to a bug fixed between RC and RTM. Assuming you are running RTM, it's not an issue known to me. Do you have exclusive checkout turned on, and/or are any of the files being merged binaries Most problems in tbl_Lock arise from those scenarios. Ultimately, if it's a new bug, we'll need ...Show All
Smart Device Development CameraCapture
I have tried code samples of Windows mobile-CECamera, and CameraCapture for C++. But I can not execute these programs.. I think the problem is my camera is not integrated in PDA. These sample codes are really for integrated camera My device is HP IPAQ 2790, and Camera is Photosmart camera SDIO Type.(not integrated in IPAQ 2790) I have tried CECamera, CameraCapture for C# and C++. Thanks. Alex Feinman wrote: Veo SDK supports video capture to a file. How As long as my knowledge, the SDK only provides SDIOCamSnapShot function for capturing still images to JPEG file. In SDIOCamSetting, it is little bit mentioned that this camera is capable to capture video, but I cannot find the corresponding fun ...Show All
SQL Server Out of virtual memory
I have one package that is constantly running out of virtual memory, right now I am on a development server, running only this package. The package is moving data from one table into another on the same server in the same database. The server has 3 Gb of memory and is only running SS2005 and SSIS. I am a local admin on the server and running the package through BIDS, once again for our initial testing. I tried setting the property BufferTempStoragePath to our E drive so it can utilize the 100 Gb of free space we have but that doesn't seem to work either. I have also tried setting the MaxRowSize to many different values to no avail. I am constantly getting an error, see below for exact error, when it gets through roughly half the load. More ...Show All
Visual Studio PLK Diagnostics
Hi All, In getting a Package load error when I try to run my package on a clean computer without VSIP installed. When I run the package on my machine with the /noVSIP switch, it works. Is there any diagnostic utils that I can run to help me determine the source of the problem As a side note / change enhancement can the authorization rountine give more information as to why the package was not autorized to load examples: unable to load dll, can't find resource #xxx, company / product name missmatch, invalid VS version... etc) Thanks, Drew Hi Drew, If it's a managed package, use the fuslogvw.exe utillity to see if you are missing a dependency or have an older version of a dependency inst ...Show All
SQL Server Problems Creating Report
Hi, I have only recently started playing around with Reporting Services (2005), and I am having some problems creating a basic report. What I want to display is a table which shows product names in the first column, sales for a specific period this year in the second column, and sales for the same period last year in the third column. The 'specific period' is determined by specifying a start week and an end week which I have set up as parameters. I have managed to produce the first 2 column with no trouble. However, for the third column I need to subtract 52 weeks from the parameters and use them as new parameter in the third column. Can anyone offer any suggestions Dave In MDX I would ...Show All
