Zhimao Guo's Q&A profile
SQL Server What's the scope of the 'global Dts object' referenced from a Script Task?
Is it at the package scope, AppDomain, Process, or OS/Machine scope We've started using SSIS from C# in a multi-threaded app and are coming up against some problems that prompted this question. One application process, one application domain, multiple threads. Each thread is given a package to execute under the control of a manager thread. The thread instantiates a package instance, (loading the package from a file), sets the value of some of the user variables and executes it. Different threads may be given the same package name to execute, but with different values for the variables. The problem we see is that two different package instan ...Show All
Visual Studio 2008 (Pre-release) How do I handle a click event for a button in a ControlTemplate?
I have a ControlTemplate that consists of a horizontal StackPanel with a TextBlock and a Button: < Style x:Key = " MyStyle " TargetType = " {x:Type ContentControl} " > < Setter Property = " Template " > < Setter.Value > < ControlTemplate > < StackPanel Orientation = " Horizontal " Margin = " 1,0,1,0 " > < TextBlock VerticalAlignment = " Center " Margin = " 3 " > < ContentPresenter Content = " {TemplateBinding Property=ContentControl.Content} " /> </ TextBlock > < Button Width = " 16 " Height = " 16 " Background = " LightBlue " VerticalA ...Show All
SQL Server multiple joins on the same table
I'm new to SQL 2005 & C# - I'm a MySQL/PHP crossover. I'm using s Stored Procedure and I'm trying to do multiple joins onto one table. I have 6 fields in one table that are foreign keys of another table: Table1 --------- id PrimaryCode SecondaryCode1 SecondaryCode2 SecondaryCode3 SecondaryCode4 SecondaryCode5 Table 2 --------- id Title CommCode The fields in table 1 (except is obviously) hold the id of a row in Table 2. When displaying data I want to display "Title" - "CommCode" for each item in Table 1. I got myself started by searchig on the net and I have a stored proc ...Show All
Visual Basic Executing Visual Basic code from a string
How do I execute visual basic code from a string Here is kind of a sample of what I am doing... Function _Function(ByVal As ) 'This is where it is supposed to execute a function .Execute() End Function So can someone please help me Doesn't anybody know There has to be a way to do it, last time I checked, Visual Basic .NET 2003 could do almost anything. I say almost remember. There has to be a way, because I saw a control on http://windowsforms.net that could allow you to execute VB code from a string. Please tell me an answer. ...Show All
Windows Forms Create a taskbar applet like Media Player 9
Hello, I want to do a small app that will run on the taskbar, just like Windows Media Player 9, or the address bar. It can be in C/C++ with Win32 or MFC, or in MC++/C#/VB.NET. My app will consist of a simple text box which I use very often. For now I'm using an overlay texture and low level keyboard reading; this is a very dirty method, and doesn't work very good. I searched a lot but didn't found any answer, and there are some questions about this in this forum but they are never answered. Can anyone help me please, or give me some advice Thanks in advance, Brunni This is a feature of the shell: http://msdn.microsoft.com/lib ...Show All
Visual Basic Is there an alternate to the VS2005Getfiles that will return a string array.
In my old code I declared a variable _fileList() as string. Then I used Directory.GetFiles(strDefaultDirectory, "IP*" ) to fill the array. Now the getfiles function us nder the My .namespace " My .Computer.FileSystem.GetFiles" and returns this " System.Collections.ObjectModel.ReadOnlyCollection( Of String )" Previoulsy if the directory.getFiles method returned 0 items I would used the ".Filenames" property of a OpenFileDialog box to return my array of names. This still works the same. But now I can share one variable for either process which in my mind they would both use the same internal code to return a listing of files. Is there a n ...Show All
.NET Development SqlConnection and thread safety
I believe I know the answer to this, but I would like confirmation. I have been experiencing NullReferenceExceptions being thrown from a call to ExecuteScalar(). The occurence is intermittent, but only happens when two separate threads try to use the same pooled SqlConnection on synchronous schedule (i.e. every 5 seconds). I surmise that the cause of the NullReferenceException is a conflict between the two threads trying to simultaneously access the same SqlConnection object. I deduce from this that all calls to a pooled SqlConnection must be sychronized. This is not obvious from the ADO.NET documentation. ExecuteScalar() has no ref ...Show All
Visual Studio Team System Branching is Broken - Severe SQL Error
About two weeks ago I was able to successfully create a feature branch off of our Main\Src directory. Last night I tried to help a co-worker create a different feature branch off of Main\Src. We tried from the VS 2005 UI and via the command line with no luck. Both ran for 15 minutes without completing. Finally we left the command line branch going all night and when we got back in this morning the following error message was displayed: C:\Foo\Branches\Feature>tf branch $/Foo/Main/Src $/Foo/Branches/Feature/XYZZY A database error occurred (SQL error 0) ---> A severe error occurred on the current command. The r ...Show All
Visual Studio Express Editions How do I know if count is counting up or counting down
I have a MCU (PIC) in which I'm using to send serial information (0-255 ASCII) out to my VB program. How can I find out if the data is counting up or counting down. Please keep in mind that I am new to VB so please speak slowly. P.S. Is there a way to differentiate between odd, even and positive, negative numbers. Thank you in advance. Ken Hi again, Is this question too simple or too vague. I would like to know because it has not been answered. Regards, Ken ...Show All
Visual Studio Trying to create projects in a recursive way
Hi everyone, I hope you can help me. I am trying to create some projects in a recursive way. I am developing an application which uses the command line to create the projects. But now I have a problem if the user introduces a path with more than one new projects to create. For example: If I have the VSS Tree like this "$MyVSS/Test" and the user wants to create the project "$MyVss/Test/application/_INS", but if the "application" project is not created before, it gives me an error. How can I solve this I am searching for a list of common errors when creating, but I didn't find it, so I am trying to spl ...Show All
Visual Studio Team System I have some problem running FxCop on different machines with the same set of targets.
Hi, I have problem running FxCop analysis on different machines with the same set of targets. Ex: i have 7 dlls added as my targets and when i run on machine 1 i get 2047 error, on machine 2 i get 2125 errors, on machine 3 i get 1105 errors and so on. The number of error i get is not constant so can i know what could be the problem. -Rajesh tanx for the reply michael. There is one more problem i faced recently with FxCop. Suppose i have 3 projects named project1, project2 and project12. project12 is a combination of targets of project1 and project2. when i run FxCop in project ...Show All
Visual Studio 2008 (Pre-release) An Existing Connection Was Forceably Closed by the Remote Host
I've just gotten WCF to begin working. I have about 15-20 different services - all of these were previously running as web services without a problem and I've just finished converting them all to run under WCF. All of the services except one are running fine under WCF. The one that is not running is giving me an error that says: System.ServiceModel.Communications Exception: An error occurred while receiving the HTTP response to 'http://....' Unable to read data from the transport connection. An existing connection was forceably closed by the remote host. All of the other 15-20 services are working without error and all use e ...Show All
Windows Forms Loading a UserControl into a Panel on Form
I have a Form (Form1) that contains a panel (Panel1). I also have a UserControl (UserControl1) containing comboboxes, labels, etc. How can I load the UserControl in the panel on my main form Or is this even possible. ASP.NET has a cool control called a placeholder for doing exactly this, but I don't see it for Windows Forms. Thanks! ...Show All
Windows Forms Client Desktop Notification
Hiya, I am in the process of putting together a phone messaging application and I am looking for ideas on how to notify the desktop users when a new message is entered. I've looked in to the SQL Notification services which might be a good option but was hoping to get some other ideas. In a nutshell, the office personnel will be adding messages to a call log table in SQL and I want the user(s) to be notified at their desktops whenever a new message is entered in to the log table...Not sure if I should approach this from the SQL side or the client application side. Any thoughts/input would be appreciated. Thanks! ...Show All
Visual Studio Team System How to reference users and groups of a team project in c# code?
Hello How do I reference a group or a user of a certain team project (or Team Foundation Server) and get its members in C# code Thanks Daniella Download the extensibility kit from http://www.vsipdev.com/downloads/vssdk2005beta2.aspx (requires free registration) and look at the Team Foundation Server Object Model document and Services Sample zip to familiarize yourself with the TFS API. Specifically, look at the CollectorManager.cs file in the Collectibles Client solution to see how to grab services from the server. For example, this call is used in that cs file: IRegistration re ...Show All
