# broxi #'s Q&A profile
Visual Studio Team System CA1817 when populating a DataGridView
Heya, we are using the VS2005 integrated FxCop version. When we populate a DataGridView we get this error: CA1817 : Microsoft.Performance : Within UCModuleProperties.Populate():Void, consider getting the value of 'DataGridViewRowCollection.get_Item(Int32):DataGridViewRow' once and caching it inside a local variable before entering the loop. The code looks like this: foreach ( BusinessObject bo in bos.Rows) { string name = bo.Name ; int index = _dgvPermissions.Rows.Add(); DataGridViewRow row = _dgvPermissions.Rows[index]; row.Cells[_dgvcName.Name].Value = name; row.Cells[_dgvcAllow.Name].Value = false ; ...Show All
SQL Server Command Line - Replay of SQL Trace? SQL 2005
Hello, I have to replay a SQL trace over and over again. I can do this with the profiler GUI however I see no way of doing this with a command line utility. 1) Is there a utility that will allow me to replay a trace via command line 2) Is there a way to tell profiler to automatically run the replay I am requesting and then shut down 3) Are there any .net classes I might code against to programatically start this replay Thanks for your help, David Sandor Hi, what about saving the commands to a file and executing them with SQLCMD and the -o switch HTH, Jens Suessmeyer. --- http://ww ...Show All
Visual Studio Team System MSF: Work Products Management
Hi, I am looking at managing team work products (documents essentially) against each process area against each role. I can upload the documents based on external doc templates to the "Documents" folder in the Team Project. But I would like to have it in a more managed way. Using the Sharepoint portal, can I do this programmatically (or even once manually) I need to put more classifications, status, responsibility matrix, usage reports etc. on these work product documents. (not work items) Appreciate your thoughts in this regard. Thanks -Praveen I'm a little confused about what you want to do pro ...Show All
Visual Basic VBA problem for Word 2003
I'm trying to shade a specific cell in one of the 3 tables in a Word 2003 document. I've tried several different versions and all get an error. ActiveDocument.Tables(2).Rows(3).Cells(2).Shading.Texture = wdTexture50Percent ActiveDocument.Tables(2).Cell(3,2).Shading.Texture = wdTexture50Percent In stepping through the debugger, when it gets to either version I get an abort - "This command is not available" with no error number. Any help would be appreciated! ...Show All
Software Development for Windows Vista Validation Fails on Build
Hi, I've written a custom validator for my Activity which works fine in the IDE - I get the expected error indicators. However, my project still compiles OK - i.e. I don't get a build error saying that my custom Property is not set. Code is below. I need to ensure that the workflow builder supplies a value for this property before deploying the workflow. Any ideas Thanks. ______________________ public override ValidationErrorCollection Validate(ValidationManager manager, object obj) { ValidationErrorCollection vecmyProperty = base.Validate(manager, obj); myActivity ma = obj as m ...Show All
SQL Server More installation issues.
Hey everyone, I just downloaded the express edition and tried to install it. I passed all the sys reqs and it seemed to be going well, but it said that "An installation package for the product Microsoft SQL Server Native Client cannot be found. Try the installation again using a valid copy of the installation package 'sqlncli.msi'." The full installation log is below. Microsoft SQL Server 2005 9.00.1399.06 ============================== OS Version : Microsoft Windows XP Professional Service Pack 2 (Build 2600) Time : Sat Feb 11 09:28:51 2006 Machine : DAN1 Product : Microsoft SQL Server Setup Support Files (Engl ...Show All
Visual Studio Please Help - VB.NET 2005 Express Not Functioning Properly
I downloaded vb.net 2005 express beta 2 on two computers. On one computer, the intellisense correctly finds the Size structure/class when I try to dim a variable as new size. However, the other one, which has .net 2002 installed already, cannot find size structure/class. The intellisense forces me to select either sizeconvert or sizef classes. Thanks in advance. ...Show All
Visual Studio Tools for Office Using VB Forms in Word 2003
Hi, i have been playing with visual studio in office 2003 - Word 2003 in particular. I am trying to create a user entry form that appears for people to fill in and then submit at the bottom. Once the form has been filled it i would like the system to take the information provided by the user and update it into the word document. Its a letter creator for a small business so they dont have to type out in the standard letter format as this form will do it for them. I am using the normal fields such as name, address, date etc so any help would be excellent. I know its possible but i cant quite figure out how it works. Could someone advise me Th ...Show All
Visual C++ Email sending Code in Visual C++ 6.0
Dear all, I want to develop a email sending program in Visual C++ 6.0. This must send an email on the given To,cc Emails using SMTP server(Please give me small picece of code in perfect). I already know how to send emai using Mapi but i donot want to do that. Basically my Program will run as a service whaile if we use mapi the system will show security message. Please this is an urgent work. So If you donot mind then plz give me small complete program/Atleast complete idea of the code. (Prefer to send code). I am thankful in adavnce. Farhad http://www.naughter.com/smtp.html ...Show All
Visual Basic OpenFileDialog
ok, heres my openfiledialog Dim openFileDialog1 As New Windows.Forms.OpenFileDialog() openFileDialog1.Filter = "All files (*.*)|*.*" If openFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then Me .TextBox1.Text = openFileDialog1.FileName End If End Sub works fine, Just wondering if its possible to just show the NAME in textbox1, not the entire filepath So instead of flippin "c:windows\etc\rubbish\blah\finally\here\yes\notepad.exe" it would just be "notepad.exe" or just "notepad" Anyone know Replies will be appreciated Dim fi As New System.IO.FileInfo(openFileDialog1.FileNam ...Show All
Windows Forms Binding ComboBox and DataTable including a None entry.
Hello. We would like our customers to select a country, but it is not required. Thus, the top-most entry shall be "<None>". We read the countries from our database and bind the DataTable to the ComboBox. How do we go about adding a None entry to the ComboBox We can't add a None row to the DataTable or DataView. Is there a property on the ComboBox I'm missing or something Cheers, Chris I use unions queries and LookupDataTables: suppose I have possible values of - CarMake ID Make 1 Ford 2 Chevy 3 Chrysler I will fill a Lookup table with Select * from ( select ID, Make fro ...Show All
Visual Studio Team System Bug in the Load results caclulation?
Hi I think I have found a Bug in the load test results calculation: After running a load test, I looked for the network utilization counters, and i noticed that the Avg. rate seems to be smaller than the Min.rate: Category Min Max Avg Network Interface 58,924 420,073 7,594 Network Interface 414,427 3,160,187 94,251 I could'nt recreate this Bug, but I'm very concerned as for the reliability of the results VSTS ca ...Show All
.NET Development how to refusal from different site request data?
Asked how refuses to come from the different stand request My meaning is wants to refuse other websites to transmit to my website data In other words, actually the website or other regions to mine website transmission data, my website refuse to accept and to process, asked how establishes like example: allow: http://www.myWebSite.com/a.aspx send to http://www.myWebSite.com/b.aspx http://www.myWebSite.com/c.aspx send to http://www.myWebSite.com/b.aspx b.aspx allow request current send data disabled: http://www.mysadfsdfaWefsafsdabSfsdite.com/ send data to http://www.myWebSite.com/b.aspx http://www.otherWebSite.com/ sen ...Show All
.NET Development worker thread "freezes", status "Running"
Upon a double click in my program, I spawn off a worker thread who crunches numbers and creates a large DataTable. Multiple worker threads can be going at once. Each worker thread updates the program's progress bar for each row it has added. I have lock statements set up so mult threads dont collide and try to increment at the same time. When the worker thread is complete, it calls the main UI thread and passes it the created DataTable so it can be displayed. In situations where I'm really abusing the program (having 7-8 threads going which will be creating 200,000+ rows), sometimes one of the worker threads never completes. It never calls ...Show All
Visual Studio Express Editions 2 events at once
I'm creating a simple, old, black and white tennis game for practice. I've created an event handler for 9 keys - 2 for moving 2 paddles up, 2 for moving them down, 2 for left and 2 for right. I also have an Enter key that starts the ball moving. The problem is that when I press Enter, none of my other keys work, until the ball goes off the screen. Does anyone have any suggestions how to fix this If you provide mode detail, someone might be able to provide some guidance. I'll assume this is a WinForms application. What event are you subscribing to to handle the keys, KeyDown, KeyUp, or KeyPress What is the c ...Show All
