Fasteddie2's Q&A profile
.NET Development safer method to read DateTime from database?
hey all, when i read DateTime data from database, currently what i'm doing is: //System.Data.DataRow row; //System.Data.SqlClient.SqlDataReader reader; try { System. DateTime t; t=( DateTime )row[ "DateColumn" ]; //or t= DateTime .Parse(row[ "DateColumn" ].ToString()); //or t= DateTime .ParseExact(row[ "DateColumn" ].ToString(), "formateString" , cultureInfo); //or t=reader.GetDateTime(0); } catch { //... } but the above mehtods will have format mismatch problem when the region/culture setting of sql server is different from the setting of the environment that application is running on. (eg. when date formatted as "MM-dd-yyyy" with "dd-MM-yyyy") therefo ...Show All
Visual Basic Getting a list of forms open
I want to get a list of forms open. My application opens a form, which in turn can open a modal form, which in turn can open yet another modal form, and so on. When the last opened form is closed, I need to enable the previous form. How can I obtain a list of open forms As you are opening the forms modally the previous one should be displayed automatically as you close them. If you want to list them use Application.OpenForms For Each F As Form In Application.OpenForms MsgBox(F.Name) Next ...Show All
Windows Forms Customize Toolbar...
Hi all, On most windows applications, when you right-click on the top menu/toolbar, you will see a context menu that has the item labelled 'Customize...'. How can I add this to my Windows Forms application Thank you, Stephen. Thanks for the repy. Do you know if there are any standard dialogs for this in Windows (or even third party), or will I have to write my own Regards, Stephen. ...Show All
Visual Studio Team System Visual Build Pro scripts
We have lot of 'visual build pro' scripts that do our day-to-day work. Is it possible to use those scripts in TFS(i.e call visual build pro scripts thru team build) Also, if yes.. is it a good idea to do this 1) It doesn't spwan any GUI. 2)No parameters to be put in by the user. But, yeah in the end, I am expecting a confirmation of the number of files and folders deleted. when run as command-line: C:\Program Files\VisBuildPro6>VisBuildCmd.exe "C:\VisualBuildProProjects\DeleteA rchive.bld" VisBuildCmd, Version 6.1.0.0 Copyright (C) 1999-2006 Kinook Software, Inc. All rights reserved. Evaluation Version: 30 days remaining 09/12/2006 02:38:32 PM: --------------------Starting Build: 'C:\VisualB ...Show All
Commerce Server Commerce Server 2007 catalogwebservice and bizTalk 2006
Hello, I would like to update stock items in Commerce Server 2007 using BizTalk 2006. What I can see so far is that I should be using the Commerce Server Inventory BizTalk Adapter. I am not sure how you would use this Adpater to update the quantity and query the quantity of Products in the Commerce Server catalog Can anyone shed any light on this issue Thanks Dom Hey Dom, Yes - You can use the Inventory Adapter to update the inventory in your system. The inventory adapter works on an incoming xml file. It will use this file to import the inventory into the system. To have that file be an update, you would need to make sure that you have the import mode set to incremental (not replace). You also need ...Show All
Visual Studio Team System Output of base.Problems collection
I have a custom rule that loops through all the methods available and checks for a particular violation. If there is a violation, I use the below sequence to add it to the Problems collection Resolution resElement = base.GetResolution( "error string" ); Problem prbDescription = new Problem( resElement, "Class Name" ); base.Problems.Add( prbDescription ); I have the above set inside the loop and during the execution (debugging), I am able to see the base.Problems having the list of items that were detected for violation. During debugging, I am able to see the list growing as I add the violations to base.Problems At the end of the Check method that I have overridden, base.Problems is returned. But in the ou ...Show All
Windows Forms Reordering tab control
I have a requirement to simulate reordring of tabs(along with controls in it) just as a user would do in excel sheet (user can reorder the sheets in a excel workbook while working on it using the tab kind of interface provided at the bottom of workbook). I tried to do it using tab control, but couldnot figure out how any pointers on this or any other control which would make it possible. Thanks Dinesh All you need to do is to find the right event for you (in your case I suppose you should aim at something in DragDrop) and add something along the lines of the following: TabPage TPTemp = this .TabControl1.TabPages[0]; this .TabControl1.TabPages[0] = this .TabControl1.TabPages[1]; ...Show All
Visual Studio Team System Is it possible to change deployment dir
Hi I would like to change deployment dir for tests. Is there any way to do it Hi, Vladimir, When useDefaultDeploymentRootDirectory is set to False, we use whatever userDeploymentRootDirectory is specified in Run Config. If you set it to relative path it will be relative to current directory, not to solution directory. Thank you, Michael ...Show All
Gadgets The gadget.xml file should only refer to .js files that are in the package. It shouldn't refer to any remote javascript files.
Hi, My submission was not approved due to the reason in the subject, however I didn't refer any remote .js files. I just refer an remote .xml file which I learned from the <<Windows Live Gadget Developer's Guide>>, Consuming XML as a Source part. So I wonder this reference is not allowed, or there is a bug on the checking process Thanks, related part in gadget.xml below. <item> <link binding:type="xml" binding:name="List">http://www.yahoo.com/peking2toronto/List.xml</link> </item> Either Gallery doesn't allow gadgets that consume XML in that way, or you got hit by an approver who was unaware that what you're doing is a supported scenario. You should contact Ch ...Show All
Visual Basic Automatic Namespace generation in VB
I've just finished a dll written in VB. I've never bothered with namespaces much until now, but this is a bit complex, so I've arranged it into sub-folders, with a top-level class, a few sub-classes (and base classes), and other classes that hang off some of the sub-classes. Every class has the same "Namespace Handler" around it. Looks garbage in the object viewer - every class is under the root namespace. When using the object however, it looks fine, i.e. you only see the correct sub-sub-classes hanging off the correct sub-classes, etc. However, one of my colleagues who talks C# had a look at my code, and commented that my namespaces were not declared properly, then we discovered that when coding in C#, the namespace line wer ...Show All
Software Development for Windows Vista Error accessing the OLE registry (Build 5744 and msrdp.ocx)
Getting an error trying to register the msrdp.ocx control on Vista RC2. Using regsvr32 it apparently "succeeds" however programs that use the control report it as not registered correctly. Using innosetup to do the installation gives the error: Error accessing the OLE Registry. Error 0x8002801C. That indicates a permissions error typically. Any idea why this Microsoft control will not register Using the version from Windows Server 2003 SP1. Is there a new version of the control that works correctly on Vista To make it clear, after creating the shortcut, open theshortcut properties and then choose advance button on Shortcut tabs. Thx a lot guys, really wondering how you guys found out the solution =) ...Show All
Visual Basic Vista and the VS2005 Configuration Manager?
I know this is going to sound crazy but....... I just installed RTM VS2005 Team Suite on a new RTM installation of Vista and in installed one security update from Ms. However, there is no sign of build configuration selection on my Build menu. It's just not there. And yes, I have checked the box in tools options - show all choices. What is going on Hi, Renee, Yeah, the debug mode is implicitly used when needed, so you can go ahead & set breakpoints and everything will work fine -- a "build" will build to release, but F5 will be a debug session. But, if you're more comfortable with explicitly setting them, or want to add custom configurations, then go to Tools\Options, "Projects and Solutions,&q ...Show All
Visual C# is it possible get something from previous page??
I have a complex quesion about pass argument from page to another page I've a webpage which is forum's list when I run it on IE . which address is display like → 【 http://localhost/news/news_c.aspx cid=26&FK=1 】 and now I have to write a page (use C#) for forum's content I would like to catch "cid" from address of previous page is it possible if yes. how can I do it can somebody give me a tip to start it ( which class should I use which namespace should I import ) thanks ... ( if I don't make my question clearly ... please let me know I will explain it.. many thanks) so you just implement the receiver page ... okay it will work ... this is for send ...Show All
Software Development for Windows Vista Installation Error
Hi, I got a problem with installing 'Windows Vista'. When i boot Vista from DVD it goes to the installation screen, everything works fine. ( Copying Windows Files / Expanding Files / Installing Features / Installing Updates ) but.. when it gets to Complete Installation it seems like setup isn't doing anything, after about 20/30 minutes without any reboot, i get to see this message: Windows could not prepare the computer to boot into the next phase of installation. To install Windows, restart installation. if i restart the installation it does the same thing... Thing that i tried: 1. Formatted all HDD's 2. Re-installed XP and then tried to install Vista Allready trying for about a month, and still not working. A few months ago i was able ...Show All
Visual Studio Express Editions How to use sendinput()?
I have been looking into simulating mouse movements and clicks for a while and sendinput seems to be the best choice. I can't find any examples of it working and I'm not experienced enough to work it out without any help so I was wondering if you guys could give me a hand. Could you just give me an example of a program moving and clicking the mouse Also, would this work outside the application Thanks in advance Matt. well im no good at this either but it seems to me as though using ur code, the mouse could keep moving "a" and the speed; change the sleep number. ...Show All
