pmak's Q&A profile
SQL Server need help on T-SQL
Hi guys, Assume I have the following rows in a table 'T' ================================= C_ID R_ID Created Date ================================= 345 294 2000-08-01 14:16:08.000 345 295 2000-08-01 14:27:13.000 345 296 2000-08-01 14:28:41.000 As you can see, I have different record for the same C_ID - 345. What I want is to retrieve the record with the minimum R_ID and minimum Created Date value of that C_ID. In other words I want to get the following record: 345 294 2000-08-01 14:16:08.000 I don't need the other two records. Can anybody tell me the T-SQL query to achieve this req. Thanks! Derived tables are your friend select mt.* from T mt ...Show All
Microsoft ISV Community Center Forums "Bizzare" Sendkey Code in Excel
Following is my code... Range("A1").Select 'Select cell A1 Application.SendKeys "BIZZARE{ENTER}", True 'Enters BIZZARE in A1 and focus goes to B2 Application.Wait (Now + TimeValue("0:00:02")) Application.SendKeys "{UP}", True 'Again focus on A1 Application.Wait (Now + TimeValue("0:00:02")) 'Range("A1").Select 'Just in case {UP} doesnt work Selection.Copy 'Path 1 Range("B2").Select 'Path 1 ActiveSheet.Paste 'Path 1 Application.SendKeys ("^C") 'Path 2 Range("B2").Select 'Path 2 Application.SendKeys ("^V") 'Path 2 My code wanted ...Show All
Visual Studio 2008 (Pre-release) Sending a FileInfo object to client
Hi. I'm having trouble getting a FileInfo object through to the client. First of all, if I add a operations contract on the server that returns a FileInfo object, it all works like a charm - The FileInfo object is received fine on the client-side. But in my setup, the operations contract returns a custom class that COULD hold some FileInfo object inside. Here's my setup: [ DataContract ] public class TypeDef { [ DataMember (IsRequired = true )] private string description; [ DataMember (IsRequired = true )] private string name; [ DataMember (IsRequired = true )] private object data; public TypeDef( string name, string description, object data) { this .Name = name; ...Show All
SQL Server Too many statistics
Hi all, my english is very bad, so i try to explain In my production database there are some tables with to many statistics (somenthing like 240, 230 statistics). This impact in perfomance 1 - Is corret drop this statistics and re-create like indexes 2 - How can i know in 247 statistics wich i transform in index 3 - Is correct unmark the option "auto create statistics" for not doing this Thanks and sorry my english In general, you shouldn't need to worry about this unless you have specific reason to believe that they are indeed impacting performance. I don't know the nature of your table & workload so I don't know if 230 statistics is reasonable or not, but I expect that the query optimizer created them with good ...Show All
Visual Studio 2008 (Pre-release) XAML error in the line <Setter Property="TabPanel.Bottom" Value="-1"/> (Using June CTP)
Hello I created an application using May CTP, and then I installed June CTP. I have tried to build this application with Interactive Designer (June CTP), but I got an error in this part of XAML: <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="True"/> <Condition Property="TabStripPlacement" Value="Top"/> </MultiTrigger.Conditions> <Setter Property="TabPanel.Bottom" Value="-1"/> </MultiTrigger> The error happened in this line: <Setter Property="TabPanel.Bottom" Value="-1"/> It says : " Cannot find the Template Property 'Bottom' on the type System. ...Show All
Software Development for Windows Vista A basic question about WF, plz help me
Hello, I have been learning Windows WF recently. But I've got a big block at the beginning. I want to develop an overtime management system. And it’s a long flow system,I think. I create 2 projects. One is a web project, the other is Squence Workflow Library project. My expectation is: 1. One user logs in this system and submit his overtime application in apply.aspx. 2. System sends a mail to the user's supervisor, in which is a message and a url which links to audit.aspx flowid= . 3. The supervisor receives the mail and clicks the link, by which he logs in the system and finds this application according to flowid And …. … My question is how to keep the workflow running in the memory. I think when I access this system, the workflow instan ...Show All
SQL Server any differents and advices about connection manager
first set up data source from solution explorer,then new connection from data source from connection managers directly new ole db connection or ado.net connection etc by right clicking from connection managers At the end doesn't matter how you created it; the connection manager will work exactly the same. The only diffrence is that with the first approach you only have to create a connection manager once and then can use it in multiple packages. Rafael Salas ...Show All
SQL Server BIDS - Error on design surface of Calculation tab in Cube
Has anyone seen this Within 'Business Intelligence Development Studio' (BIDS) with a cube opened and the calculations tab selected, the design surface displays a message that reads: Unexpected error occurred: 'Error in the application.' This occurs in any project I open and it still occurs when I restart BIDS or the computer itself. Any ideas Can anyone suggest a remedy Seems like it because it worked perfectly fine before I refreshed it with Office 2007 TR, that must have upgraded the dll's on the oledb folder to the 3009 release making it out of sync with the dll's on the tools / SQL Server. ...Show All
Windows Forms How to get the path to the install CD
In a Windows Installer project, is there a way within a Custom Action DLL to find out the path to the install CD and its subdirectories (which might be on a network share) I need to perform various comparisons of the version of the new EXE versus the existing EXE. I found out the hard way after several days of banging that even OnBeforeInstall gets called AFTER the files are copied. Grrr. Seems like a total misnomer for a function name. Our customers take 6 months to validate our software, so when we install the new (yet to be validated by them) version we are required to keep the old version around. My previous InstallShield setup script would move the old EXE to a subdirectory of the target direc ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Blender .X files and XNA compatibility
Are the .X files blender exports compatible with Xna GSE. At the moment I get 2 errors one shows: Error 1 Could not read the X file. The file is corrupt or invalid. Error code: E_FAIL. whenever i have subdivisions on my model. The other states: Error 1 Could not read the X file. The file is corrupt or invalid. Error code: D3DXFERR_PARSEERROR if I have any other shape in my scene other than the standard cube which automatically starts in blender. I am running blender 2.42a In the version of Blender I have, there are 2 .X exporters. I had to try both, and one of them gave me the error you are seeing, the other worked just fine. In my list the 2nd one is the one that worked. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Humorous but somewhat serious question about XNA
Microsoft has claimed the Nintendo Wii as a "kids toy;" however, if XNA can produce graphics and push performance up to what the Wii is capable of handling (games like Half-Life, Sims 2 from most XNA performance claims), does that mean that XNA is a kids toy too redshock wrote: Edit: I'm going to go ahead and use XNA. Sure, it may not be the fastest thing in the world for making games such as Oblivion, Are you looking to do an Oblivion level game ...Show All
Visual Studio 2008 (Pre-release) Moving a control on a Canvas at run time
Hi, I'm trying to produce a simple designer in Xaml, for a test app I've produced the following Xaml: < Window x:Class = " xamlWindowsApp.frmDesigner " xmlns = " http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x = " http://schemas.microsoft.com/winfx/2006/xaml " Title = " xamlWindowsApp " Height = " 450 " Width = " 582 " xmlns:my = " clr-namespace:System;assembly=mscorlib " > < DockPanel Margin = " 1,1,2,2 " MinHeight = " 50 " MinWidth = " 50 " Name = " dockPanel1 " LastChildFill = " True " > < Canvas MouseLeftButtonUp = " OnLeftButtonUp " ...Show All
Smart Device Development Device Information
hi all, I want the details of the mobile device at runtime. I.e the company name ex, Hp,imate,orange etc. and also the model name of the device at runtime. Any api for tht plz help. thanx You might want to bump up StringBuilder’s capacity a bit, say to a few hundred characters… Examining last error might be helpful as well. ...Show All
Visual Studio 2008 (Pre-release) WCF CustomBinding and Http Cookie, any luck?
Is it possible to hook up HTTP cookie somewhere in the Custom Binding stack Due to the specifications I was given, I have to store some Security Tokens in HTTP cookie. This sounds strange but it is a requirement. Thank you for replying. You can manipulate cookies in WCF by accessing HttpRequestMessageProperty.Headers or the mirror property on HttpResponseMessageProperty. This sample shows how to write a channel that uses cookies (and how to wire up that channel in a custom binding). Cheers, Ed ...Show All
Visual C# Reading the end of an XML file
I have a program that cycles through an XML file and outputs to another file every 1000 records. Thyis works fine until the end of the XML file is reached, when it fails saying my 'root' tag is not closed - although it does for the previous files. It seems to be having issues with recognising the end of the XML file, so can someone please confirm how this is done Currently I have a while loop to do this, with a for loop inside to cycle through the records, ie: while (XmlReader.Read()) { ... for (int i = 1; i <= 100; i++) { while (reads in a node here) { does the work } } Close the XmlReader and XmlWriter } This works fine for the beginning, until the end of the file is reached; is my way of reading the XML file correct (I have also trie ...Show All
