AlistairSKing's Q&A profile
Visual C# How to add data to a datagridcombocolumn when another datagridcombocolumn is selected ?
Hi all, I have a datagridview which has 4 columns as below. DataGridViewTextBoxColumn dgvTxtMaterialID = new DataGridViewTextBoxColumn (); DataGridViewComboBoxColumn dgvCmbMaterialType = new DataGridViewComboBoxColumn (); DataGridViewComboBoxColumn dgvCmbMaterialName = new DataGridViewComboBoxColumn (); DataGridViewTextBoxColumn dgvTxtQuantity = new DataGridViewTextBoxColumn (); ------------------------------------------------------------------------------------------------------------------------ | dgvTxtMaterialID | dgvCmbMaterialType | dgvCmbMaterialName | dgvTxtQuantity | ------------------------------------------------------------------------------------------------------------------------ ...Show All
Visual Basic MSScriptcontrol And VB 2005
When i try to do an addobject through the Microsoft Scriptcontrol like... Scriptcontrol1.addobject("Form",Me) Scriptcontrol1.addobject("Form",Me,True) Scriptcontrol1.addobject("Form",ctype(Me,Form),True) it just makes an "Specified cast is not valid" i would realy appreciate some help i fell like i have tryed everything posible to make it work Huy - this is not related to windows forms (I'm assuming you're thinking "ToolStrip" control ) I think Jonh is actually talking about http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnexpvb/html/usingscriptcontrolmethods.asp The closest I can find for .net is http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnhcvb04/h ...Show All
Visual C# jagged arraylist!
i have an arraylist called clsandsock which contains 2 bojects.. a socket and a string.. and another arraylist called math_class which contains the "clsandsock" arraylist... the problem is that i dont know how to access the inner arraylist!! if (szData.Substring(1, szData.Length - 3) == "math_class") { socketData.ClassName = szData.Substring(1, szData.Length - 3) ; ArrayList clsandsock = new ArrayList(); clsandsock.AddRange(new object[] { socketData.m_currentSocket, socketData.ClassName }); math_class.Add(clsandsock); MessageBox.Show("user " + socketData.clientID + "\n had been successfuly added to class\n math_class"); ...Show All
SQL Server SQL variable and IS variable in Execute SQL Task
Hi, I have an Execute SQL Task (OLE DB Connnection Manager) with a SQL script in it. In this script I use several SQL variables (@my_variable). I would like to assign an IS variable ([User::My_Variable]) to one of my SQL variables on this script. Example: DECLARE @my_variable int , <several_others> SET @my_variable = <do_some_stuff> Of course, I also set up the parameter mapping. However, it seems this is not possible. Assigning a variable using a only seems to work in simple T-SQL statements. I have several reasons for wanting to do this: - the script uses several variables, several times. Not all SQL variables are assigned via IS variables. - For read ...Show All
Visual C++ mt.exe regularly crashes
Dear all I have been encountering mt.exe crashes with increasing regularity in VC2005 recently. While building a project during the "Embedding manifest" stage I get a "mt.exe has encountered a problem and needs to close. We are sorry for the inconvenience." error. I can usually fix the project by cleaning it then building it. Has anyone else experienced any similar problems Thanks in advance. Blair I haven't had any crashes, however there are two different mt.exe files that ship with Visual Studio 2005 one is in C:\Program Files\Microsoft Visual Studio 8\VC\bin the other is in C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin The one that is used by default by Visu ...Show All
Visual Studio 2008 (Pre-release) What is 3-tier architecture?
Hi, I want to what is exactly meant by 3-tier application .can u give some sample. Right i want to write database accesss layer for my application if some has some sample example please provide with it . Thanks in advance. A web application accessing a database is often referred to as three tiers (the web client, the web server, and the database). In the strictest sense a three tier architecture is a "Thin" client used primarily for UI rendering, a business logic/data-access layer that the client communicates with, and a database that handles persistence. Microsoft Patterns and Practices provides an excellent guide ( located here ) on creating a Data Access Layer that provides much more information than I can here. H ...Show All
Visual Studio Team System Migrating to another server : The IIS application pool user name is invalid.
I am following the new TFS Admin guide : TFSAdmin-v61101.chm, in order to perform a test restore of our TFS installation onto a vm hosting a TFS installation with another name. i.e. TFSProd -->Move to --> TFSVM The VM is in Workgroup mode, but is a full-blown TFS (i.e. not Work Group edition) I am following the guide document entitled "How to: Restore Team Foundation Server Data" I have restored Sharepoint databases, including STS_Config I am trying to Set the Configuration Database Server in WSS, but get the following error: The IIS application pool user name is invalid In IIS I have STSAdminAppPool and STSAdminAppPool_1 - both are under the Network Service identity. In SQL Server, Network Service is mapped to th ...Show All
SQL Server distinct count
Hi I have a table which stores the shift information for employees. The table contains 10 columns as Employeename,Employeeno,month,year,shifttimings etc. If an employee works a day in a particular shift, then a row will be inserted in to the above table for that employee. Now at the end of the month i wanted to calculate the shift details for each employee for a particular month of a given year like employeename,employeeno, noofdays(countof shiftdays). Can some body help Thanks in Advance! Santhosh You could create a view as Select EmployeeName, EmployeeNo, Month, Year, Count(*) As NoOfDays From EmployeeShift Group By EmployeeName, EmployeeNo, Month, Year and apply Where to it... ...Show All
Visual Studio 2008 (Pre-release) Can a MessageContract be used with some other parameter in an Operation Contract?
I tried using a string type with message contract, I am getting the following error. MessageContract parameters must be either a single input parameter or a return value. Is there any other way to use other types with MessageContract Thanks Sangeetha S So you're using a msgcontract attributed object as well as a string parameter for the operation Something like this: [OperationContract(Name = "ThisIsASimpleCallUsingMessageContract", Action = "urn:MessageContractTest/SimpleMessageContractCall", ReplyAction = "urn:MessageContractTest/SimpleMessageContractCallResponse")] ResponseMsg1 SimpleMessageContractCall(RequestMsg1 input, string blah); If yo ...Show All
.NET Development Can a Windows Service Return any value
I am new to dotnet, but for our requirement we need Windows Service returns value. If possible send the details and example in C#. Windows Services do not 'return values' in the normal sense to a client application. However you could have that service pubish a remoting object for example whose method returns a value. Cheers, Micky ...Show All
Visual Studio Express Editions Help with URI for web browser
I am making a simle web browser in C# express edition and everything works fine. But when I go to click a website in my combo box and click Go, it says my URI is unidentified or something. Could someone please help. Code is displayed <a href="http://forums.xbox.com/8820550/showpost.aspx">here</a> In your line: webBrowser1.Navigate(new Uri(comboBox1.SelectedItem.ToString())); What is the value of comboBox1.SelectedItem If you take the value of that ahead of time and stick it into a string, what is it Does the address you are trying to use begin with "http://" ...Show All
.NET Development Simple instant messenger source or how to...?
I have been looking everywhere for a simple, open source instant messenger that was written in Visual Basic .Net but have had no luck. I need this for two reasons: - I don't want my company chatting with their friends during the day (on other IMs) and I am a big fan of custom applications. - Secondly, I'd like to learn how to do this. Here are the basic requirements for what I'm looking for: - Private conversations (not chat room) - Server-based (not P2P) - Ability to send files Anything will help (actual source [whether yours or not], a guide to making your own, etc.) Thanks, I know you'll help me out as you have in the past. Matt Thanks, but it's not quite what I was looking for. The only examp ...Show All
SharePoint Products and Technologies the customized SPItemEventReceiver did not hook events using SPFileCollection.Add !!!
Hi. everyone. I created a content type inherited from the default Document Content type and associated a customized SPItemEventReceiver with this content type and deployed it to a wss server. And I create a list using this content type. When I uploaded a word document from Word 2007, Item events were successfully fired and event handler hooked those events. But when I uploaded a word file using the SPFileCollection.Add method of the wss object model, Item events were not fired. Please give me a advice. ...Show All
Windows Forms MSI PRoblem
I have created a MSI in VS 2005. The MSI copies the file at target location in a folder. But the problem is if the same file is already present on the target location at the same folder then MSI doesn't replace it. Can anyone please suggest how to resolve this PLease note that i have already tried to rebuild Do the files have version numbers Please see topic "File Versioning Rules" in the SDK: http://msdn.microsoft.com/library/en-us/msi/setup/file_versioning_rules.asp You may also want to create a log file ( www.msifaq.com/a/1022.htm ). This should include information why the file wasn't replaced. If this is a Small or Minor Update please also look for SELMGR errors in the log. ...Show All
Windows Forms How can i get the result that is coming from messageBox buttons??
I have used an message button and it contains Abort Retry Ignore buttons. I want to do something according to which button is selected by the user. How can i get this pls help.... My code is : private void asd() { try { Thread .Sleep(400); while ( this .progressBar1.Value < 20) { this .progressBar1.Step = 2; this .progressBar1.PerformStep(); Thread .Sleep(50); } this .Close(); Application .Run( new MainForm ()); } catch { MessageBox .Show( "Yuklerken Hata Olu tu" , "Hata Mesaj " , MessageBoxButtons .AbortRetryIgnore, MessageBoxIcon .Stop); ...Show All
