Mr Cai's Q&A profile
.NET Development How can I continue after an error?
Here's a good one for ya... I'm writing some code in a method that intentionally passes bad data to a series of calls in the method. The problem is, once the first error in the method is encountered, it jumps to the catch and then leaves the routine. What i need it to do is to continue at the next item in the routine that is going to throw an error. Since .NET doesn't seem to have Resume Next, is there any equivalent way to do this Public Sub CauseErrors Try Error1(BadData) Error2(BadData) Error3(BadData) Catch End Try End Sub Hi, The problem you are facing is not a problem but it is the intended behaviour of Try... Catch block Structure your Try ... Catch in the follo ...Show All
Visual C# Exposing soap functionality to c++ using c# via com...
I have some legacy apps in c++ that need to make soap calls. Finding info on the best way to go about doing this is really tough. Moving the vc6 c++ code into VS2005 was not a big deal... but adding the web reference to the project just did not fly. The service I am trying to hit is an https... which seems to not be do-able as far a sproxy is concerned. After some examination I come to find out adding the web reference in C# seems to work fine. The proxy generation engine for the c# side clearly works better and there is the implcation it can handle and https call. ( not confirmed ) So I figure... ok... just make a com object in C# and call it from c++... however the learning curve on this little task is a bit steep... ( an un ...Show All
Visual Studio looking for some tasks
Hi; Has anyone created a task for: nunit tests sn.exe signcode.exe I'ld prefer to not create something that I figure many many people have already created. thanks - dave Microsoft.SDC.Tasks library has some stuff for nunit and sn. You can download it from http://www.gotdotnet.com/codegallery/codegallery.aspx id=b4d6499f-0020-4771-a305-c156498db75e As for the signcode - could you just use the SignFile task that ships with Microsoft.Build.Tasks.Dll ...Show All
Visual Basic Is string in start of other string?
I need to know, how to find out if string 1 in in the start of string 2. Example: string1: test / string2:testing = returns true string1: test /string2: gettested = returns false Or you could do a comparison using the substring method dim s as string = "test" dim t as string = "test string" if t.substring(0,4) = s then '//This will be true end if Of you could use the left$ method (But this is older Basic method) if left$(t,4) = s then '//This will be true end if ...Show All
Visual Studio Team System Modify Solution Object and testing before deploy
I have a DB linked with my solution and VSS working ok. When I check out a SP and modify it - how can I test it before deploying it Deploy the solution to a test instance locally and test. When all is OK then do a schema compare with the production or whatever and use the upgrade script to update it. Alle ...Show All
Windows Forms combine datasets
i have 4 datasets and i want to combine all 4 of it into 1 dataset..any help If you need only one table, I think you need add row by row according your logic, but I think add relations between tables would be more flexiable, we can add relations between tables in one dataset, code as follow: using System; using System.Data; using System.Data.SqlClient; namespace Microsoft.AdoNet.DataSetDemo { class NorthwindDataSet { static void Main() { string connectionString = GetConnectionString(); ConnectToData(connectionString); } private static void ConnectToData( string connectionString) { //Create a SqlConnection to the Northwind database. using (Sq ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Beginning Game Development: Part III - DirectX II - Problem with the "Using..."
Just started the Direct X Part II (Part III) tutorial, and I seem to have an odd problem. I get one error whenever I try to build the solution, Error 1 The type or namespace name 'Device' could not be found (are you missing a using directive or an assembly reference ) C:\Documents and Settings\Doug Ross\My Documents\Visual Studio 2005\Projects\BattleTank2005\BattleTank2005\GameEngine.cs 68 17 BattleTank2005 Now, I put at the very top of the GameEngine.cs class, right below all the other "using" directives... using Microsoft.Samples.DirectX.UtilityToolkit; So now the "Using" section at the top of the GameEngine.cs looks like... using System; using System.Collections.Generic; us ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Why won't it accept the D3DXMATERIAL9 declarations?
Ok, I recently started this project and it just keeps growing and growing. I had this portion of code working before, so I don't understand why it isn't working now. I am trying to load a mesh and use it to render to a simple Directx model (ship.x). After some brief changes to my computer (Hard drive data was corrupted and I reformatted and re-installed the operating system). Anyway to keep it short I have my project I saved and I was trying to get it working again. Its seems to compile perfectly except when it hits this section: dMaterials = new D3DXMATERIAL9[dnumofMats]; pSHipTexture = new LPDIRECTTEXTURE9[dnumofMats]; For some reason it doesn't recognize the objects: D3DXMATERIAL9 LPDIRECTTEXTURE9. I have come across this problem b ...Show All
Visual Studio 2008 (Pre-release) Channel lifetime - best practices?
Hi, What are the best practices (p&p) for opening/closing proxy. Should I create proxy on my client and keep it open for all period of time, and close when client closes application, or should I open proxy, execute method, and close the proxy Keeping open proxy I need to specify inactivityTimeout="infinite", how good is that for server What is that means, some sort of session is created. How is that scale if I have load balanced servers Thanks a lot. Vlad. Hi Vlad, How often do you want to execute methods on the proxy Frequently creating/closing proxies can be costly. If you want to have high throughput (# of calls per second), you would want to cache t ...Show All
SQL Server Login failed for user 'XXXX\ASPNET'
Hi all, I review my server report from my asp.net app through reportviewer, and I got this error: Cannot open database "myDB" requested by the login. The login failed. Login failed for user 'XXXX\ASPNET'. I use username and password to login my app, and 'XXXX\ASPNET' is my ASP.net service account. Any idea Thanks, Jone Hi Konstantin, Thanks for your reply. I changed the credential from "Windows integrated security" to "Credentials stored securely in the report server" and entered my username and password that I used to login my machine. Then it woks well now. But I still have a question about this: after this project being delpoyed, many other ...Show All
.NET Development read binary, import into sql server 2005
I would like to import data from binary files into sql server. Can that be done with ADO.NET Also, the files are from a legacy custom db and nobody at the client's facility knows the format. How would one go about determining how the data is laid out in a binary file rwbogosian wrote: I would like to import data from binary files into sql server. Can that be done with ADO.NET Yes, Public Structure SqlBinary Member of: System . Data . SqlTypes Summary: Represents a variable-length stream of binary data to be stored in or retrieved from a database. rwbogosian wrote: Also, the files are from a legacy custom db and nobody at the client's facility knows the format ...Show All
Smart Device Development direct draw error
When I execute the sample code of Direct Draw Application , i get an error during execution in smartphone 5.0 Emulator,which says " Display Driver does not support a back buffer " and when i execute it on Device then it says " create Surface error ". What can be the probable reason Hello! I have same problem emulating pocket pc, so maybe anyone solved this problem somehow Does it mean that there is no back buffer support at emulator at all And that there is no way to test programs without real ppc ...Show All
SQL Server Double Sided?
Hi, I am using SQL Reporting Services 2000 - is it possible to make a report that prints double sided ...Show All
Windows Live Developer Forums Error 80131502 when trying to load my add-in
Hello :) I discovered the MSN Live Add-in SDK today, and I've been trying to play around with it a bit (in C#). I haven't been able to find ANY documentation for it whatsoever, so I've just been going off of sample code. I took a basic one (which ran and loaded fine, by the way), and modified it to its present form. The .dll builds fine, but when I try to load it in Messenger Live, I get: "The addin SmartTalker.AddIn.dll" could not be turned on. 80131502" ... and that's all! The code BUILDS fine, but doesn't load, and since I have no documentation, I don't even know where to begin looking for the problem. Here's the code: ============================================================== using System; using Microsoft.Messenger; ...Show All
Gadgets Group Policy behavior: Turn Off User Installed Windows Sidebar Gadgets
Hi, I've been looking at the group policy settings in Windows Vista for the Windows Sidebar. According to information I've found the policy "Turn Off User Installed Windows Sidebar gadgets" should behave like this: Turn Off User Installed Windows Sidebar Gadgets This policy provides administrators with the ability to block all gadgets not placed into the Shared Gadgets or Gadgets folders (in the Sidebar’s Program Files folder), both of which can only be modified by a user in the administrator group. Gadgets in the user’s directory will not display in the Gadget Gallery dialog or otherwise be allowed to run. If I copy gadgets to either c:\program files\windows sidebar\gadgets or c:\program files\windows sidebar\shared ...Show All
