jon4paz's Q&A profile
Visual Studio 2008 (Pre-release) which is the beta of winfx that I should install to develop since Vista RC2?
Hi Which is the beta of winfx that I should install to develop since Vista RC2 Is it valid the september CTP Thanks in advance Javier I was also wondering what the timeline for releasing the various SDK bits that correspond with the RC2 release for those of us developing on XP. Is there an intention of releasing an RC2 version of the toolsets, or will that wait until an October CTP/RC3/RTM ...Show All
SQL Server Max function
Hi, The question is about the way max function works in SQL. I have to implement a database design where in i have to write a stored procedure which will perform an insert in the table/tables. This table/tables will in the long run have a large number of records, i have been instructed to create another table (lets call it tableA) which will have the primary keys of all the other tables and their respective maximum values being used. While performing an insert into one of these tables, i will have to probe the tableA and find out the currently used id for that table ( in which i have to insert a new row) and use the value for insertion. According to me, we can use a max clause in the stored procedure and achieve the following or use an I ...Show All
Visual C++ exception when using C++ and COM
I'm a totally newbie when it comes to C++ adn COM so if you have the answer please let me know, even if it's trivial. I'm using the following piece of code: #import "..\libs\BGMXmlLib.tlb" no_namespace #import "..\libs\BGMEngine.dll" no_namespace using namespace std; static CComPtr<IEngine> pIEngine; static CComPtr<_XmlWriter> pXmlWriter; class CCoInitializer { public: CCoInitializer() { HRESULT hr; hr = CoInitialize( NULL ); if (FAILED(hr)) { throw hr; } CComPtr<IUnknown> spUnknown; hr = spUnknown.CoCreateInstance(__uuidof(Engine)); if (FAILED(hr)) { throw hr; } spUnknown.QueryInterface(&pIEngine); spUnknown.R ...Show All
SQL Server Calculated Measure at Totals Level
Hello guys, Y have the following cube. Dimensions: Age group, Year Measures: Mortality, Population, Standard Population (this measures doesn't have Year dim relation because it applies to all Years) I need to get the [Mortality Age Adjusted Rate] defined as: SUM(Expected Death) / SUM(Standard Population) * 100 000 Where: Expected Death = (Mortality / Population) * Standard Population As you can see the Mortality Age Adjusted Rate (MAAR) is a measure that is not at the row level but it depends of the set of Age Group(s) selected. Example: This is an extract for Year 2003 to show you as example: Age group Mortality Population Standard Population Expected Death 0-4 years 6 275, ...Show All
Visual Studio Express Editions Automatically Resizing Data Grid View Control
Hi, is there a property I can set to automatically resize the data grid view control as rows are added The rows will be added programmatically. Thanks in advance. Peter Winson If You are Using Datagrid View then you can set the "scrollbar" property to show "both" Programatically ypu can write dgmyDataGrid.ScrollBars = ScrollBars .Both; ...Show All
SQL Server SQL CE top/limit, unable to find WORKABLE solution
Hi all, I'm being driven to distraction by my inability to find a workable solution here, i'll try and lay out my problem as simple as possible: My application analyses sentence structure, it stores hundreds of thousands of web pages, and stores all the words on those pages sequentially in a database with a primary id, the id of the page the word is from, and the word itself of course. ie : id , parent_id , word What i'm trying to do (which already works successfully in both SQL and MySQL) is to retrieve the word immediately before the one I specify and 3 words after the word I specify. Ideally in one union query but i'll accept it if that's too complex and go for two for now. Because of the sheer size of the database ( millions of keyword ...Show All
Visual Studio 2008 (Pre-release) svcutil errors on wsdl name attribute
Hello, I am trying to generate WCF client and service code from a WSDL file provided by a third party. The wsdl file passes validation in several verification tools. However, svcutil generates an error when run as such: svcutil importedfile.xsd thirdparty.wsdl The error is this: Error: Cannot import wsdl:binding Detail: The WSDL binding named ReferApplicationSOAP is not valid because no match for operation ReferApplication was found in the corresponding portType definition. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.fake.org/schemas/referApplication_1_3_1.wsdl']/wsdl:binding[@name='ReferApplicationSOAP'] If I remove the "name" attributes from the wsdl:input and wsdl:output elements under the wsdl ...Show All
Visual Studio Problems in a team using same Project File.
Hi all, I am relatively new to Sourcesafe, but have been using it for a couple of months now, and have noticed an issue that is setting us back a little. The scenario is as follows... We have four developers each working on the same project. We all have the latest version of the solution of our project from SourceSafe, and each decide to get on with our assigned work, which includes adding new Items to the Solution (such as Forms). But each time we add an Item, it requires us to check out the project file, which you then have to check back in so that another user can then add their piece or work (Item). But this will thrown an error now as the Project file is referencing the Item that my colleague created, but which isn't checked in as it ...Show All
Software Development for Windows Vista mshta.exe crashing when hosting ActiveX controls.
Hi all, I have an windowed activeX control that I've developed using the ATL libraries in Visual Studio .NET 2003. The problem that I seem to be running into is that it crashes when the control is hosted inside mshta.exe, but not in IE7 or in the ActiveX test container (tstcon32.exe). According to the code, the crash seems to be occuring in StartWindowProc deep inside the ATL code (during in-place activation). Of course this causes DEP to kick in and shut down mshta.exe. I know the control is correctly registered (I had to do that running as Administrator), and running mshta.exe with heightened privileges doesn't seem to work. Like I said, it's confusing since I can insert the control into tstcon32.exe, and even open the page in IE7 and it ...Show All
Software Development for Windows Vista creating desktop on vista and launch IE on it
Hi, All I run into some issue with creating a new desktop on windows vista: If I create a 2nd desktop using CreateDesktop (with NULL for security attributes), and launch an IE using CreateProcess() on the 2nd desktop from default desktop, it will be created with medium integrity level and a pop up on the 2nd desktop mentioning that Admin rights is required w/o real IE displayed. However, launch an IE using CreateProcess() on default desktop directly is OK(and in low integriy level). Then I tried launching an IE using CreateProcess() on default desktop from 2nd desktop instead, it works fine with an IE with low integrity level appeared on default desktop. So, how can I enable same behavior on 2nd desktop as the default one - IE c ...Show All
SQL Server Select Statements in SQL 2005
I know this is probably a dumb question but I need to find a for sure answer on this. When a developer writes SELECT statements in their code will the * clause work with SQL Server 2005 We have tried to discourage such activity but has not worked. We are in the process of moving our systems to SQL Server 2005 and wanted to know if this would be a gotcha. Thanks for any advice, comments on this subject. Jeremy Jeremy: For one thing, select * leaves "land mines" in stored procedures. What happens is that the meaning of select * is determined at stored procedure compile time and not at stored procedure run time. The problem occurs when a column is added or removed. Since the meaning of SELECT was determ ...Show All
Visual Basic Send Message Api
I need help using the SendMessage(a) API What I need to do is send a mouse click to a windows (hWnd) that I have the handle to and the mouse click needs to be at an X and Y that I specify. I would like to use this API Declare Function SendMessageA Lib "user32.dll" ( ByVal hWnd As IntPtr, ByVal Msg As Integer , ByVal wParam As UIntPtr, ByVal lParam As IntPtr) As IntPtr but I am unclear on exactly how to fill the perameters I believe the 2nd perameter I put in a constant, WM_LBUTTONDOWN or WM_LBUTTONUP both of which I am unclear of the value for, and then 4th perameter is what will determine the x and y of the click. I am not 100% sure though. Stephen Weatherford MS wrote: Th ...Show All
Visual C++ How do I return from a static member function
I don't know how to return from a function if it's expecting and ADT type. I can't use *this on static member functions. My header prototype looks like this: class Fraction { private : int numerator; int denominator; SignType sign; /******************* Fraction Operators ********************/ static Fraction addFract( const Fraction &f1, const Fraction &f2); } My implementation looks like: Fraction Fraction::addFract( const Fraction &f1, const Fraction &f2) { Fraction::numerator = (f1.numerator*f2.denominator) + (f1.denominator*f2.numerator); Fraction::denominator = f1.denominator*f2.denominator; return * this ; } // end addFract ...Show All
Visual FoxPro Foxpro7 crashing with "fatal error exception code=c0000005 ..."
Hi I have a tricky issue in my VFP7 application. At least tricky for me. The application is crashing with fatal error C0000005. Sometimes I see a message like this one in the eventlog: "Faulting application <appname>.exe, version 1.4.82.0, faulting module ntdll.dll, version 5.1.2600.2180, fault address 0x00010f29.". Sometimes the application just hangs. I also see the Windows error "The instruction at "0x...." referenced memory at "0x.....". The memory could not be "read"", and then the application is closed, of cource. The error does only appear in situations where I print, but it does not occur in an exact pattern, or when I pass a particular code line. I use a third party dll called foxpp.dll ( ...Show All
.NET Development Marshalling structures with variable-length inline strings
Greetings, I'm having trouble solving a pinvoke marshalling challenge in C#. I need to call an unmanaged API function which expects a structure containing a variable length inline string. Here's the unmanaged function prototype (from MSDN): BOOL SetupDiGetDeviceInterfaceDetail ( HDEVINFO DeviceInfoSet, PSP_DEVICE_INTERFACE_DATA DetailInterfaceData, PSP_DEVICE_INTERFACE_DETAIL_DATA DeviceInterfaceDetailData, DWORD DeviceInterfaceDetailDataSize, PDWORD RequiredSize, PSP_DEVINFO_DATA DeviceInfoData); The troublesome guy is the third argument, DeviceInterfaceDetailData . Here's its definition (again from MSDN): typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA { DWORD cbSize; TCHAR DevicePath[ANYSIZE_ARRAY]; } SP_D ...Show All
