B.Huard's Q&A profile
Visual Studio Express Editions ListBox Verticle Scroll Bar event?
I will make this question short and sweet..(compared to my pervious essay's ) Is there any way to generate a ListBox scroll bar event This is a popular request, time to do something about it. Add a new class to your project and paste this code: using System; using System.Windows.Forms; public class BetterListBox : ListBox { // Event declaration public delegate void BetterListBoxScrollDelegate(object Sender, BetterListBoxScrollArgs e); public event BetterListBoxScrollDelegate Scroll; // WM_VSCROLL message constants private const int WM_VSCROLL = 0x0115; private const int SB_THUMBTRACK = 5; private const int SB_ENDSCROLL = 8; protected override void WndProc(ref Message m) { // Trap the WM_VSCROLL message to generate t ...Show All
SQL Server Use Partial or No_Cache mode in Lookup task
Hello, Can anyone explain to me (or show me where to get info) in what scenario should I use Full Cache, Partial, or No_Cache mode in the Lookup task I got below warning message during execute my package. I understand that my lookup data have duplicate reference keys. I want to change the mode to partial or no cache to see how it works, but don't know what to change for the parameter map. Warning : 0x802090E4 at Data Flow Task , Lookup [37] : The Lookup transformation encountered duplicate reference key values when caching reference data . The Lookup transformation found duplicate key values when caching metadata in PreExecute . This error occurs in Full Cache mode only . Either remove the duplicate key va ...Show All
SQL Server Delete files older than 3 days using SSIS tasks
I want to delete all files in a given folder that are older than 3 days from today's date. I tried using a "Foreach Loop container" with a "File System" task inside it but found I couldn't access any file properties such as the file creation date. Am I using the wrong task for this job TIA, Barkingdog P.S. History of the problem: I used the sql 2005 Database maintenance program to setup our database backup jobs. One day I noticed that the free space on the drive where we keep the dumps had grown small. I found that we had at least 4 weeks of dumps in there, not the 3 days I wanted to keep! I looked but could not find the "delete file" option in the SSIS package generated by the Data ...Show All
Windows Forms PropertyGrid and ListBox
Hi All Can someone show me an example of how to place a "ListBox" property within a PropertyGrid I am working on visual studio 2005. srinivasa rao To display any control other than a TextBox or the standard editor for a type, you should implement a UITypeEditor inherited class that performs the editing for you and then, you apply the Editor attribute to the object class that the PropertyGrid is to edit. To demonstrate this, suppose you have a class called Item. You want to edit certain objects of this class using a property grid control. The class Item contains two properties, ValueInt of type int and ValueString of type string. For the string value, you want the property grid to display a File selector so t ...Show All
SQL Server Triggers fire when no records are affected?
Why is it that SQL triggers fire when the result of the insert/update/delete query returns nothing. I have found that I have to make special coding effort in my triggers to detect that condition or they will exceed nesting limits. This problem, IMO, is wasteful of the DBA's time, and the server's overhead! The same case could be made for not firing the update trigger if no data has changed. The engine has to know this, as it is constructing the insert/delete virtual tables. Is this something that the SQL engine designers are considering changing If not, why not That's essentially what I did: IF @@ROWCOUNT = 0 RETURN. I can see your point about the logging when trying to debug an application or ...Show All
Microsoft ISV Community Center Forums Runtime error '13' - type mismatch problem! Again...
Hey all Thanks to the help of the forums here i thought i had most of my code working however, this infamous 'runtime error 13' keeps cropping its head up on only 2 of my 10 sub routines! :( Ive spent most of my work day searching through forums and google but i am no closer to finding a solution. The 2 functions that it is affecting are important and i need to get them sorted else i may as well scrap my two days work! Ive posted the code below and hopefully if anyone has a chance they could have a look and see if they notice anything that may be the cause. Ive highlighted the lines of code that are being thrown up in the debugger. '*********************************************** ' Calculate Award '************************** ...Show All
Visual Basic pop3 code to check NDR
I was hoping someone could help me. I'm looking to write a vb.net or 6 app to check a specific pop account for any NDR messages. I'm not intersted in sending, etc, but would like to scan the pop account and find the email address that the email was orginally sent to, so it could then inturn delete that email address from a my database. Anyone know of some simple code that could do this Terry Fox, What do you mean by make first Have you solved your problems till now Actually I suggest you to specify your post firstly to show your question because I cannot understand you meaning :-) ...Show All
Visual Studio Team System Project inheriting
I need to know if I can generate a new project inheriting all information of another one, and at the time of updating one the other of automatic form is updated, if possible that on Team System, some people tell me than tool "Share" can help me, but i don't have this option, any idea can I do this Thanks! Ray What kind of information are looking to inherit between projects If you base the 2 projects on the same process template they have the same work item types, queries and reports. However, if you update stuff in 1 project, it won't automatically update the other project. It will help to know more details on your specific scenario. ...Show All
Visual Studio Team System Unit Testing
Can Unit Testing in the DataBase Pro product allow for Edit-and-Continue to help debug SP's that call one another, a tracing mechanism so to speak We will not be able to support TSql edit and continue in this release. For tracing - what do you mean Something similiar to the level of tracing you can get in SqlServer, or more verbose tracing of the test execution and condition evaluation ...Show All
Visual C# Replace string using wildcard
Hi, This is probably easy but I haven't been able to find help on it. Basically, I want to replace/delete the contents of a string up to the occurence of a backslash. So, newString = aCertainValue.ToString().Replace("wildcard\",""); Any ideas Thanks. try this: string newString = oldString.SubString(0, oldString.IndexOf("\\")); //gets the string up until the first backslash oldString = oldString.Replace(newString, newStringHere ); does this help is this what you are after ...Show All
Visual C++ Need Suggestions
Hi: I'm developing a small application for controlling the surfing of children, which consist of taking screen capture periodically. My problem is that the size of the taken bitmap is large (for a 1280x800 resolution it is 3,90Mo) and the problem is going from bad to worst when the application takes more pictures. Do you have any suggestions If not I should abandon the development of this application. Thanks A.B. ...Show All
.NET Development XQuery Problem
can anyone help me fix my XQuery //item[descendant-or-self::item[ancestor::*[@name() != \"option\"] && @locked =\"1\" ]] i can't figure out whats wrong with my query..why it produces an error of invalid token when i tried to execute it.. any help would be highly appreciated.. thanks in advance!! The obvious issue is with "@name()" This is neither the "name" attribute or the "name()" function. Choose between one of them, correct the XPath expression and there you go :o) Hope this helped. Cheers, Dimitre Novatchev ...Show All
Visual Studio Tools for Office Word 2003 customization load time
Hi, I created a VSTO 2005 customization DLL for WORD 2003. This customization DLL is attached with various WORD templates on users machine. My problem is that sometimes this DLL takes a lot of time to load. I have noticed that this happens when a template with customization is opened for the first time after reboot i.e. on the cold startup, not when the templates is opened subsequently i.e. on the warm startup(except for few cases where it takes the same time as of the cold startup, even when some of the templates are already opened). The load time at cold startup is large. This might be because it performs various steps before exceuting customization assembly, such as 1) Loading of VSTO runtime 2) Creation of app domain ...Show All
.NET Development Directory.GetFiles method
In my application I have files with long filenames, for example "0042P018 76768766 13030105-02GB.pdf". By using dir /x in command prompt, I can see that this file has a short filename "00783B~1.PDF". This file is returned by Directory.GetFiles("0078*.*") because of the generated short file name. Say that I want to delete all files beginning with "0078". I use Directory.GetFiles("0078*.*") to retrieve a list of files, and then delete the files. Then, the file "0042P018 76768766 13030105-02GB.pdf" will also be deleted, because of the short name, though obviously this was not intended. Having realised this issue, I have now of course made an extra check on the filename before deletin ...Show All
SQL Server Function with Dynamic Column Name without Execute statement
Hi, There is a table named status keeping status of a policy at the end of every month. The schema of the table is as below. sym pol mod stat_198612 stat_198701 stat_198702 stat_198703 AAB 1409502 00 f f f f AAB 1409502 01 f f f f AAB 1409503 00 f f f f AAB 1409503 01 f f f f AAB 1409504 00 f f f f AAB 1409505 00 f f f f AAB 1409506 00 f f f f AAB 1409507 00 f f f f AAB 1409508 00 f f f f AAB 1409509 00 f f f f I want to write a function by using Sql Server 2000 so that I can pass the value of sym, pol, mod and month_end_year like '198612' and will get the status of the policy. I know that the create function has certain limitation in SQL2000 and support Execute statement only for extended stored procedure. Any Quick sug ...Show All
