Dhiraj12345's Q&A profile
Visual Studio 2008 (Pre-release) Failed to convert Parameter Value from a Byte[] to a Datetime?
hey sync'ers... anyone having trouble with converting Btye's to DateTime problems I have stepped through every line and double checked both the client and server db's and cannot isolate this error in code... hopefully i'm being an idiot and someone can look at the below and tell me so... the exception is above the sync call below somewhere... i've tried datetime instead of DbType .Binary with no success... anyone else have this problem solution Thanks! I'm using this: SqlSyncAdapterBuilder ProposalDetailBuilder = new SqlSyncAdapterBuilder (); ProposalDetailBuilder.Connection = serverConnection; ProposalDetailBuilder.SyncDirection = SyncDirection .Bidirectional; // base table ProposalDetailBuilder.TableName = ...Show All
Windows Forms How to implement Cut Copy Paste
Hi, I am using different controls in application like text box, numeric text box, list box, combo box and many others. There is a requirement to give cut, copy and paste for these. Do we have a common code or list of properties which needs to be used in each control for implementing cut, copy, paste I am using some htird party controls (infragistics), so it will be great if the solution takes care of those controls as well. Any help in this regard is appriciated. Thanks in advance. Regars, MSGuy use the Clipboard class to cut/copy/paste different varieties of data (audio/text/image): //copy: ClipBoard.SetText( text ) string theText = ClipBoard.GetText(); //gets the text ...Show All
Visual C# Closing a form before opening another
Hi, I am trying to develop a simple application. I have a login Screen and on successful login the main screen. Now when the login is a success, I want to close the login form and show the main form. P.S. 1. login form is the startup form 2. I do not want frmLogin.Hide() 3. when I try frmLogin.Close() before frmMain.Show()..flags error (I guess this is logically correct, but then whats the work around ) Please suggest the way in which i can accomplish this. Thanks in advance Rather then try to open one form from another it might be worthwhile to consider having them both be at a sibling level of responsibility... that is to say you might try opening the login form from Program.cs and then if it has done the desired work and returns t ...Show All
Visual Studio 2008 (Pre-release) LINQ behind a web service - basic problems
Hi all. I want to use LINQ with a web service. My SQL2005 db is built and I've run through the 'getting started ' lab tutorial substituting my db - works great! Now I've created a new web service project using LINQ and I'm running into problems. First, I created a LINQ website to see what references I needed and to inspect web.config for any peculiarities (added system.codedom compiler stuff and set my web references equal) I used SQLMetal against my db and added the resulting file into my project. I then created a private variable of the type listed at the top of my SQLMetal generated file. Next I newed the variable within Sub New() once I pulled the connection string out of web.config. Everything good so far I think. ...Show All
Visual Studio Debugger highlights wrong line, steps over code without executing it
I stumbled across some rather odd behaviour in the debugger this morning, and it took me a while to realize just exactly what was happening. I've tried to distill the problem down to a compact test case: int somefunction(int x, int y) { if (x == y) { try { x++; // or whatever, doesn't matter } catch (SomeCustomExceptionClass &) { return x; } } x--; return x; } // calling code: somefunction(1,2); If I put a breakpoint on the line "if (x == y)", I can verify that x does NOT equal y, so I would expect the contents of the if block to be skipped entirely. However, hitting F10 to step will cause the debugger to highlight the "return x" line inside the catch block inside the i ...Show All
SQL Server How to compare SQL server stored procedures from two separate databases?
Is there a straight forward way or a tool to compare SQL server database objects, such as stored procedures located in separate databases Well, the way that I always do it is to use the RedGate SQL Compare tool. www.red-gate.com . It works very nice and will compare everything, including permissions. There are other ways, and Buck Woody (who I have seen around the forums) has an article here that covers it pretty well: http://www.informit.com/guides/content.asp g=sqlserver&seqNum=210&rl=1 ...Show All
Visual Studio Design Environment
When I started up Visual Studio .NET 2005 for the first time it asked me what design environment I would like. I choose the none specific on and would now like to change that. I've tried looking to the program documentation for help but have found none. Does anyone know how I could change the desgin evironment -Darwich Hello, Go to Tools->Options and click "Import and Export Settings...", select "Reset All Settings" and click next, then select "No, just reset..." and click next, then choose the profile you would like and click finish. -Luke ...Show All
Visual C++ How to get handle of a formview?
I developed a MFC singledocument application in VS2005. Then I added two formview, named IDD_FORMVIEW1, CVideo1, and IDD_FORMVIEW2, CVideo2. How can I get the HWND, or m_hWnd of every formview When I define a object in view.h as: CVideo1 aVideo1, it said webcamex6aview.cpp(30) : error C2248: 'CVideo1::CVideo1' : cannot access protected member declared in class 'CVideo1' 1> c:\documents and settings\fangming\my documents\visual studio 2005\projects\exercise\webcamex6a\webcamex6a\video1.h(13) : see declaration of 'CVideo1::CVideo1' 1> c:\documents and settings\fangming\my documents\visual studio 2005\projects\exercise\webcamex6a\webcamex6a\video1.h(8) ...Show All
.NET Development Programmatically determine calling method at execution time?
Without using StackFrame, how might one go about determining the method that called the current method I need this for logging but do not want to use StackFrame since it has difficulties outside of IDE environment. Looked and looked - no can find. For example, method A and B each call method C. From method C, I want to be able to log who the parent method was that called me. Thanks. Thanks guys - nothing like one more 2 by 4 across the head to get me thinking straight. Yes, indeed Nobugz's code does work, inside & outside the IDE. I guess I will have to parse the StackTrace.ToString to get just the file name and file line number, unless you know a better way. Thanks again for not giving up o ...Show All
Game Technologies: DirectX, XNA, XACT, etc. If my screen is white....?
This might be a common problem, and i hope there is a simple explanation for it. But when i run my XNA program and all the graphics, which in this case was trying to be a map, is white, and only partially drawing some stuff. Anyone have ideas about why Any and all help is appreciated I haven't seen this reported by anyone else in the XNA forums before. This thread should probably be moved there so that you'll be more likely to get some help from one of the many XNA gurus there. This could be specific to your video card or you could be doing something in the code. Here's a couple of questions to get started troubleshooting this. When you make a new Windows XNA game and run it, do you get the wonderful cornflower blue screen When you ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How to monitor microphone input level?
I'm using VB.net with Framework 2.0. How to monitor the mic level of the default soundcard I would like to be able to set a threshold value (0-100%) and when the mic level is greater than that a message box would appear. It would be important that the detection would be fast (with as short delay as possible) and consume CPU resources as little as possible. Is this possible without DirectX SDK I found some code in VB6 and C but could not translate them in VB.net. Thank you! With the DirectSoundCapture interfaces you can retrieve input sound from the default input device set on the Windows Multimedia options. Then you can read the input results from there and compare them against the threshold that you wan ...Show All
SQL Server What happens at midnight ?
Everyday at just gone midnight, my MSSQL server won't accept connections. About 25 minutes later, it seems to be OK. There's no third party backup software running on this machine which is MSSQL server aware. Has anyone any suggestions as to why this might be happening The client app trying to use the db reports 17/10/2006 00:02:04 Email2DBServer Cannot open database "Email2DB" requested by the login. The login failed. From OpenLocalDatabase and there's an entry in the event log Event Type: Failure Audit Event Source: MSSQL$EMAIL2DB Event Category: (4) Event ID: 18456 Date: 17/10/2006 Time: 00:02:04 User: NAVIGATOR-BATH\navigator-service Computer: NAVIGAT2A Description: Login failed for user 'NAVIGATOR-BATH\navigator ...Show All
Visual Studio Express Editions Brief Bookmarks
What's the key command to set and jump back to brief-style bookmarks e.g. Set bookmark #1: Ctrl+Shift+1 Jump to bookmark #1: Ctrl+1 Set bookmark #7: Ctrl+Shift+7 Jump to bookmark #7: Ctrl+7 Visual Studio doesn't do it. Guy wrote an addon: http://vadikv.googlepages.com/numberedbookmarks works like a charm. ...Show All
Visual Studio Express Editions how do i mute/unmute system sound?
1.how do i control the level of the "wave" volume and the "volume control" (as it appears in the windows volume controler) (C:\windows\System32\sndvol32.exe). 2.In addition how can i controll the main sound stream controler (the sound controll that changed by a laptop keyboard) Try using the Win32 API function waveOutSetVolume You can find more information at: http://msdn.microsoft.com/library/en-us/multimed/htm/_win32_waveoutsetvolume.asp Hope this helps, ...Show All
Visual Basic How to verify files exist... kinda...
Hello, I'm trying to verify that each file in a list exist. I can successfully read the text file (which contains the list of files) into an array. (Each containing one filepath.) Each path has quotes around it and I have easily removed them. I then created an array and put the file path to every file (in the specified directory) into each dimension. My problem now is, I need a way to compare the two lists, verifying that each file that exists is in the other list. So I suppose that I am not looking for a way to verify files exist but rather that each file that does exist is in my list. Understand I have considered multiple ways of doing this but they have either failed or I have found that they are not what I am looking fo ...Show All
