NLaw's Q&A profile
Visual C++ Problem using #import with ADODB in VS2005
I have a VS2003 project that I am migrating to VS2005. It currently compiles just fine under VS2003, but when I try to compile it under VS2005, I get a whole slew of C2327 errors. The root cause appears to be the different way that VS2005 handles nested classes. However, the code that the compiler is having a problem with is generated by VS itself as a result of a #import: #import "C:\Program Files\Common Files\System\ado\msado25.tlb" rename( "EOF" , "adoEOF" ) rename( "BOF" , "adoBOF" ) rename_namespace( "ADODB" ) An example of the error that I receive is: error C2327: 'ADODB::_ADO::Properties' : is not a type name, static, or enumerator Has anyone else encoun ...Show All
SQL Server How to build this expression?
Greetings friends, I have the following T-SQL CASE statement. I've spent the last 10 minutes trying to convert it to an expression in my derived column component but to no avail. case when f.etypeid < 10 then '000' + cast(f.etypeid as varchar) when f.etypeid > 10 and f.etypeid < 100 then '00' + cast(f.etypeid as varchar) else '0' + cast(f.etypeid as varchar) end Many thanks for your help in advance. Hi again guys, Finally I managed to work it out. Silly me! The solution to the above is as follows : etypeid < 10 "000" + (dt_str,1,1252)etypeid : etypeid > 10 && etypeid < 100 "00" + (dt_str,2,1252)etypeid : "0" + (dt_str,3,1252)etype ...Show All
Windows Live Developer Forums Is anyone buying VE transactions?
Hello, I posted something similar to this earlier but no one responded. We want to transition more of our maps to VE but we're not sure how to merge VE into our existing MWS account. Is there something programmatic that we need to do (i.e. proxy the calls through our server so we can affix an account ID to the requests) Currently, we pay about $500 per month for MWS services and just use VE under the "5000 transactions or less per day" for a few of our maps. An associated question is, does MWS dish up the same map style as VE (tiling, etc.) From what I can see, it doesn't. Thanks, Jeff I'm still waiting Jeff. But I have a very different need in my licensing. If you're a current MapPoint customer you should ...Show All
SQL Server Copy database with encrypted column to new server and decrypt column there
To do this successfully do I need to backup the Service master, Database master, and database itself from the the Source server, then restore all three of them on the destination server (I'm concerned that restoring the source Service Master key to a new target server with an existing sql 2005 install will screw things up big time.) TIA, Barkingdog It's actually a little easier than that. All you have to do is restore the database and then restore the encryption between the SMK and the DBMK. The database master key should already be in the database so after that you just need to associate the DBMK with the new server's service master key. After restore, you will need to: 1) use <data ...Show All
Game Technologies: DirectX, XNA, XACT, etc. .swm
These files are very simple in structure, and it wouldnt be hard to write a converter. Heres how it goes: { String version (i.e "1.0.0.0") String originalFile (i.e "E:\dev\xna\source\starterkits\SpaceWar\media\projectiles\pea_proj.x") Int32 triangleCount Int32 vertexStride Int32 vertexStart Int32 vertexCount Int32 batchCount (for each batch) { &nbs ...Show All
Visual Basic Passing things from Form1 to Form2 and back
Hi everyone ! Imagine this : I have 2 Forms: Form1 and Form2 Form1 is the startupform and holds a button, Button1 , to show Form 2. Code: Dim F2 As New Form2 Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click F2.Show() End Sub On Button1_Click an new Form2 is shown. Form2 holds a button wich should change the text of Form1: Code: Dim F1 As Form1 Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click F1.Text = "hello" End Sub This gives the result : Object reference not set to an instance of an object. I know i ...Show All
Visual C# Which type in C# is equivalent to C++ HResult?
Hi, everyone. I have this kind of problem. On faculty i got to make an example of OPC HDA server with async reading. Also, only thing i got is specification of OPC standards. Now, i have trouble. I have OPC Core components exe file, which i instaled. When i create my file which implement, let say, IOPCCommon interface, i imported required dll file, which provide necessary interface. For one of methods i got next thing. public void GetErrorString(int dwError, out string ppString) { throw new Exception("The method or operation is not implemented."); } In specification is said that this method returns HResult HRESULT GetErrorString( [in] HRESULT dwError, [out, string] LPWSTR *ppString ); How should i implement ...Show All
Game Technologies: DirectX, XNA, XACT, etc. ContentManager questions about device resets
I am trying to figure out exactly what the content manager does and does not do for you. Here's what I've found. The content manager caches resources http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=886913&SiteID=1 The content manager does not help you load resources in a background thread http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=966705&SiteID=1 And, from what I can tell, though I've not found anything very conclusive, the content manager will take care of device resets. I've not been able to get this to happen though. Right now, I can move my game from one monitor to another and a texure is invalidated. This is how I'm making the texture.. tex = env.Content().Load<Texture2D>(@"content/tex/white_pixel&q ...Show All
Gadgets How to submit a gadget questions?
It says that all the files need to be zipped together and that the manifest needs to reference the relative value of the js and css files. Does there have to be a folder structure or could I just zip the gadget.xml, gadget.css and gadget.rs files and have the manifest as so "in bold below" < xml version="1.0" > <rss version="2.0" xmlns:binding=" http://www.live.com "> <channel> <!-- Specifies the name of your Gadget --> <title>My Interesting Photos</title> <!-- Gives a short description of your Gadget --> <description>A gadget to display your six most popular flickr photos.</description> <!-- Specifies the default locale for y ...Show All
.NET Development Loading 2 different assemblies which is referenced by each other
Dear ALL. I have simple Form1 application which has 3 buttons. What i want to do: 1. Create class library with WinForm and build it as Form2.dll 2. Create another class library with WinForm, add reference of Form2.dll, add Button1. Onclick event Form2.ShowDialog() and build it as Form3.dll This classes works correctly. Now, in Form1 application 1. When Click on Button1 must load form2.dll 2. When click On Button2 must load form3.dll 3. when click on Button 3 must show form2. after form3 displayes, as we said there is buttin1 which must show Form2. Please, I am new to C# reflection. Help me to solve that. Thanks in advance Teymur I assume then that you do not want to add ...Show All
Visual C# help with structs and arrays
Hello, I'm something of a C# neophyte, and I have the following problem. I'm trying to set up two arrays inside a struct: public struct Person { public int[] second; public int[,] response; } Then I want to declare the arrays, second = new int[actionwidth]; response = new int[actionwidth,actionwidth]; but then I get an error saying that response and second "do not exist in the current context". I presume this is because response and second are in the scope of Person. How can I declare these arrays Thanks for any advice. It would help if I knew what you're trying to do so I could have an idea of a possible implementation t ...Show All
.NET Development disposing/freeing memory for image
every few seconds (5) I recieve an image from a server. This works fast and well with wireless and usb connection, bluetooth is of course slower, i guess its advantage is that we can catch any possible errors. now, when I recieve an image, I read the contents into a memory stream until an EOF flag is sent. This all works great. Once fully recieved, I raise an event from my thread (non UI) to the UI, which in turn, raises another event to another form (so UI -> UI). This final event in the UI (picture viewer) then calls a delegate method to show the image recieved by reading it from memorystream: public void DoShowImage( MemoryStream theMemStream) { if ( this .InvokeRequired) { DoHandleSho ...Show All
Visual Studio 2008 (Pre-release) ASP.NET Client -WebReferences Changed The Interface And Timeout
I new a wcfservice as follow: [ServiceContract(SessionMode = SessionMode.Required)] public interface IMyService { [OperationContract] int DoLogin(string UserID, string Password); } In asp.net client.i cant find "add service reference" as else application,so i use "add web reference" to add proxy class,then the interface change to -> void DoLogin(string str1, string str2, out int iRet, out bool bIsOK); when i execute this code, take place a exception"timeout" , after bebug i found it is because my client cant connect to wcf service , I see if i use svcutil can make a proxy class and config ,but i want to know why cant use "add webreference" to produce the same interface as servi ...Show All
Smart Device Development Win CE 6.0 ARMV4I Emulator Build Error - 4K page alignment
I am building a Windows CE 6.0 image file that will include my application. I have a test application that I have built using C#. I have modified the project.bib file to include the application. When the image file is being built for the device emulator, I receive the following error message: Error 19 Error: only 4k page alignments supported at this time, found in module test.exe What does this error mean How can I include my application in the image file Hello... Thank you for the suggested change. This has worked. The "test" application can be downloaded and viewed in the windows folder. Unfortunately, when I try to run the test application, the application does not run. I have deployed the application to th ...Show All
.NET Development xDataAdapter functionality
Given xDataAdapter of x .NET Provider in ADO.NET 2.0 should xDataAdapter call row.AccepChanges() for an Insert command before updating output params and record returned during xDataAdapter.Update in order to ensure that Original row values are filled Original values are necessary to ensure that DataSet Merge operation works correctly in case PKs are returned from data source after insert either by output params of a SP or a returned record. I think my question was not so well formulated. Microsoft documentation for DbDataAdapter.Update Method (DataRow[], DataTableMapping) says: When using Update , the order of execution is as follows: The values in the DataRow are moved to the parameter va ...Show All
