Spigot's Q&A profile
.NET Development HttpWebResponse eratic results
I am trying to use HttpWebRequest and HttpWebresponse, but constantly get erratic results. When I call the code I get the desired results about 50% of the time, any suggestions as to what status codes to look for at the end of the code execution to determine if the code has run sucessful. I have attached the code. As you will notice I tried using the WebException, but that on catches major problems, using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Net; // required for Http Request ...Show All
SQL Server Table error
Hi, I'am facing a situation where i'am really confused, there is a table named oOrder which has 1 million records in it, as this table is used in many calculation i need to reindex or drop and recreate the index but when i tried both methods its giving me the following error. 'oOrder' table - Unable to create index 'PK_oOrder'. ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Attempt to fetch logical page (1:97652) in database 'ProdMax' belongs to object 'tmpProcVet', not to object 'oOrder'. i checked tmpProcVet table but its not showing any relation with oOrder table..... any help on this will be great... Mat the table seems to be corrupted...use dbcc checkdb , see wat error it shows... if it does..try the repair optio ...Show All
Smart Device Development Trouble with Threading on Motorola Q Smartphone
I'm having some trouble with threading on a Motorola Q Smartphone which runs WM5 as you know. I have a C# program that I've been running under XP quite successfully. When I recompile it (with a different UI of course) for the Q, the threads to not start. Here's a code snippet... _thread = new Thread(new ThreadStart(Receiver)); _thread.Start(); which is executed in the main thread and where Receiver is: private void Receiver() { ... } I have some debug output that dumps messages to a text box on the display. The message dumped by the thread when it first starts never makes it to the display. Any ideas why this simple code would work under XP but not on a Q Thanks, FM Thanks ...Show All
Windows Forms Arrow Keys don't move controls in custom forms designer
Hello, I have a custom forms designer. I've implemented a menu command service like so MenuCommandServiceImpl mcsi = new MenuCommandServiceImpl (); host.AddService( typeof ( IMenuCommandService ), mcsi); MenuCommandServiceImpl is derived from IMenuCommandService. I "think" that the controls are supposed to move when the arrow keys are pressed via the MenuCommands .KeyMoveUp etc. Commands. I've added those commands to my MenuCommand class, but nothing. In all my searching around, I think that the DesignSurface.View is stealing the key press events for the Arrow keys, and should be the one to fire the correct events or preferably move the controls. Have I added the wrong service or is it possibly ...Show All
SQL Server R
How do i replace that character in a derived column Some rows have that character in one or more columns. If i just write this column == "" Unknown : column where the character is inside "" (can't write it here) the task will just succes without ever doing anything. The output says something like "the dataflow task had no tasks.....", which seems like a bug. hmm and if it's not a unicode character Try putting this in a derived comlumn REPLACE(TRIM(TXT)," ","") the task will then complete with this in the output. Warning: 0x80047034 at Data Flow Task, DTS.Pipeline: The DataFlow task has no components. Add components or remove the task. ...Show All
Windows Forms How to create Bitmap of a Web Browser Control?
Hi Guys! Im new to C#. How can I create a Bitmap of the Web Browser Control using the CreateGraphics Method Thanks! Matt If what you want is to make a bitmap copy of the WebBrowser Control at a certain point, try this: Assuming your Browser control is webBrowser1: Bitmap b = new Bitmap(webBrowser1.ClientSize.Width, webBrowser1.ClientSize.Height); Graphics g = b.CreateGraphics(); g.CopyFromScreen(webBrowser1.PointToScreen(webBrowser1.Location), new Point(0,0), CopyPixelOperation.SourceCopy); //Optionally: b.Save(" path_to_image_save_file\\image_file_name "); Hope this helps! ...Show All
Visual C# Trying to determine Class by a string value
I'm having a DUH moment here and hopefully someone can answer it before I'm bald... I have a string that contains the name of the class and I want to create a new instance of the class that's referrred to. I have: string classToUse = "StartMeUp"; I have a class called StartMeUp that does some function... Of course, I want to create a statement similiar to: StartMeUp smu = new StartMeUp(); However, I've forgotten how to use the string to get to an object name... any helpers out there StartMeUp oElem = (( StartMeUp )oType.InvokeMember( "StartMeUp" , BindingFlags .CreateInstance, null , null , null )); Well, obviously, he can't write the " StartMeUp oElem = (( StartMeUp )&q ...Show All
Visual Studio Team System WorkItemTracking error : The INSERT statement conflicted with the CHECK constraint
Hi I have a problem that I can't find a solution to, I've tried searching the forum and the only thread I could find was regarding beta2 and the anwser was to upgrade. What could generete this problem and is there a fix for it Error: TF53010: An unexpected condition has occurred in a Team Foundation component. The information contained here should be made available to your site administrative staff. Technical Information (for the administrative staff): Date (UTC): 2006-10-04 20:12:51 Machine: VS00 Application Domain: /LM/W3SVC/3/Root/WorkItemTracking-5-128044663618957318 Assembly: Microsoft.TeamFoundation.WorkItemTracking.Server.DataServices, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0 ...Show All
Windows Forms repair install (event id 1001 and 1004) - whats causing this in my case?
I'm getting eventlog events 1001 and 1004 indicating a repair install. The 1001 event description is: Detection of product '{6C2EFFE6-1A20-4FB8-81D2-2B1A3ADFDC53}', feature 'DefaultFeature' failed during request for component '{ 22056900-C842-11D1-A0DD-00A0C9054277 }' This indicates component Global_Controls_MSCOMCTLOCX, which I install from a standard MS VS6 SP6 MSM file. The 1004 event description is: Detection of product '{6C2EFFE6-1A20-4FB8-81D2-2B1A3ADFDC53}', feature 'DefaultFeature', component '{ EDBDF246-2367-469D-AB3D-6F076F338CA8 }' failed. The resource 'E:\' does not exist and this indicates the following component (Component table of the MSI): Component="_C57571A181C24B139A26CBF7E2E09D ...Show All
Visual C++ xhash and swap error
Building and running the following code in vc8 in release build makes my unit test application crash. Why anyone typedef stdext::hash_map<std::string, int> HashTable; HashTable x, y; x.insert( std::make_pair( "1", 1 ) ); x.insert( std::make_pair( "2", 2 ) ); x.insert( std::make_pair( "3", 3 ) ); x.insert( std::make_pair( "4", 4 ) ); x.insert( std::make_pair( "5", 5 ) ); x.swap( y ); x.insert( std::make_pair( "1", 1 ) ); x.insert( std::make_pair( "2", 2 ) ); x.insert( std::make_pair( "3", 3 ) ); x.insert( std::make_pair( "4", 4 ) ); x.insert( std::make_pair( "5", 5 ) ); ///< C ...Show All
Visual Studio 2008 (Pre-release) WCF Service Times Out
I have a WCF Service that is hosted in IIS. I have a client ASP.Net web application that is accessing this service. I was able to set up a web reference to the service, have access to the proxy in code (including the methods of the service), but when I call a method the application times out. I have no problem accessing the service and recieving a timely response when the client is an application other than a web application. Also, for web applications, there is no option to add a service reference like there is for lets say a windows forms application, is this correct. Thanks in advance. -- Garry See http://msdn2.microsoft.com/en-gb/library/ms731092.aspx for a short discussion of ...Show All
SQL Server down grading can i?
It seems as though our last administrator has installed Enterprise Licenses (SQL 2005) We need these to be Standard, can I down grade some how with minimal to no disruption to our databases If so How, if not (which i almost positive that you are going to say NO) then i assume I am going to have to reinstall the SQL server. What is the best way going about this with out having to restore all of the databases Can i copy all of the MDF and LDF files else where and then once the new installation has completed create the users, then databases and then replace the MDF and LDF Is there a better way then this if so it would be a huge help. Thanks Brad I believe that it will be necessa ...Show All
SQL Server Why SQL Server 2005 database mirror Can't failover?
Hello All, I've tried to replicated exactly what it says in the online documentation. At the end of the post are the SQL statements issued. 1. Enable encrypted outbound connections on the primary server 2. Enable encrypted outbound connections on the mirror server 3. Enable encrypted outbound connections on the witness server 4. Enable encrypted inbound connections on the primary server 5. Enable encrypted inbound connections on the mirror server 6. Enable encrypted inbound connections on the witness server 7. Set mirror''s partner to the primary 8. Set primary''s partner the mirror 9. Set principal’s witness. Every step run''s normally,but why can''t auto failover. I use ...Show All
Game Technologies: DirectX, XNA, XACT, etc. D3DERR_NOTAVAILABLE while build of first example in help how to do
I used to code in pascal, cobol, assembly, basic, etc, but not C. From: Your First Game: Microsoft XNA Game Studio Express in 2D following along and doing the first build, I get the error above. I did not think I was calling the 3d engine only the 2d. I cannot find any help on the error, where to look, etc, except what is in the error window when you cursor over it. I cannot figure out how to copy the error in that popup window to look at it further. I know some dislike nubies, but please help if you know the answer. Its disheartening to type in only 6 lines of code and not be able to debug it! To say the least. Thanks OH OH OH, I figured out how to copy the error: Error 1 Building content threw InvalidOperationExcept ...Show All
Visual Studio Team System Branch\Delete Checkin causes fileName collisions
Hi, We are having a problem with TFS source control where a dev performed a branch, did not check the branch in, deleted the branch, and then checked in the pending changes. So we can see the problem here. A branch that was never comitted was deleted. I dont think TFS should allw this kind of operation but it did happen. So now the the dev has tried to recreate the branch. When doing so he is prompted to resolve the naming conflicts for all of the files that ha branched. He has 2 options. Undo local changes and something else. Neither option works and the branch can not be recreated because the conflicts can never be resolved. Is there anyway to make this work thanks. He can use tf undelet ...Show All
