Josh_G's Q&A profile
Visual Studio Problems going from the .Net 1.1 sdk to 2.0 with VS 2003
I am trying to learn to use the WMI .Net api, and here is a small c# program I got from the MS site I can't compile: Code: using System; using System.Management; // This example demonstrates how to perform a synchronous instance enumeration. public class EnumerateInstances { public static int Main(string[] args) { // Build a query for enumeration of Win32_Environment instances SelectQuery query = new SelectQuery("Win32_Environment"); // Instantiate an object searcher with this query ManagementObjectSearcher searcher = new ManagementObjectSearcher(query); // Call Get() to retrieve the collection of objects and loop through it foreach (ManagementBaseObject envVar in searcher.Get()) ...Show All
Architecture Typed Dataset or Custom Classes
Hey friends, I am a VB developer, soon I am going to start a new project. It will be a client application, I will use a SQL server database. I am used to use custom classes, I create my onw variables properties, events and methods. I am aware of the Typed Data Set and thinking about using it on my new project. The problem is that I have never used it, I do not know the minuses and plusses of the Typed dataset. Now, my boss and me on the desicion phase, we want to implement the most efficient and easy maintainable one. If you ask me , I'm quite happy with custom classes :)) My opinion is that the custom class is better for performance purposses, because I create properties and meth ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Problem with XNA Installation
Hi there, I've installed XNA on Visual C# Express and it seems that a template is missing : When I want to create a new project, I have only "Windows Game Library (XNA)"... Shouldn't be "Windows Game (XNA)" also be here I've unsintalled then reinstalled XNA but without success. Here is my configuration: - Windows XP SP2 French - Visual Studio 2005 Pro (90 limited day) : uninstalled to install VC# Express - Visual C# Express French - XNA Beta 1 (XGSESetup-Beta1.msi - 93 MB) : full installation - Old DX9 SDK (Microsoft DirectX 9.0 SDK (June 2005)) -> Uninstalled ! But the XNA Sample i've downloaded worked great on VC# Express (built and run) Am i missing something Like installing a proper DX9 SDK (and ...Show All
SQL Server Using declare statements and converting dates
I am having some issues trying to get a date into the right format. Here is the statements I am using DECLARE @Month INT , @Year INT , @Day INT , @Date VARCHAR ( 10 ), @FirstOfMonth SMALLDATETIME , @SecondDt SMALLDATETIME , -- Lst day of Previous Month @FirstDt SMALLDATETIME , -- 1st day of Previous Month @8mnthOldDay1 VarChar ( 10 ), -- 1st day of 8 months ago @8mnthOldDayLst SMALLDATETIME , -- Lst day of 8 months ago @13mnthOldDayLst SMALLDATETIME --Lst day of 12 months ago SET @Month = DATEPART ( MONTH , GETDATE ()) SET @Year = DATEPART ( YEAR , GETDATE ()) SET @Day = 01 SET @Date = CONVERT ( VARCHAR ( 4 ), @Year )+ '-' + CONVERT ( VARCHAR ...Show All
.NET Development Repeatable expression for a comma-separated list
Is there a way to create a regular expression that would validate something like this: 111-11-1111,222-22-2222,333-3-33,444-44-4444 If I have an expression of ^(\d{3})[\-] (\d{2})[\-] (\d{4})$ for a social security number, I want to be able to repeat that expression for each ssn separated by a comma. This would be coming from a text box the user can enter multiple ssn's separated by commas, so I'm trying to validate the entire string, but each individual ssn within the string. Thanks, --David I have to agree with Ahmedilyas at least in terms of the validation by splitting the line then applying regex to each SSN. The reason being, if you are using regular expression to valididate over a group, ...Show All
Visual Basic Cross-threading error only on Win2k3 server
Ok, this one is driving me insane. I have the following very simple code Private Sub GetShares() 'Get a list of shares Dim SharesElement As XmlNode = ParentNode.AppendChild(XMLDoc.CreateElement("Shares")) Dim SharesQuery As New ObjectQuery("select * from Win32_Share") Dim WMISearcher As New ManagementObjectSearcher(WMIWrapper.MyWMIScope, SharesQuery) WMISearcher.Options.ReturnImmediately = True For Each Item As ManagementObject In WMISearcher.Get() Listbox_Shares.Items.Add(Item("Name")) Dim SharesChild As XmlNode = SharesElement.AppendChild(XMLDoc.CreateElement("Share")) SharesChild.AppendChild(XMLDoc.CreateTextNode(CStr(Item("Name")))) Next End Sub Private Sub GetBIOSInfo() 'Get BIOS info Dim BIOSQuery As New ...Show All
Internet Explorer Development Context Menu Extension in Internet Explorer.
I have a new context menu in internet explorer by modifying regsitry. Now I want an exe to open when user clicks on the menu item in internet explorer, but I am failing to achieve this. Can some one please help me. I have just placed exe path in the default value. Can some one help me > You have to write JavaScript code, to launch the exe file. After this, save this JavaScript code to some html file (in appropriate tags), and provide path to this file in the registry. ...Show All
Visual FoxPro System restart/shutdown with VFP tray application running
Hi, I have a problem with my VFP9 application based on systray.vcx and running on background. All works well except situation, when I try to shutdown, logout or restart system (Win Xp Pro). At this moment ON SHUTDOWN is triggered, event processing stopped and application closed. But nothing more happens. I must restart / logout again and now it works. Thanks for any help. Tomik. ...Show All
Visual Basic Double-clicking forms in VS VB.NET 2005
When double-clicking a form file in VS the default behaviour is to open it in design mode. To edit the source you have to right-click and select "View Code". Is there any way to reverse this so double-clicking opens the source and the designer is only accessible from "View Designer" Since I spend much more time editing the source this would be a relief. thank you, thank you, thank you! i was looking all over, but couldn't find such an obvious solution! again, thank you! ...Show All
SQL Server Problem when deploying Reports
Hello, I am working on SQL Server 2005 Reporting Services embedded in the Visual Studio 2005. I ve build reports perefctly, but the problem raised when I tried to deploy this report: I am deploying these report with a debug configuration , and I have tried with the 2 TargetServerURL: http://localhost/reportserver$sql2005 http://localhost/reportserver The Error message is the following: TITLE: Microsoft Report Designer ------------------------------ A connection could not be made to the report server http://localhost/reportserver$sql2005 . ------------------------------ ADDITIONAL INFORMATION: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the erro ...Show All
Visual Studio Team System biztalk message problem
Dear all, My scenario is i calling a send pipeline in orchestration. I pass a message of xmldocument type to this pipeline. pipeline processes incoming message and return result in xmldocument object. Result is basically a flat file data now whenever i try to extract contents from message that is of xmldocument type it throws exception as it is invalid xml document. how can i extract contents of an invalid xmldocument Regards, Farukh. Hello You should post this to one of the biztalk forums. This forum is for answering questions on the new Distributed System Designers that ship as part of VS 2005 Team Edition for Architects. http://msdn.microsoft.com/newsgroups/ Biztalk is under Enterprise Development Thanks Brian [MSFT ...Show All
Smart Device Development Installation of CF 2.0 SP1 failed. Why? PLEASE HELP ME :-((
Hi, 2.0SP1 setup exit without errors, but cgacutil always say version 1.0.4292.0. Look at "19/10/2006 09:35:37: Delete GAC list file: failure". Please help me, this drive me crazy. Greetings from Italy. O.S. is WinCE 4.2 .NET core edition. This is my log: 19/10/2006 09:35:23: Entered Install_Init(). First Call: Yes Previously Installed: No Installation folder is: '\Windows'. 19/10/2006 09:35:23: Build 2.0.6129.00 created on May 9 2006 at 06:17:18 19/10/2006 09:35:23: Device CPU: 'ARMV4I', 05020000 (84017152) 19/10/2006 09:35:23: WinCE 4.20 19/10/2006 09:35:23: AKU string : '' 19/10/2006 09:35:23: OEM info : 'Mitac, Mio DigiWalker' 19/10/2006 09:35:23: Our trust level is: 2 19/10/2006 09:35:23: User LCID: 1 ...Show All
SQL Server Role security in Sql 2005 AS
I tried to create the "Role" for the OLAP database for the reports. I created two Roles, "Administrator" role with Full Control permission and the "Reporter" role and assign an Active Directory Report User to this role just enough prelivage to retrieve the data from the OLAP database for the reports (Process database and Read definition permission). On the data source of the Report Manager I set this AD Report User on the "Credentials stored security in the report server" and checked off the "Use as Windows credentials when connecting to the data source". However when I opened the report it breaks and when I increase the "Reporter" role to Full control as an Administrator in the AS, all the reports are working. Please how to  ...Show All
Visual C# Where to post questions about c# classes
I just posted a question about a mail wrapper class that I'm writing in the Visual c# language forum and it was removed, or maybe moved (how could I tell the latter) I'm wondering why this happened and where I need to post things in the future with regards to c# code help to avoid my posts being removed. there was nothing inflammatory etc in my post so I'm a little baffled please advise. Also, when you're in the forums there should be a link to "My Threads" at the top of the page, towards the right. This will take you to a list of forum threads that you've participated in, and I've found it to be quite helpful when threads have been moved from one forum to another. -Tom Meschter Software Dev, Visual C# IDE ...Show All
Visual Studio 2008 (Pre-release) Passing 3MB DataSet via WCF - Best Practice
Hi In our application we have several DataSets with about 2-4MB of size. Each DataSet contains of only one single DataTable. The data has to come from the server to a client via WCF. Client and server are in the same LAN. What are best practices to pass the data The only thing I think I can be sure about is that I should use binary encoding for the binding. The following questions are still not clear for me: Which binding should I use - netTCP or WSHttp I know that a DataSet produces overhead, but does this really matter in my case If the DataSet produces to much overhead, what should I do best to get the data to the client fast Should I use streaming or better the standard buffering Which timeout and max size settings do I have to t ...Show All
