Mystagogue's Q&A profile
Visual C++ Checking in source code Native or Managed compilation?
I want to reuse the exact same include in both unmanaged and managed code. Here is an example: double MyClass::GetSqrt() { #ifdef MANAGED return System::Math::Sqrt( fNumber ); #else return sqrt( fNumber ); #endif // MANAGED } Does VC++ 2005 create different preprocessor definitions when compiling in /CLR or Native configurations Is there another way to check that in the source I can of course define myself MANAGED prior to include but I would rather use a more automated way. Thanks, Antoine Clappier ...Show All
SQL Server Retrieving Most recent transaction date
Hi, I have a fact table containing the transaction code and date on a daily basis. I need to find out for a particular account the most recent date when a particular transaction 'abc' was received. I need to find out most recent dates for other such transactions as well to be displayed on one single report. Basically I would need something like: ABC Date - Most recent date when 'ABC' transaction was sent XYZ Date - Most recent date when 'XYZ' transaction was sent. ........ I thought of using the filter available on the cube browser, but if I use filter and use the '=' operator I can only specify one transaction code. But I need dates for different transaction codes. Any thoughts on this would be greatly apprec ...Show All
Software Development for Windows Vista sdk sample - boot image problems
Using the sdk sample app: "C:\Program Files\Microsoft SDKs\Windows\v1.0\samples\winbase\storage\optical\imapi2sample" I tried taking the image from a boot cd (known to work). Then extracting the boot image. Then burning the data from the disc (temporarily copied to the hard drive) along with the boot image to create a new boot cdr. It does burn the disc (in separate attempts, I used both bbie and ultraiso to create the boot images) - but the disc will not boot a computer :-| The computer complains with: "CDBOOT: Couldn't find NTloader" Shouldn't this work We have found the root cause of the issue. Unfortunately it appears to be in Windows XP boot strap code. We ...Show All
.NET Development Exception: DataTable internal index is corrupted: '5'. on ...
Hi, I have a problem with bindingsource component in framework 2.0. I have a combobox bound to a bindingsource which is also bound to a dataset with 2 related tables and a datagridview bound to the same bindingsource. What I want to do is : When the selectedindex property of my combobox changes, the corresponding cell value must be changed in the datagridview. But although the value in bindingsource changes, datagridview does not display the new value. That value is displayed after I move the mouse over that cell and make it invalidate its region manually. Another error I caught is the one that you can see as the subject of my post. I do not know why i have that message when I try to change the property of ((DataRowView)mybindi ...Show All
SQL Server Replication in SQL server2005
Hi there i need an advice on replication in sql2005 i've heared that i can't make replication between two cluster servers installed on them sql2005 and they are in different domains so please can you tell me is that true and if is what can we do to solve this because they are in different places and we can't give them the same domains of IPs thanks I've never heard of that restriction. You can replicate between machines, regardless of whether they are even in a domain. You simply have to specify login credentials for each of the replication agents. ...Show All
Smart Device Development API for Pocket PC
Hi, Is there any API for Pocket PC 2003 which I want to use for VS2005(CF2.0). Thanks in Advance Hi, Is there any API for vibration for Pocket PC 2003 which I want to use for VS2005(CF2.0). Thanks in Advance ...Show All
SQL Server Not associated with trusted sql server connection
Hi All... I'm using asp.net 2.0 against a SQL Server 2005 database and am getting an error, Login failed for user 'MyUser'. The user is not associated with a trusted SQL Server connection. I've done searches for this error and most say to switch from windows-only authentication to mixed mode. That seems more like a workaround rather than a solution. I mean we should be able to use windows-only right So how does one set up that user to be associated with a trusted connection The odd thing in my setup is that I'm using the exact same username and password as I'm using to connect to the database with Visual Studio 2005 and that works fine. But when I try the same acct/pwd from asp.net, I get that error. FWIW, here's my connection ...Show All
Smart Device Development DivideByZeroException running GPS example code
I’m new to pocketpc development with Visual Studio and just learning from the examples shipping with Windows Pocket PC SDK. I’m specially interested in devloping GPS aplications so I’m quite frustrated by getting an DivideByZeroException running the GPS example ( http://msdn.microsoft.com/library/default.asp url=/library/en-us/mobilesdk5/html/mogrfGpsSample.asp ). The exact error which shows up: GpsSample.exe DivideByZeroException Application::Run+0xf Form1::Main+0xa I can’t find any divisions in this example and would appriciate any help to figure out which part of the code throws this exception. I’m running Windows Mobile 5.0 on a Eten X 500 pocket PC ( http://www.etencorp.com/products/Communication/X500.php ) and cgacutil.exe s ...Show All
SQL Server Database Engine Tuning Advisor gives non existent errors in SQL 2005
Hello, I am sure you have heard of Community server - if not you are just using it ;) I decided to try to optimise the performance of my site, run a trace and then DETA. And I am getting errors like these: SanjayAgrawal wrote: Can you please use the -d option (dta.exe) or "Database for Workload Analysis" option in UI to set the database context to the database that contains the stored procedures. Thanks Sanjay I'm having a similar issue, and I have set the database context to the correct database the contains the stored procedures and tables. Any clues ...Show All
Smart Device Development Failed to create new project in VC++ 2005
Dear All, I am trying to create a new project for Win32 Smart Device using VS2005 and Mobile SDK. But I always get this error "project creation failed". I tried to re-install Mobile SDK again but I still get the same error... any ideas. Best regards, It is working fine now Thanks a lot daveie ...Show All
.NET Development ExecuteNonQuery not working within CLR Stored Procedure
I've written a CLR stored procedure that pulls the results from a SQL stored procedure using a SqlDataReader. I send out the information via a web service and then try to log information returned by the web service using another SQL stored procedure via the SqlCommand.ExecuteNonQuery method. The information never gets written back and I get no exception. Any thoughts on how I can get this to work Thanks. CLR UDF code: [SqlFunction(FillRowMethodName = "FillRow", TableDefinition = "AccountNumber decimal (18, 0)," + "PurchaseOrder nvarchar (50)," + "OrderDate decimal (18, 0)," + "OrderTime decimal (18, 0)," + "VendorCode nvarchar (50)," + ...Show All
Visual C++ Access a __declspec(dllexport) method gives Access Violation
Hi, I'm having a problem accessing a __declspec(dllexport) method from a .exe file. The compiling and linking runs OK, but when I run the debugger, it tells me that I have an "Unhandled exception at 0x00376dfc (UserLogin.exe) in ProcMonSvc.exe: 0xC0000005: Access violation reading location 0x0043524c." I've been importing and exporting methods to and from DLLs and it worked fine. Why did the access violation happen and how can I bypass it ...Show All
SQL Server T-SQL to copy stored procedures
Hello, I'm using SQL Server 7 I have stored procedures in one database, I want to copy them to another database on same server. I want to overwrite the existing one, if it is there. What is the best way Thank you. Thanks for the reply. Because I wanted them to overwrite, I took the easy way out. I went to target DB, deleted all User stored procedures, went to recovery DB, highlighted all user stored procedures, did "copy" went to analyzer, pasted, ran it. Bam. 5 seconds. Done. :) But... I'd still like to know how I get it to overwrite existing. Is that possible ...Show All
Visual Studio Express Editions How to use the BackGroundWorker??
I have an application that pulls data out of a database based off search criteria that is set in a form. What I would like to do is have a backgroundworker setup (or something else that will do the following) that allows for more then one search to be done at a time. for instance.... I want to pull all the names of people that have a name starting with "j" and I start that search and the data starts to pour in. Then as that data pours in I want to start another search with the same form of names that start with "t" but I dont want to interupt the first search and I dont want to have to wait for it to finish. In my research I believe a BackgroundWorker is the object that can handle this so what I have done is setup a BackgroundWor ...Show All
Windows Forms Click Once Configuration File
Hi, I am developing a smart client that is connecting to a database directly for now and want to put it on a CD that can deploy the files on a server. During the deployment, I want to set some application settings on the smart client, like setting the database server name and so forth. I don't want to do this on the client side. Is there a way to do this. Please let me know. Thanks!! I was expecting it since click once signs it so that malicious code doesn't get into the code after released. That is a good check though. Here is another suggestion. Ask the admin to create a text file and put it in the server location and during the application start get the updateuri location (from ApplicationDepl ...Show All
