Rahul Garg's Q&A profile
Visual Studio Team System Messages Suppression
Hello! At the moment we are trying to get rid of all the fxcop warnings in our project, but have three issues we can't resolve. 1. Is there any ways to specify all the message suppressions in one place (file) We need it because suppression attributes like this: [System.Diagnostics.CodeAnalysis. SuppressMessage ( "Microsoft.Security" , "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage" )] make code complitely unreadable. We have option 'Create assembly level suppressions in:' in the project's properties but there is no information on how to use it. 2. In some cases we have to define enumerations in the following format: public ...Show All
Windows Forms Lisbox, ComboBox ItemData NewIndex
I will value your response to the following issue: In VB6 I used to populate a listbox as follows: SQL = "SELECT ID, Name FROM TableNames" Do While Not rs.EOF List1.AddItem rs("Name") List1.ItemData(List1.NewIndex) = rs("id") rs.MoveNext Loop &n ...Show All
SQL Server Reporting service with sql server 2005
I am developing an application using Visual C# 2005 and SQL Server 2005. I would like to make report services from feature of SQL Server 2005. Can I make report from reporting service with SQL Server 2005 How to make the report service Best regards, Simba Hello, I use Visual Studio 2005 and SQL Reporting Service 2005. My computer is windows 2003 Server. I have created one reporting service project. In my project, I have two parameters namely @startdate and @enddate. I have one matrix. I want to format background row of the matrix to have different colors. I use the expression like IIF(RowNumber(Nothing) Mod 2,&q ...Show All
Visual Studio Team System ADAM Error on Installation
Hi, I could not ever install the ctp version of foundation server. Finally on beta 2, i thought my woes would be over... Far from it Now it stops at the ADAM install itself. I did exactly as the installation guide said.. fresh machine.. it completes the step 1 starts the step 2 and then it says there has been an error.. now no info on what the error is all abt. I chkd the known issues and it mentioned abt the TMP variable spaces... I even changed it to c:\myTemp. Still no change to my luck. any idea what i might be missing here... TIA Paritosh jb_tiburon, Are you trying to get a single-server ins ...Show All
.NET Development What is appropriate for this?
Hello, I currently need to make a "list" of paths to a file. What is appropriate for this kind of a list a database or something else Thank You very much Keehun Nam I think you may find a datatable convenient, like someone mentioned. I'm unsure if the path object is serializable, if it is not then this will not be an option for you. Consider the following: using System.Data; DataTable pathLookupTable = new DataTable(); pathTable.Columns.Add("PathName", typeof(string)); pathTable.Columns.Add("PathObject", typeof(Path)); This gives you a generic datatable object that is capable of storing path objects by name.&nbs ...Show All
Visual Studio Express Editions Trouble finding/reading file
Hello everyone I am having the hardest time right now. I am testing backing all my DB tables to text files and then reading them in to populate the tables. I am able to create the files without problem. But when I go to read them in, I am getting the "Could not find file error". Below is a small sample. File exists is coming back false and trying to open the delimitede file is throwing the error (which makes sense because it is not being found). I can see the file withing the directory I specify and when using normal windows search tool, the file is found. What might I be doing wrong Thank ...Show All
Visual C++ Rationale for C++/CLI Value Types not having a default constructor
Given value class X { public: // Not allowed: X():i(100000),s(10000) { } // Allowed void InitializeDefaults() { i = 100000; s = 10000; } private: int i; short s; } How can: 1) X x; x.InitializeDefaults(); be better semantically than 2) X x; for setting the default values of 100000 for i and 10000 for s In other words what is the rationale for removing the natural user-defined default constructor for value types and forcing the user to default construct the value type object to its zero or null values and then have to call another function to set default values which the type may want I read that 2) can not be guaranteed to occur properly in ...Show All
Visual Basic Progress Bar for File Download Status
Currently when a button is click on my form the following code runs: Dim DL As New System.Net.WebClient() DL.DownloadFile(F, "c:\xxx.exe" ) Works great but has no visual feedback to allow users to see download status. Can someone help me to show the bytes/download status using a progressbar, Thanks in advance, Rob. http://www.vb-tips.com/default.aspx ID=d9d5a2ad-3874-4eb3-a18d-65cb7582aef3 ...Show All
Visual C++ Convert char type to int
Dear C++ Programmers How can I convert Char data type to Int data type , for sample when i use this code , it not work properly int MyNumber; char MyCharNumber='12'; MyNumber=int(MyCharNumber); it was return 49 or 51 to the int data type otherwise my char contain 12, please help me Do you mean how to convert a string to an integer type Converting from a char (a single character in C and C++) to an integer type is a just a promotion: char c = 'a'; int i = c; Converting from a string to an integer is slightly more complicated but luckily the C library provides a function for doing this: const char* number = "4 ...Show All
Windows Forms VB or C#, and why?
I come from a C/C++ background and never touched VB much until about a year ago. I was amazed at how simple it was to use COM components in VB. It was much easier than doing it in C++. So I can see why people write VB code instead of C++, it is much faster and easier to use. But, now that Microsoft changed VB to VB.NET, is ...Show All
Visual Studio Express Editions 'System.EventArgs' is a 'type' but is used like a 'variable'
Whats wrong with my code below Can you correct it private void txtusername_TextChanged( object sender, EventArgs e) { if (EventArgs (e) == Keys .Enter) this .txtpassword.Focus(); } } Try the KeyPressed Event and it will work fine. private void txtusername_KeyPress( object sender, System.Windows.Forms.KeyPressEventArgs e) { if (e.KeyChar == ( char )Keys.Enter) { Console.Write("a"); } } Let me know if this is helpful. ...Show All
Visual Studio Tools for Office BackgroundWorker problems with VSTO
Has anyone trie using the BackgroundWorker component inside of ActionPanes I spin up two panes in a Word Doc startup. Within the first pane, I start a long running action that when completed, updates data in the second pane. The issue is that within the RunWorker_Completed event, the executing thread is staying as the background thread, not switching back to the UI thread. UIThread:1 backgroundWorker_DoWork :5 backgroundWorker_RunWorkerCompleted :5 When running the same code within a winform, I get the expected behavior: UIThread:1 backgroundWorker_DoWork :5 backgroundWorker_RunWorkerCompleted :1 Any ideas ...Show All
Visual C++ Why breakpoints have been disabled ?
Normally I know how to set breakpoints and use breakpoints.I got a VC++ sample code from disk.When I set breakpoints and debug it,it show the following messages:One or more breakpoints cannot be set and have been disabled and the application will stop at the beginning of the program.Please tell me how to solve this problem . Thank you very much for your answer! how do u set this option in VS2005 Any idea ...Show All
Visual Studio Express Editions Add a web Srvice As a data source to my project
I want to Add a web Srvice As a data source to my project I add it successfull but after thet it did not add to my data source and still i donot have a datasource how can i solve the problem i do not Write Code For it I just Add a datasource and Choose Webservice and Add my Web Service . but no datasource add to my Project Do u Know Why A web service is not a data source, it builds a class that you can create instances of, and call. BTW, please don't spam the forums, I deleted your duplicate posts. ...Show All
Visual C# Need tips on how to utlize an ASPX page through a C# Windows App
I have an aspx page that a user can use to select a file from a FileDialog box and click a button to upload it to my server. I'm looking to change it to a non-visual aspx page and use a C# Windows App to interact with the aspx page. On the C# Windows App I want to have the user select their file they want to upload. Push 'upload' and send the request to the aspx page and upload the file to aspx page's server. I think, the first step is how to send a request from a C# Windows App to a ASPX page but don't know how to. If you have any suggestions or tips please post. Thanks We had are system in place using web services but the ...Show All
