Oren Solomon's Q&A profile
SQL Server Where to put DISTINCT in a CTE?
CTE's are surprisingly useful for paging data, but I'm running into a problem where I have to add a distinct clause. The idea is to pull topic records for a user's forum posts, but only one topic record even if there are multiple posts in the topic. Here's what I have so far: CREATE PROCEDURE pf_PagedTopicsByUser( @StartRow int, @PageSize int, @UserID int ) AS DECLARE @Counter int SET @Counter = (@StartRow + @PageSize - 1) SET ROWCOUNT @Counter; WITH Entries AS ( SELECT ROW_NUMBER() OVER (ORDER BY IsPinned DESC, LastPostTime DESC) AS Row, pf_Topic.TopicID, pf_Topic.ForumID, pf_Topic.Title, pf_Topic.ReplyCount, pf_Topic.ViewCount, pf_Topic.StartedByUserID, pf_Topic.StartedByName, pf_Topic.LastPostUserID, pf_Topic.LastPostName, ...Show All
Visual FoxPro Select question
Hi, I want to know how to put the result of a select statement into a single variable. For example, how will be the sql statement that puts the salary of an employee into a variable given employee_id. Thanks, You'd select into array as Don pointed out. However you might also use xBase commands directly and do not use a select. ie: local empSalary if !used('SalLookup') use Employee in 0 again alias 'SalLookup' endif empSalary = iif( seek( m.employee_id, 'SalLookup', 'employee_id' ), SalLookup.Salary, .null. ) ...Show All
Windows Forms Click Once Deployment with running scripts
Hi All I need help in deploying an application using clikc once. I have basic knowledge in click once and tried to publish, deploy simply application using click once. Now my scenario is, I need to run some scripts (SQL) when I deploy my application through click once. How can I do that Any guidance for this would be more helpful. Regards, Santha Here's what I do in my ClickOnce app that requires some additional configuration steps after the initial install. 1. From Solution Explorer, select "My Project" to bring up the project properties and select the Application tab there (it's the default). Check "Enable Application Framework" and click on the "View A ...Show All
Visual C++ Help with version resource
Hi. I have a Win32 project and I have added a version resource to it. Can someone help me on how to read a value from the resource and use it in my main application Any links for reading are welcome. Thanks in advance. ...Show All
Visual C++ Issue with MFC after migrating from Studio 2003 to 2005
I have a longstanding legacy application that was migrated into Visual Studio 2003. I have now migrated this to 2005 but have come across a problem. The legacy application uses some MFC dialogs from within a dll. When the .DoModal is called, an assert occurs in AfxGetResourceHandle(). When DllMain is called, the handles seems to be initialised properly, but then as soon as the CWinApp is constructed overrwrites all of that and nulls all the handles. It uses AFX_MANAGE_STATE(AfxGetStaticModuleState( )) as required on the function call into the dll. What I cant understand is why a project that worked in 2003 is now broken in 2005. I understand some changes have been made to the way mixed dll's are initialised, do I need to account for ...Show All
Smart Device Development How to use sockets to connect to http server??
Hello everybody, I am developing a win32 application for smart devices.I am new to windows programming.I have to connect to a httpserver and download some files.I would like to know how to connect to this httpserver using sockets at client side.I am using Visual C++(under Visual Studio 2005) and Windows CE platform. Any help in this direction would be appreciated.Thank you. Windows internet services (WinInet) can be used for the purpose. Please see the link for further information http://msdn.microsoft.com/library/default.asp url=/library/en-us/wceinternet5/html/wce50oriwindowsinternetserviceswininet.asp I hope it helps ...Show All
Visual C++ What is the latest on STL.NET?
I am finishing up a book on C++ .NET and I need to what the latest is on STL.NET. Is it available yet Whats the status Thanks. Check this webpage . Doesn't sound good, "next version", that could easily be 3 years from now... ...Show All
Internet Explorer Development Items remaining in status bar
Hello developers, I use AJAX library to refresh some parts on the page and faced with a problem when "(xxx) items remaining" appears in the status bar of IE and browser never finishes loading process. Is there any way to find out which resources browser cannot load Any debuggers or something like else Thanks for any advice. Regards, Alexander Kleshchevnikov. ...Show All
Visual Studio Tools for Office Remove delegate from Item.Read and Item.Open
the following code, adds the delegate to the Read of the Item, but doesn't remove it, why MailItem Item = new MailItem(); ItemEvents_10_ReadEventHandler handler = new ItemEvents_10_ReadEventHandler(Connect_Read); Item.Read += handler; Item.Read -= handler; Hi, I have re-posted your question to an Exchange newsgroup http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.exchange2000.development&lang=en&cr=US Regards, Darryn Lavery [MSFT] ...Show All
Visual Studio Tools for Office TaskPane in two word windows
I create an application addIn (vsto 2005 SE + word 2007 beta) . It contains a ribbon and a taskpane. A toggle button on the ribbon show and hide the taskpane. when the user opens more then one document of word, he got the ribbon on both windows, but the button in the ribbon on the second window show and hide the taskPane of the other window (i.e. both operate on the first window, and the user cant get a taskPane on the second window) How I can open an instance of the taskpane on each document Thank you Nimrod Maarten Thank you. If you will remmber, I will be thankful to get a post on this thread when it done... Nimrod ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Is adding every asset used to the project a necessity.
As I ask this, I suspect that the answer may be that I just don't know enough about the content pipeline. In previous hobbyist games I've worked on, it's been common to have a file that specifies a level or UI setup including which textures to load. The game parsed this file and loaded the textures appropriately. This separated the art from the code and allowed artists to modify or create new levels without any work in Visual Studio. My understanding is that any asset that is used must now be added to VisualStudio if it is to be loaded through the ContentManager. Does this mean that when I create such a file which defines a level (including all assets) I must also add all of these assets to VisualStudio This seems.... to put it directl ...Show All
Windows Forms Accessing parent Form from a thread
Hello, I have a winforms application with a bunch of user controls such as buttons, richtext boxes etc. I'm creating a thread on the click of a button and the thread spawns off and does a few tests in the background. I need to provide the user a status of whats going on with the thread, so I decided to update the text box from within the thread. Here's my code for spawning off the thread - // Run Thread Perfmain ^mgEx = gcnew Perfmain( "NULL" , "NULL" ); Thread ^mgethr = gcnew Thread( gcnew ParameterizedThreadStart(mgEx, &Perfmain::mgExistsThread)); mgethr->IsBackground = true ; mgethr->Start( ); Obviously, since I'm creating a new object for my form, all output is directed to the new objext mgEx. M ...Show All
Windows Forms The following CTRL+keys doesn't get the correct KeyEventArgs during KeyDown events
Hi, It seems that the following key combo are not raising any key events: CTRL+L, CTRL+E, CTRL+R, CTRL+J Testing it using the following codes: public Form1() { InitializeComponent(); this .KeyDown+= new KeyEventHandler ( this .OnFormKeyDown); this .fileToolStripMenuItem.Click+= new EventHandler ( this .FileMenuClicked); } private void FileMenuClicked( object sende ...Show All
SQL Server What system stored procedures have changed between SQL 2000 and SQL 2005?
What system stored procedures have changed between SQL 2000 and SQL 2005 I don’t know such paper either, I think the main internals was, that they changed the access to the system tables, as they are now put into schemas, rather than just owners. HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
.NET Development Typed datasets & serialization/deserialization
I have some complex objects that I would like to clone. Some of these member variables are typed datasets and will require deep copies. I would like to serialize/deserialize these objects into and out of binary format. When I serialize my object it won't serialize typed datarows (these are extended from the class datarow) but they are non-serializable. I think I understand why these are non-serializable - the typed datarow itself is not something that would normally maintain state when cloning. I could possibly alter the designer.vb classes for the typed datasets and make the offending methods nonserialized but I don't want to do this. I could also alter my class to make the typed datasets nonserialized and clone these manually into the ne ...Show All
