rowdy2's Q&A profile
Visual C# pagecontrol
Now everybody,i have a very headache problem,i setup a tabcontrol called tabcontrol1 which contains three tabpages,each has a datagrid,and a just a query button on toolbar .i want to have this function:when i entered tabpage1,and click button,it get the information from database(or use some sqlconnection,sqladapter,etc),when i entered tabpage2,do the same action,it gets data from database2.i want to use if sentences,but just if (tabpage1.enter( have this property )) { do something like sqldatadapter.fill...) if(tabpage2.enter...... ...... You can use the if sentence like in the following snippet: private void tabControl1_Selected( object sender, TabControlEventArgs e) { if (e.Tab ...Show All
Visual Basic Email Method does not Send
I have this email method that gets a file name to an attachment that it should send the problem is that my e-mail never arrives when i do testing is there an issue with the code, is there some way i need to add the username and password for the e mail address that I have set up as who its from check out my code Public Sub EmailHomeFile( ByVal fileName As String ) Dim mailMessage As New System.Net.Mail.MailMessage( "blocklif@yahoo.com" , "leewayz@hotmail.com" , "HomeManageMentFile" , " Do Not Replay To This Email" ) Try Dim client As New SmtpClient() client.Host = "DestinyDSP" client.Port = 25 client.Credentials = CredentialCache.Defaul ...Show All
SQL Server Merge Join vs. Lookup vs. Custom Script - which is fastest?
Very often we have 50'000+ rows which you need to pull values from different source (e.g. CityNames from citycode in Excel file). Currently we are using Lookup - but the questions is which of those 3 options is best in performance wise Crispin wrote: Do a fair comparison though. Either change your query to cache the rows from SQL or disable caching on the lookup. Oranges != Apples. A non cached lookup will be expremely slow as was your script component. It would be best to try to replicate full caching in the script component. The purpose of the exercise was to see which was faster. So, we know how fast (and legitimately so) the lookup component was, now how fast can we get the script component to process The ...Show All
Visual C# Raising events from one thread to other
Hello, I am new in C# and would appreciate any information on standard ways to raise events from worker thread (System.Threading.Thread) to the main UI thread, where the main form is created and lives. Here I interested in the events only (as they usually used within the thread scope), not Control.Invoke()/BeginInvoke(), not BackgroundWorker class, as they are more or less learnt and OK. By default, raised events go to the same thread, is it the only behavior If not, how I should redirect them into UI thread's message loop Thank you in advance. Try this thread. I had the same question and it was answered well in this thread. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=797 ...Show All
Visual Studio Team System Installing TFS with the default web site on a port other than 80
Hi, I'm working on an install of TFS on a an exisiting server where we've moved the default web site (along with Reporting Services and SharePoint) away from port 80. Is there an easy way to get the TFS install to work in this situation, or would it be simpler to move these sites back to port 80 for the install then reconfigure everything afterwards I've found some references on the internet to doing the latter, although these were mostly on the personal weblogs of sysadmins - so far I've not found any "official" documentation or guidance on doing any of this. Any pointers or advice gratefully received. I'll be experiementing in the meantime so if I come up with a working solution I'll post it in this thread. Thanks, ...Show All
Visual C# add permissions to computer object
Hello, i wanted to add the following permissions to the computer object in the Active directory. Write Public Information,Write Account Restrictions, Reset Password, Validated write to service principal name,Validated write to DNS host name. I am using C# to set the permission. if you have any hints or sample code. pls let me know. thanks thaya ...Show All
Smart Device Development Running MS CRM 3.0 Mobile on emulator
HI all, I am tryying to run MS CRM 3.0 Mobile client to run on a Emulator. I am not sure this is the correct place to put this querry, if not please direct me. I have this setup MSCRM3.0 Server, MS CRM 3.0 Mobile both on single server and the MSCRM3.0MObile Client on emulator. The installation of the client goes through fine, but when i start it and give the needed authentication, it throughs up an error, "device registration failed". Any pointers regarding this one Thanks and Regards Leo You might want to post your query on http://www.microsoft.com/Businesssolutions/Community/Newsgroups/dgbrowser/en-us/default.mspx dg=microsoft.public.crm&lang=en&cr=US where it has ...Show All
Visual C++ LNK4098 and static libraries using different runtime types
I've inherited a project that has various problems. This project is a DLL linking with the MT run-time libraries. It also links to several static libraries that are outside of my control but I believe they're all compiled with the same version of Visual C++. I'm assuming the LNK4098 warning is being dumped out because one or more of the other static libs were compiled with a different runtime type (assuming single threaded). The dox for LNK4098 mention "...prevent mixing different [run-time] types... You receive this warning if you try to use different types ... of the run-time library...". A warning doesn't seem like prevention to me. It then goes on to describe the NODEFAULTLIB option and what run-time libraries to ignore wh ...Show All
Visual Studio Tools for Office Problems with VSTO 2005
Hello. I'm trying to look at some samples of using VSTO 2005 ( e.g. Microsoft's VSTO - Outlook Hands on Lab ) but am getting the following error when loading the solution: The project file 'C:Program Files... ...\HandsOnLab.Lab1.csproj' cannot be opened. The project type is not supported by this installation. I've got VS 2005 Professional Edition Version 8.0.50727.42 and Office 2003 Professional Edition SP2 installed. Also i've installed the Office 2003 PIA's and VSTO 2005. Any ideas on what i'm missing Thanks, Paul Did you download this item or is it off of a disk VSTO 2005 is not a downloadable product. If you did download you don't have VSTO addin needed to run the VSTO 2005 examples or create a VSTO pr ...Show All
Windows Forms Horizontal scrolling with SHIFT and MouseWheel
I would like to change the behavior of ScrollableControl that it is able to scroll horizontal with SHIFT and MouseWheel. This behavior is seen in some applications like the Visual Studio Class Designer. My idea was: protected override void OnMouseWheel( MouseEventArgs e) { if (ModifierKeys == Keys .Shift) { // Scroll horizontal ... } else { // Scroll vertical ... } // Don't call the base method because it would call the default implementation of ScrollableControl // base.OnMouseWheel(e); // Fire the event to all listeners if (MouseWheel != null ) { MouseWheel(e); } } The problem is that I am not able to fire the Event MouseWheel. Only the base class Control is able to fire this event. Ha ...Show All
SQL Server saved package gets corrupted
Hi, I am facing a problem. I have custom data flow transformation.We have saved a package using component's earlier assembly version. Now when we install later version of the component the saved package fails to open. If I try creating new package it succeeds. Error message : Error 1 Validation error. Data Flow Task: DTS.Pipeline: The component metadata for "component "Oracle Destination" (153)" could not be upgraded to the newer version of the component. The PerformUpgrade method failed. Package.dtsx 0 0 We tried overriding "perform upgrade" method but still I am facing the same issue. Dharmbir There is a good sample on how to overridfe PerformUpgrade ...Show All
Community Chat NumberBox User Control
OK...the NumberBox user control is ready for BETA TESTING.... Also important NOTE: For use with Visual Studio 2005 .NET Framework v2.0.50727 So you say you need a control like the textbox that will only accept numeric input... You want it to format it how You want it to be able to accept math expression! AND you want it to evaluate those math expressions.... Give it a spin and put it through the grinder and let me know what comes out!!!! http://codegallery.gotdotnet.com/NumberBox Overview The NumberBox control is a user control with a single textbox control. At its very basic setup the NumberBox control is used to restrict the user to inputting only ...Show All
SQL Server Is it possible to version custom SSIS components?
Is it possible to use versioning at all with SSIS components My experience so far is that I have not figured out how version them at all, because if I change the version number, then apparently the <property name="UserComponentTypeName" ...> has to be changed in every single reference to the component, in every dataflow, in every single dtsx file that uses the component at all -- this will be a tremendous headache as some of this stuff is in source control. It seemsl clearly infeasible to check out and substitute and change all these references, and check them all back in, except very infrequently -- surely not feasible to do it for each small change. I am in the habit of versioning dlls and assemblies, and actually chang ...Show All
SQL Server The problem of xp_cmdshell_proxy_account
Hi, Dose xp_cmdshell_proxy_account can execute or grant to "SQL Server User" On BOL: sp_xp_cmdshell_proxy_account [ NULL | { ' account_name ' , ' password ' } ] account_name Specifies a Windows login that will be the proxy. But now I use SQL Server user and execute xp_cmdshell use non-admin SQL server account, When I execute ths SP include xp_cmdshell, it responses the error message: Msg 15153, Level 16, State 1, Procedure xp_cmdshell, Line 1 The xp_cmdshell proxy account information cannot be retrieved or is invalid. Verify that the '##xp_cmdshell_proxy_account##' credential exists and contains valid information. From the BOL I know the account_name is Windows login, but can specify a SQL Server a ...Show All
Visual C++ Problems just adding a message to WndProc in a Win 32 API code.
Hi to all, I have add the WM_XBUTTONDOWN message in my WndProc() in this way: switch (message) { case:WM_XBUTTONDOWN: WPARAM wParam; LPARAM lParam; break; ... } but it gives these errors in the same line: (line 151) error C2065: 'WM_XBUTTONDOWN' : undeclared identifier (line 151) error C2051: 'case expression not constant ' I have added "Windows.h" and the folder where it is. Whats the problem Did you add that define before any includes Make sure you're not setting it to a different value anywhere else in your code. If you like, you could add it as a define on the command line with the /D parameter to ...Show All
