Tricos's Q&A profile
SQL Server Can you unpivot on multiple keys with the unpivot transform
Hi all, I have more than 1 set of columns I'm trying to normalize, can an unpivot transform handle 2 unpivots around DIFFERENT keys in the same transform If not, would the suggestion be unpivot into temp tables for whatever needs normalizing, than run an update query to generate the row that is desired Thanks in advance. Mark Mark Frank wrote: Hi all, I have more than 1 set of columns I'm trying to normalize, can an unpivot transform handle 2 unpivots around DIFFERENT keys in the same transform If not, would the suggestion be unpivot into temp tables for whatever needs normalizing, than run an update query to generate the row that is desired Thanks in advance. Mark ...Show All
Visual C++ bitblt Cpu issues
Hi, I am trying to implement a win32 screen capture application similar to VNC. Bitblt() function which i am using to capture the screen uses 100% cpu when the hardware acceleration is set to FULL. I tried Bitblt on HDC selected from CreateCompatibleBitmap & CreateDIBSection, but the results are same. Is there any way, that i can minimise the Cpu utilisation when hardware hardware accleration is set to FULL. Please help.. Thanks, --P V V R. Hi, Please find the below code part that does the Screen capture, for 8 bit mode. ..................................... . .. . .. . .. . .. // Set the uncompressed size of the dib DWORD dwDibSize = (DWORD) ...Show All
Visual C++ Arrays of structs don't display in debugger
When I have an array of structs, the Autos window, tooltip, and Quickwatch all display only the first element of the array. For example, struct Variable { char name[25]; enum VarTypes type; ... }; Variable var[10]; Now when var is displayed, there is a single-line format which shows the structure members for var[0] only. If in Quickwatch, you type "var,10", everything displays correctly; i e, you get a subtree with subscripts [0]. [1], etc, and each of these can be expanded to show the members of the struct. I already posted this in the "resize autos" thread, which you were reading. Here it is again: Here is what I get, every time: ...Show All
Smart Device Development Where is the Active Sync device name located?
Posted on: 02/22/2007 08:15:24 Not sure if this is the correct place to post but I didn't know where else to ask this question. Unable to program for my device with VS 2005 unless the OS is upgraded. I've had problems with my Viewsonic V37 Pocket PC. I had obtained an OS upgrade CD via ebay. I attempted to upgrade the OS from 2002 to 2003 and it didn't work - for some reason the USB port was unable to detect the device and I had to reset it several times, once for each attempt. I'm still back to the original OS. With each new attempt, I had to rename the device in my computer by a new name as the previous name was still there. How can the old names be removed Where is the device name association located ...Show All
SQL Server @@ identity does not work ?
By standard i try my questions in SQL Mangment. set nocount on insert into [order] (orderdate,deliverydate,status,Totalprice,customerID) values(2006-02-23,2006-02-23,'N',10000,10) (insert into temp (orderid)values(@@identity)) Major Error 0x80040E14, Minor Error 25569 > set nocount on insert into [order] (orderdate,deliverydate,status,Totalprice,customerID) values(2006-02-23,2006-02-23,'N',10000,10) (insert into temp (orderid)values(@@identity)) Invalid set option. [ Set option = nocount ] Without Nocount: insert into [order] (orderdate,deliverydate,status,Totalprice,customerID) values(2006-02-23,2006-02-23,'N',10000,10) (insert into temp (orderid)values(@@identity)) Major Error 0x80040E14, Minor Error 25501 > insert into [order] (o ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Reference rasterizer
My graphics card doesn't support Pixel and Vertex shader so i won't be able to do anything interesting with XNA, it's what i have heard. So i started thinking: will i be able to utilize the reference rasterizer (only to learn XNA) XNA supports reference rasterizer in addition to the HAL rasterizer I was looking at the doc's for XNA and it says you can use PreparingDeviceSettings event found in the GraphicsDeviceManager so I did this graphics = new GraphicsDeviceManager ( this ); graphics.PreparingDeviceSettings += new EventHandler < PreparingDeviceSettingsEventArgs >(graphics_PreparingDeviceSettings); then in graphics_PreparingDeviceSettings void graphics_PreparingDeviceSet ...Show All
Visual C# Problem with keybd_event()
Hello, I am using keybd_event to simulate keyboard in applications. Function works perfect in notepad, calc, all windows, etc. but in some directx program it is getting error. On some computers it can type keys but on some others it can not. I have no idea what to do to fixt it or what is missing on those computers. Anyone has ever met this problem or know how to fix it please Btw that's a part of source [DllImport("user32.dll")] private static extern void keybd_event( byte bVk, byte bScan, uint dwFlags, IntPtr dwExtraInfo ); private void keybd_press(byte bVk) { keybd_event(bVk, 0, 0, new System.IntPtr()); keybd_event(bVk, 0, KEYEVENTF_KEYUP, new System.IntPtr()); } ...Show All
.NET Development devolping Composite Control
I want to build Composite control using Datagrid in .NET 2.0 that should be reffered in ToolBox of VS2005. can any body suggest me some useful links regarding this problem and which project type should i choose for doing this. Ok thats cool. Then u have to develop a web user control. Right click your web project click add new item then click Web User control. In the web user control drag the datagrid and the button. Then drag this web user control in your aspx page. ...Show All
Visual Studio Team System Version Control Setup
Hello! We have setup TFS on our production server very recently. We are now deciding on the best strategy to layout our existing projects in the new repository. 90% of the time, the components used in a given new project are reusable. For this reason, all the components, new or old, are to be placed in the common team project. When new projects come in, a team project is created for the purpose of utilizing all the functionalities of a team project (like share point site, work item tracking). But, any new components associated with this project will be placed in the common Team Project (for future reuse in other projects). The layout will look something similar to this: Common Product1 Component 1.1 Component 1.2 ...Show All
SQL Server sp_xml_preparedocument VS nodes()
I am considering converting a stored proc which uses sp_xml_preparedocument to a select using the node() syntax. I made two sql scripts, one of each method with identical input xml and ran a query plan on each of them. To my surprise, the Sp_xml_preparedocument seemed to produce the better query plan. The Estimated subtree cost for sp_xml... was 3.36433 for 10000 rows and the estimated subtree cost for nodes() was 421.126 for 60 rows. Am I missing something or is sp_xml_preparedocument still the best method to shred an xml document sp_xml code: DECLARE @idoc INT , @trans_id int , @after_doc xml , @record_type int , @sm_session_id nvarchar ( 50 ), @trigger_start_time datetime , @user_id int , @fo ...Show All
Visual Studio Team System Import rolemembers
I just imported a database into a Database project. Directly after importing I did a compare with the same database. One would expect this would result in no differences, but there were some. The difference is that for roles which have a role member, this role member is not imported. When comparing schema's, the following code is shown in the target object pane (database) while the bold part is missing from the source object pane (project). CREATE ROLE [aspnet_Membership_BasicAccess] AUTHORIZATION [dbo] GO EXEC sp_addrolemember N 'aspnet_Membership_BasicAccess' , N 'aspnet_Membership_FullAccess' GO If I do a update, the role members are dropped. This is not what I want. In trying to fix this, I added ...Show All
Visual Studio Team System Storing Areas, Iterations, Query parameters in Config file
We have custom reports which uses Areas, Iteration paths, Query parameters, Report parameters. The problem is that whenever we add/modify areas and iteration paths we need to manually change the reports query to reflect the change. Is there a way to store all these values in a separate config file or any whereelse and avoid hardcoding these values in the query Thanks, Srikanth Hi Srikanth, In the out of the box reports we ship, for the report parameters for Area and Iteration, we use queries return the areas and iterations in that particular team project. Can you do something similar Can you describe why you need to hardcode the areas and iteration thanks, Mauli ...Show All
Visual Studio Crash in setup.exe after VS2005 SP1 failure due to insufficient disk space
Dear all, Sorry if this question has already been asked but I cannot install VS2005 anymore on my machine. The scenario was: - Installation of VS2005 - Attempt to install VS2005 SP1. - VS2005 SP1 setup reports insufficient disk space to copy a file and ask to retry after making space on disk - "Retry" pressed after making space on disk - VS2005 SP1 setup reports an error and stops installation - Uninstallation of all VS2005 components - Attempt to install VS2005 The result is a crash in setup.exe. Error signature: EventType : visualstudio8setup P1 : 183 P2 : 8.0.50727.42_rtm_x86ret P3 : msi P4 : inst P5 : f P6 : ca_installassemblydef.3643236f_fc70_11d3_a536 P7 : - P8 : 1603 P9 ...Show All
SQL Server Expression Data Type Conversion
I am getting the following error in my report. I am tring to program the BackgroungColor Expression so the if the value is null display a blue color else leave it white. Conversion from string "" to type 'Date' is not valid Here is my code sample: =Iif(Fields!ReturnTime.Value = "" , "AliceBlue" , "White" ) Hi RayClark, You cannot compare a string with a date. You can do this in several ways here is one: =IIF(Len(Fields!ReturnTime.Value)=0, "AliceBlue", "White") Use the length function to check the length of return time. If it is 0 set it to alice blue else set it to white :). http://jhermiz.googlepages.com ...Show All
Visual Studio Express Editions I can't install!
This is the error: Error 32003.File 'C:\Program Files\Microsoft Visual Studio 8\Common 7\Tools\vsvars32.bat' could not be opened for write. It won't install! Can anyone help Moved to the install forum. Are you running as administrator The error is common when not having enough permissions. Be sure to be logged in as administrator or a user that have permissions to complete the installation. ...Show All
