Edmund's Q&A profile
Visual Studio Tools for Office How to Associate Custom Data with XMLNode object?
What is the best way of associating application-defined data with XMLNode objects Word's XMLNode object doesn't unfortunately have the Tag property (like many other Office objects), where I could store some data. Also I can't create a Dictionary, because XMLNode objects cannot be used as dictionary keys - they are obviously (like Range objects) volatile views of some opaque internal objects. In other words, (node1 is node2) can be false even if node1 and node2 are actually the same node in the source XML. Another option is to use what I call "paths", i.e. an array of integers where each element represents the index in the array of sibling nodes of the current parent node, recursively. This method would be great but it goes ...Show All
SQL Server Developing Stored Procedures using Management Studio Express
Hi, I am new to SQL server 2005. I am developing stored procedures as follows in Management Studio: 1)Right click Stored Procedures folder on a database 2)Select "New Stored Procedure" 3)Write the query in a .sql file 4)Execute the query. Now in this model, I dont seem to have a develop->test->develop and then deploy, type of development cycle. The problem is each time I execute a query it is deployed and re-executing it results in an error like: "There is already an object named 'NewEmployee' in the database." Which forces you to manually delete the SP and re-execute your query. It doesn't give you a chance to test your SP logic before deploying. Contrary to this, If I developed CLR SP's in Visual Studio, I wou ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Shader data flow questions
Two questions: 1. Is there any decent way to get a small chunk of data (4-8 bytes) from a vertex shader back to the CPU I would only do this in direct response to a mouse click, so it need not be fast, just possible. 2. The MSDN reference material here would suggest that a variable declared static could carry information from one shader invocation to the next, so that one could, for example, calculate a running min, max, or average of some property over all vertices. But in practice it seems that my static variable is zeroed afresh for every vertex. Below are the bones of my test case. The CPU program is providing each vertex with the "extra" variable, of which extra.x is a unique id for each vertex, sta ...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
SQL Server UTC to GMT+3
I have a database with a field called START_DATE_TIME saves the values in UTC time and i want when querying to use the GMT+3 without changing the data.. How can I do that This is a bit tricky. The problem is daylight saving time. If you don't have daylight saving time, then you have no worries and the other answer is perfectly right, just use dateadd and add 3 hours. :) If you do have this, or want to be careful about it anyhow you can probably use the CLR to build a function to do the conversion. I posted on my blog about how to do this to build a function to convert the dates to the server's datetime: http://drsql.spaces.live.com/blog/cns!80677FB08B3162E4!1311.entry (which might solve your problem if your server ...Show All
Software Development for Windows Vista xps to bitmap
I would like to ask a simple question. If I have a bitmap printer or a pcl printer, I would like to use xpd printer driver architecture. Where do I convert xps format to bitmap/pcl format 1). add a customized filter 2). handle in print processor Thanks in advance. Hi, first sorry for being so late :-) i think the best way is to convert the XPS on the last filter take a look at this post http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1037394&SiteID=1 hope it helps ben ...Show All
SQL Server Help with LinkTarget
I am trying to access the Employee Summary Report in reporting services examples using URL access. I want to open the sub-reports in this report to be opened in a different window. Here is the url I am using http://ReportServer/ReportService2005.asmx/ %2fAdventureWorks Sample Reports%2fEmployee Sales Summary&rs:Command=Render&rc:LinkTarget=_blank I was assuming that when I click the sub-report it will open in a browser since the LinkTargete is to _blank. Please let me know why this is not working . Thanks!! SqlNew The LinkTarget device setting is for the links inside the report, e.g. for drilling down. Instead, consider a javascript code: =void(window.open('http://localhost ...Show All
Visual Studio Express Editions How to use SELECT to find a similar not exact match
Hi. I have the following code : MyParam.Value = Me .TextBox1.Text MyCommand.Parameters.Add(MyParam) MyCommand.CommandText = "Select Blue, Description, Year, Model From Table1 Where Blue = " MyReader = MyCommand.ExecuteReader While MyReader.Read MySub = ListView1.Items.Add(n) MySub.SubItems.Add(MyReader(0)) MySub.SubItems.Add(MyReader(1)) End While What i want to do is that when i enter a value in the textbox it doesn't need to be exactly matching the values in the database, just a part of it. Example, let's say the "Blue" has 4 items as follows : 12145 12256 12188 12144 When i put only the value of "121", it will display (12145, ...Show All
Visual C# Case sensitiveness (For Console Application)
My current code: string math; <insert stuff> math = Console.ReadLine(); if (math == "add") { <Insert stuff> } My problem is that it only triggers if you type add, not when you type ADD or whatever, any idea how I would go about this I know it has something to do with ToLower, but I don't know what to do with it. I tried to do math.ToLower(Console.Readline()); and vice versa which of course didn't work :(. >> A more efficient way to do this is to use: More efficient if you're doing just the one comparison. However, there's a good chance he'll want to do several, in whcih case the best solution would be: string math = Console.ReadLine(); math = math.ToLower(); if (math == ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Where are loaded the material names?
I load .x files with this code Extendedmaterial[] materialarray; Mesh.FromFile(path, MeshFlags.Managed, device, out materialarray); Thats ok, I don't have any problem loading the mesh. But where are the names of the materials I have only the material properties like ambient color, diffuse color, ... but not the name of the material. The .x file save the material name, but it seems that name is not storage in any way when I loaded the mesh from the file. I'm sorry that I still have a limited knowledge working with DirectX, but anybody knows some magic code to retrieve the material names that are loaded with the mesh. X file do not include by default a material ...Show All
SQL Server DataBase Backup
Hi, I am using one database to store some information, which is now in my local system.Now i want to create a copy of the database, which is in my system to another system (including the data in the table's and the stored procedures i have created). Is this possible. if yes please help Thanks in advance.... If you want to use the database with data then you can RESTORE this A database with a new name. If not you can script this database with all objects and use the same script to create another database with new name. Refer to books online for RESTORE and SCRIPT for more information. ...Show All
SQL Server Subscriptions invalid after SP applied
Hello, I finished applying SP 1 to sql2k5. Under the replication monitor all of the subscriptions now look like [].databasename when they were originally [subscriber1].databasename. Under Mgmt Studio I see the subscriptions correctly. When I try and replicate I get the message "The subscription to publication 'pub_databasename has expired or does not exist." I have tried to reinitialize the subscriptions but it doesn't work. Is there a way to solve this without have to drop the subscriptions and add them again as I do not want to lose the changes that were made on the subscriptions. We are using merge replication. Thanks. John This is a serious issue, and not expected. Next time thi ...Show All
SharePoint Products and Technologies Writing custom webservice
helo i have wirte a c# web service for accessing to sharepoint service according to this document http://msdn2.microsoft.com/en-us/library/ms916810.aspx the document here mostly for C# language.but there is no spcification for VB.net. here i have seen i need to create three files .asmx *disco.aspx *wsdl.aspx in the document it says replace the content of disco file according to following < xml version="1.0" encoding="utf-8" > To <%@ Page Language="C#" Inherits="System.Web.UI.Page"%> <%@ Assembly Name="Microsoft.SharePoint, Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint.Utiliti ...Show All
Visual Studio Express Editions How do you erase desktop icons?
Is there a code that lets you erase an icon from your destop of from your "all programs" list Well.. the icons are actually or programs or shortcuts....its not just an icon ;P and i think you can do that IO.File.Delete("c:\Documents and Settings\Owner\Desktop\Application.txt") it sets to desktop...but you can change it to others...just go to that path in you're PC and find w/e u want and import the I/O class ofcurse Imports System.IO ...Show All
Windows Forms installer project error :This installation package could not be opened.
Hi every one.... I am having a problem in install the .msi file created by VS2005 using C#. I created a setup project for windows application by VS2005 using C#. When i click the mySetup.msi its installed successfully in the computer. i copied the mySetup.msi into another computer and try install it,its successfully installed. My problem is: I uploaded mySetup.msi into the application1 folder in my webserver. Then i download the mySetup.msi using following url: http://www.mysite.com/application1/mySetup.msi Its downloaded successfully then i try to install it it produce the following pop error : "This installation package could not be opened.Contact the application vendor to verify that this is a valid Windows In ...Show All
