zhengh's Q&A profile
Windows Forms how to change the state of checkbox without showing the error messagebox again?
hi, following is the simple code private void cb8_CheckedChanged(object sender, EventArgs e) { if (cb12.Checked) { MessageBox.Show("You can not choose this channel. \n Please uncheck Channle D first", "Channel Tangly", MessageBoxButtons.OK, MessageBoxIcon.Error); cb8.CheckState = CheckState.Unchecked; } else ... If cb12 is checked, an error message box will be shown when user check cb8... So the checkstate of cb8 should be unchecked... However, with the above code, since the state of cb8 changed again, the error message will be shown again... So user had to close the error message box twice... Is there any way to solve this Thanks a lot! ...Show All
Visual Basic More than one datareader at the same time?
How to replicate this snippet of code using Ado 2.0 I mean, you are not able to use two datareaders associated to the same connection. Let me know, how do I such thing, I'm just a newbie with ADo .Net. TIA sql = "select..." command.commandtext = sql set recordset = command.execute While Not recordset.EOF sql2 = "select..." command.commandtext = sql2 set recordset2 = command.execute While Not recordset2 Wend Wend Thanks Indeed for that. But I don't get the point on how could I use a dataset/datadapter objects. If need keep the first set of data and then another one and I dont'see that DataSet class have ...Show All
Architecture Any good Ntier real world (architecture)examples available for download?
Hi all, Everybody talks about designing a good architecture Talking between tiers in stateless manner avoid chatty objects use interfaces Use factory patterns etc etccc But no one has published or uploaded some generic examples of different architectures so that you can see how things really work.(A complete solution)with different projects in it. Just tired of reading theory and not seeing any examples. Am I wrong Could anybody point me in the right direction or do i have to reinvent the wheel If I have to it will probably be a square one Thanks and apologies for moaning. For some nice training material you can look at "The Architecture of Modern Desktop Application ...Show All
Visual Studio 2008 (Pre-release) Tools for WCF
First off, let me say, WCF is a dream come true. Its everything I've been wanting to develop distributed apps. Now that wcf is live: http://wcf.netfx3.com/blogs/news_and_announcements/archive/2006/11/08/We_2700_re-done.-WCF-is-live.-.aspx#comments I'm wondering how I should develop applications to take advantage of this new framework In general, I do not think its a good idea to run code developed using beta/ctp's in a production environment (licensing/support etc.). There are a few exceptions to this, but in general, I like to sleep at night, knowing that I'm running code developed using supported tools in the event that something does go awry. And to be honest, I cannot make the pitch to my boss saying we should run beta/ctp ...Show All
Visual FoxPro report tool bar
After a report is generated and appears in a preview you get a small toolbar that floats undecked in full view of the info that you try to read. It was an annoyance until I had only 1 page in the report and once I moved the bar down the report page and believe it or not it DISAPPEARED behind the frame's lower edge. It was not a big alarm for me then since I had only one page but now I have many and the only way to flip pages as I can see is to get the toolbar back. I cannot possibly retreive it no matter what I try. When I moved the toolbar down I hoped that it would deck somewhere and become available as part of the frame but it is not what actually happened. The toolbar disappeared at design stage but the same form's report appe ...Show All
Software Development for Windows Vista How to invoke a web-service specified at runtime ?
I have an activity that discovers the wsdl of a web service based on some input parameters, and then I want to use the WebServiceInvokeActivity (or a custom invocation activity) to call that specific web service. I do not know exactly what the wsdl is at design time (perhaps I can force the web service to have a specific method name and parameters, but I find the location or service provider at runtime). Is this possible How Thanks You would have to write your own activity for this since the WebServiceInvokeActivity requires to have the interface specified at design time so that it can build a proxy for the web service. If you can stick to a specific interface (method name and parameters) then ...Show All
SQL Server SSIS Package Designer performance after installing SP1
Hi, When I installed SP1 on my SQL Server 2005, the performance of the package designer dropped enormously. I have to wait like 30 seconds after I drag-and-drop a datasource from the toolbox to the design area. Also it takes a very long time to run the very simple package. Not to mention opening some complicated package that was done before applying SP1. The package scheduled in SQL Agent went from 3-4min to 5-6min. Can anyone address this issue Maybe there's something I did wrong While installing SP1 I ecountered strange behaviour (some messages about file locking, rebooting and stuff), but in the end it said that it was successful Best Regards Wojtek Is the SSIS service running Check if this ...Show All
SQL Server SQL Query help
i have table "clubinfo" with following fields and data. ClubID FranchiseCode StartDate EndDate ------------------------------------------------------------------ 786 AAAAAA 2005-12-14 15:20:43.340 2006-06-14 14:40:53.270 786 BBBBBB 2006-06-14 14:40:53.270 2006-08-21 14:24:28.060 786 CCCCCC 2006-08-21 14:24:28.060 NULL above three rows describes franchise AAAAAA started on 2005-12-14 and sold on 2006-06-14 to BBBBBB so franchise BBBBBB started on 2006-06-14 and sold on 2006-08-21 to CCCCCC and Endate for CCCCCC is NULL so its a current franchise i wanted to write a sql query that will find franshisecod ...Show All
.NET Development build query based on user input criteria (search function)
I have a search form which contains a set of search criteria and a datagridview. the datagridview is populated by entering none or some of or all of these critera and click on "search" button. the search criteria are: name, dob, gender, date_time_registered, active , etc. I am able to build a simple query for each possibility, e.g. only search for one field, or search for all fields, or search for any 2 or these fields. This is rather inefficient. Is there a way to build one query to accommodate all possibilities I tried to do something like this: SELECT * FROM patient WHERE name = AND dob = AND date_time_registered = AND active = assume user only specified two criteria: name and active, I did this in my code ...Show All
Visual Studio Tools for Office Can not open Sample project
Hi, I am working on Visual Studio 2005 (8.0.50727.42). Also have VSTO2005 Second Edition and Office interop assemblies. I have download the 'outlook samples' from MSDN. And trying to open one sample, for example 'ShortcutBar.sln'. Am getting the following message. The message is very generic, not giving a hint what application is missing! --------------------- "One ore more projects in the solution could not be loaded for the following reason(s) The application for the project is not installed These projects will be labeled as unavailable in Solution Exporer. ....." ---------------------- Thank you. Sen. Sen i have already worked out this possibility , but of no avail. i installed both of these a ...Show All
Software Development for Windows Vista Requesting Admin Rights without COM
I have been trying to read over many of the articles concerning elevated priviledges in an application, but am a bit lost. http://msdn.microsoft.com/library/default.asp url=/library/en-us/ietechcol/dnwebgen/protectedmode.asp http://windowssdk.msdn.microsoft.com/en-us/library/ms679687.aspx Those two of the main articles I have been trying to understand. I know I can create a COM class that is defined in the registry and set it's elevation values there, then create it through CreateInstance. The first article I am almost completely lost on (maybe it doesn't have anything to do with what I want ). Here's my situtation, I have a program that wants to write to registry, save files, etc, but can't do it without ad ...Show All
SQL Server Performing Date Range Queries Based on a Non-Calendar Fiscal Year
Hi, Using SQL Server 2000, I need to perform date range type queries that involve my company's Fiscal Year, which is not the same as the calendar year. My company's Fiscal Year if from Sept 1 to Aug 31, where Aug 31st year determines the Fiscal Year. For example, since today's date is 09/20/2006, the current Fiscal Year is 2007. An example of a typical query requirement: Find all the sales figures to-date for the current Fiscal Year. So, a WHERE clause will consist of a date range query from 09/01/2006 to 8/31/2007. Initially, I created a Function to find the current Fiscal Year based on the current date, by calling the GETDATE() function and passing the results to the following function: CREATE FUNCTION dbo.fnGetFY (@Curren ...Show All
Smart Device Development HttpWebResponse close() hangs
There have been a few threads on this, but I can't find a resolution or workaround. The HttpWebResponse hangs on the third connection if you don't close it, or hangs on the first connection when you try to close it. public void Test() { HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url); HttpWebResponse response = (HttpWebResponse) request.GetResponse() ; Console.WriteLine("Trying to close stream"); response.Close(); Console.WriteLine("Stream Closed"); } if you comment out the Close(); you can get up to two connections. Anyone seen a workaround for this Thanks glad to hear you found an answer ... that's the direction I was heading, you can' ...Show All
Visual Studio 2008 (Pre-release) DataContext.DetachDatabase() not implemented and AttachDatabase() missing
The DataContext.DetachDatabase method is not implemented yet (as of the May 2006 CTP). It throws the following exception when calling it: Unhandled Exception: System.NotImplementedException: The method or operation is not implemented. at System.Data.DLinq.SqlClient.SqlContext.DetachDatabase() at System.Data.DLinq.DataContext.DetachDatabase() at LINQChapter6.Program.Listing6_S() in c:\Documents and Settings\HP_Administrator\My Documents\Visual Studio 2005\Projects\LINQC hapter6\LINQChapter6\Program.cs:line 59 at LINQChapter6.Program.Main(String[] args) in c:\Documents and Settings\HP_Administrator\My Documents\Visual Studio 2005\Project s\LINQChapter6\LINQChapter6\Program.cs:line 39 Is it still going to be supported Will the sign ...Show All
Visual Basic p2p video streaming - best practices??
Hello, relative newbie with questions about video streaming. I am in need of sending and recieving video point to point with high frame rate and good quality. I am trying to get some best practices for limiting the load caused on the end users machine, while providing good quality, high frame rate video. Hmm, odd, nobody ever asks for a low frame rate/sucky quality solution. You need a good codec, a nasty chunk of software that can compress the frame data. If you want to brew your own, it is advisable to start with something that has at least a bit of a track record rather than trying to invent the wheel. Check Open Source projects... ...Show All
