NeedSomeAnswers's Q&A profile
Visual C# string.Contains values from a Hashtable?
Morning all, I have the following code: ========== Hashtable strAllowedExtensions = new Hashtable(); // more code here private bool SetExtensions() //*** SetExtensions //* Add extensions to the array collection //*** { strAllowedExtensions.Add("DOC", "Microsoft Word"); strAllowedExtensions.Add("PDF", "Adobe PDF"); return true; } // more code here if (objFileUpload.FileBytes.GetLength(0) > intMaxUploadSize) { objFileUpload = null; ...Show All
Visual Basic Make sure the application for the file type (.vb) is installed
I installed VS 2005 Beta 2 on a WinXP pro system (numerous times). It finally installed without erreors. It looks like it is basically working - I can create a new windows project and add items from the toolbox, edit the code etc. If I open an existing project (created on another box) things load properly but I cannot open any forms in designer view (I can open them in code view). When I attempt to open a form in design view I get the following error popup: ===================== There is no editor available for 'c:\....\myForm.vb'. Make sure the application for the file type (.vb) is installed. ==================== Any thought on how to correct this I also had the same problem and have not been able to user VS2005 forms editor f ...Show All
.NET Development merging contextmenu strips
Hi, I have a list of context menu strips which I need to merge as one, but the individual menus must remain unch ange d. I try to do that as follows: ContextMenuStrip contextMenuMerged = new ContextMenuStrip (); foreach ( ContextMenuStrip menu in m_contextMenuList) { for ( int i = menu.Items.Count - 1; i >= 0; --i) { contextMenuMerged.Items.Insert(0, menu.Items ); } } But once the item is inserted in the contextMenuMerged menu, that item is removed from the original menu. Is there any way to merge the context menus without modifying the original menus Thanks, Manju Thanks for the reply. But I tried the following: foreach ( ContextMenuStrip me ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Is the XNA Game Studio Express supposed to look exactly like Visual C# 2005 Express Edition?
I just downloaded XNA Express 1.0 and I looks just like Visual C# Express Edition that I downloaded a week ago. It even says Visual C#.......... and I dont understand why. Also I could never start a new project because there were no templates to select. Does anyone know what my problems are and how I can fix them. Did you have one of the betas installed If so, did you uninstall it first Failing all else, uninstall everything (C# Express and GSE), install C# Express then GSE. ...Show All
SQL Server The specified SQL Server could not be found?
I have installed SQL Server 2005 , Nov RTM (from MSDN) on Win XP Pro machine as a named instance. If I try to connect to it from a remote machine (either using Management Studio 2005 or by trying to create a DSN), it throws up the following message: --------------------------- Microsoft SQL Server Login --------------------------- Connection failed: SQLState: '01000' SQL Server Error: 11004 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). Connection failed: SQLState: '08001' SQL Server Error: 6 [Microsoft][ODBC SQL Server Driver][DBNETLIB]Specified SQL server not found. --------------------------- OK --------------------------- Yes, I have checked that in SQL Server Configuration Manager, TC ...Show All
Visual Studio Team System SSIS Source Control?
Hey, If you use TFS and VS 2005 for Database Developers, can you use TFS Source Control for your SSIS projects/packages If so, does anyone have a link they could point me to with more information. I have been hunting around all morning and haven't found anything about SSIS in TFS Source Control. Thanks! Sql Server Integration Services (SSIS) projects are controllable via TFS within Business Intelligence Development Studio (BIDS) or Visual Studio 2005. It should be the same as soure controlling C# and other project types. If you've installed the Team Explorer SKU, then you can go to Tools->Options->Source Control and set Team Foundation as the source control plugin. After that you can create or open ...Show All
SQL Server Emailing Errors
I'm sort of new to SSIS so I apologize if this is a trivial question: I setup a package and want it to email me if there is any errors. Right now I got it working to send me a pre-written message about the failure, but I want to load the full task failure message into variable and email it on the email body. But so far I have not found a way to save the error messages into variables so I can email them. Anyone can help with that one Under email task editor- build an Expression for "Message source" you could then do something like: " There was a critical error in the Your Load. Error Msg follows " + @[System::ErrorDescription] to bubble up the error message. ...Show All
Visual Studio Express Editions Create 300 excel worksheets
I have to create a little over 300 worksheets (this is a common task and I want to make it some want automated). I have an excel workbook that contains the names of each tab(worksheet) A1-A304 (in this case). I want to be able to first open that workbook and pull that data out into an array or whatever you suggest and then run a loop to create new worksheets in a new workbook for each cell (A1-A304). Thanks pseudo code...clean-up and error checking needed: XL = New Excel . Application xlwb = XL . Workbooks . Open ( "TheFilePath" ) Dim SheetNames As New List ( Of String ) For Each xlsheet In xlwb . Worksheets SheetNames . Add ( xlsheet . Name ) Next For Each ...Show All
SQL Server Appropriate Data Type
I want to save some serialized data in a SQL Server 2005 table. What is the appropriate field type for this I won't be associating a schema with the data. The data could vary in length--even up to several MB. I'm not sure whether to use text, NVARChar(MAX) or XML. Brian Brian, A couple of SQL Server 2005 MSDN aritcles talk about when to use XML and some of the best practices. Some relevant ones are " XML Best Practices for Microsoft SQL Server 2005 "; " XML Options in Microsoft SQL Server 2005 "; " Performance Optimizations for the XML Data Type in SQL Server 2005 ". In short XML is very useful 1) when you want schema validation (may not apply to your case); 2 ...Show All
SQL Server SQLNCLI errors with Sql 2005 Linker Servers
Hi, I am trying to setup up a linked server in our test environment that allows Server A to run a stored procedure that writes to server B. However, I am receiving the following errors when attempting to make the connection and execute the stored procedure. OLE DB provider "SQLNCLI" for linked server "TEST2" returned message "Invalid authorization specification". Msg 7399, Level 16, State 1, Procedure Test_SP, Line 230 The OLE DB provider "SQLNCLI" for linked server "TEST2" reported an error. Authentication failed. Msg 7303, Level 16, State 1, Procedure Test_SP, Line 230 Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "TEST2". I've ...Show All
Visual Basic How to pass a password to a process?
This may sounds easy but the thing is.. I want to be able to run a process and pass its userernam, password. process.startinfo.filename ="runas.exe" process.startinfo.arguments="\noprofle \user: username main.cpl " can I add the password somewhere here process.start() Then I will save those as encrypted text along with the password. I am using visual studio 2003 and coding in vb.net. Upgrading to 2005 is not an option because I can’t upgrade the framework to 2.0 at this time. Found it. I found something like "runas.exe" called "lsrunas.exe" and this one does accept the password as an argument. It's amazing utility. ...Show All
SQL Server Proble moving database to server
Hi, I'm developing a website using the new authentication system from asp.net 2.0 and when I try to copy the database to my server and I try to add data to it, it gives me a read-only error. I've tried several ways, but I can't seem to find the solution. It works well in my computer but if I move it to the server it just doesn't work. Is there anything I need to do I have all the permissions needed in IIS. Thanks, Bruno Silva You can find out more about moving or copying databases here: http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlbackuprest.mspx Note that there is a link at the bottom if you're using SQL Server 2005. Buck Woody ...Show All
.NET Development Website
I have my site running on Linux. Can I run ASP on it I signed up with a hosting company for a year and now I need to get my site switched from PHP. also can MySQL work with ASP the web site is http://www.webhosting-review.com ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 360 Deployment Issues
Hello I've downloaded the latest version of XNA: GSE, signed up to Creators Club, downloaded the launcher, created a key and entered it into GSE. The 360 is sitting there waiting for a PC connection but the deployment just times out. I've checked the subnet and they're both 255,255,255,0. It doesn't work whether it's wireless or wired. I can't ping it from the PC, it just times out. Got another pal to try pinging their 360 from their PC and they get a similar time out. I've also made sure all the required ports are open, I think. I'm not sure, we have a Belkin router and I've added the ports the docs say to add but I can't test whether they are actually open or not. L ...Show All
.NET Development How to display an image of the resources in an assembly in the WebBrowser control?
Hello, does anybody know how to display an image of the embedded resources in the WebBrowser control In VisualStudio 6 and the IE-control this worked like this: Code: "<IMG src=\"res://ErrorDialog.dll/Error.jpg\">" I tried it this way in .NET with the WebBrowser-control: I Code: "<IMG src=\"Properties.Resources.ImageError\">" but it doesn't work... Is there a way to do this Best Regards B. Ritter nobugz wrote: The C# and VB.NET IDEs no longer support native resources. This blog entry shows you several alternative. I just edited my previous post ;-) Actually it does work! ...Show All
