iainatk's Q&A profile
Visual Studio Express Editions Need help with "Saving Data to a Database"
Hi, I have VBExpress and Access with WinXP. I started a new project, created a new datasource by connecting to the "Northwind traders" database. From the datasource window I selected the Employee node and set the control type to "Detail". I then dragged the Employees node to my form1 and got a bindingnavigator and several textboxes. When I click on "Add New" and "Save" without entering any data, I get an error which indicates that Null values are not allowed in some of the fields. I have been trying to insert validation code but it is obvious that I know not what I am doing! What is the "Best Practice" method of dealing with this issue Publi ...Show All
SQL Server Saving maintenance plan failed?
=================================== Saving maintenance plan failed. =================================== One or more arguments are invalid ------------------------------ : Microsoft.SqlServer.Dts.Runtime.Application.SaveToSqlServerAs(Package package, IDTSEvents events, String packagePath, String serverName, String serverUserName, String serverPassword) Microsoft.SqlServer.Management.DatabaseMaintenance.MaintenancePlan.Save() Microsoft.SqlServer.Management.MaintenancePlanWizard.MaintenancePlanWizardForm.PerformActions() I am having this same issue and have updated my install of SQL 2005 Standard with SP1. I am getting the following message when trying to create a maintenance plan with the wizard: One or more ...Show All
Visual Basic check assembly
i need to Check Whether the assembly is already running in the process when i start the same assembly ( to avoid duplication in assemblies running currently) i need one copy of assembly to run at a time.. is there any property to set or how to check if its an executable assembly, your app, you can get the list of processes by name and if it already exists then you know that another instance is running: Dim theProcesses() as Process = System.Diagnostics.Process.GetProcessByName(" yourAppName ") if theProcesses.Length > 1 then 'another process running end if ...Show All
.NET Development InvalidOperationException for operations sharing the same output message
I have created a .NET client to consume a web service (not .NET). I used WSDL.exe to generate the .NET cloent proxy. The problem is I get a runtime error (such as below) if more than one operation is included in the proxy that uses the same output message (e.g., ResponseElementName=ResultCodeStruct) The WSDL has several operations using the same output message. WSDL.exe generated method signature: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="urn:testit", ResponseElementName=" ResultCodeStruct ", ResponseNamespace="urn:testit", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrappe ...Show All
Visual Studio Express Editions How to AutoRedraw drawing on a picturebox
I wrote a simple program which saved two mouse positions of mouse down and up and then drew a line. But the problem was that when I minimized the window and again restored it, the drawing would disappear. In VB6, enabling the AutoRedraw value would repaint the picturebox. How can I do it in VC++ Plz don't mind the unnecessary cast, it was just a dummy project (^; private : System::Void pictureBox1_MouseDown(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) { x1 = static_cast < float >(e->X); y1 = static_cast < float >(e->Y); } private : System::Void pictureBox1_MouseUp(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) { x2 = static_cast < float >(e->X ...Show All
Audio and Video Development .SWF version supported in Windows Media Player?
Hi, Sorry if this is miscategorized, but I couldn't find a forum specific to Windows Media Player. Does anyone know what versions of Flash .SWF files are supported by the various versions of Windows Media Player (9/10/11) The documentation indicates that .SWF files are supported, but gives no indication of what file version. Thanks, Garth Hi Garth, The Windows Media Player newsgroup is probably your bet bet for getting answers to WMP questions. http://www.microsoft.com/windows/windowsmedia/community/newsgroups/WindowsMedia/default.mspx dg=microsoft.public.windowsmedia.player&lang=en&cr=US This forum focuses on questions about Media Foundation, the new multimedia platform for Vista. ...Show All
SQL Server Intermittent Connection Problems with Sql Server
I am experiencing intermittent connection problems with the Northwind database and sql server express. The most frequent error message indicates that I am already logged in and will not allow another user. The odd thing is that even when I am locked out I can access a Northwind database from another connection on Server Explorer. I ran code to demonstrate simple binding for two text boxes, no problem. I added a project to show complex binding using the datagrid view tool, but could not get past selecting the database. I tried the same simple binding project on another computer running a beta version of VS 2005 Pro and could not connect to Northwind on that computer also. (Two different Northwind databases, different computers) ...Show All
Visual Studio Express Editions How to delete selected row in datagridview?
Hi, how do I permanently delete selected row in datagridview as well as permanently deleting it in my .mdb file . Thought of using oledbcommand or something but I am still a beginner in C# so not familiar with Oledb. Thanks. Thanks Scott. Nice example for a beginner. Could you help me out with the exception that occurs Exception: Update requires a valid DeleteCommand when passed DataRow collection with deleted rows. I try to use the update method to update my database this is where the pump1TableAdapter.Update( this .fYPDataSet.Pump1); <<< Exception occurs<<<<<<< ...Show All
Internet Explorer Development "Privacy mode" to prevent caching?
Would it be possible to create a plugin or program that stops I.E. from storing cookies, temporary files, history, etc, when the option is enabled I think I recall seeing this feature in Safari for Mac and I liked it a lot, it's convenient if you don't want to wipe out your history and temp files or go through them individually. Plus I've had people insist on clearing the temporary files after checking their email on my computer. I'm generating a PDF in an asp.net application using xsl-fo, I assume from your answer that it is not possible to prevent IE from caching the PDF before it is read by acrobat. Expiring the page stops the page from being cached but also stops it from being displayed by IE. ...Show All
Windows Forms Font families
hey, I am trying to make it so that a combobox's items are all of the fonts the computer has, so I tryed this: comboBox2.Items.Add(System.Drawing. FontFamily .Families.ToString()); but that only makes it have one item with the words: System.Drawing.FontFamily.......... but I want it to show all the fonts currently on the computer...how would I do that Thanks :) FontFamiliy.Families property returns an array of FontFamily and you need to add an item to the combobox for each item in the array: foreach (FontFamily family in FontFamily.Families) { comboBox2.Items.Add(family.Name); } ...Show All
SQL Server how to give permission to this user to connect to my database???
I am using Microsoft Visual Web Developer 2005 Here are the steps I used to create my database Tools -> connect to database -> Select datasourse - Microsoft SQL Server (SqlClient) -> Server name - comp4_8\SQLExpress -> Log on to the server – Use Windows Authentication -> Connect to a database -> Select or enter a database name – MyDataBase comp4_8 - is the name of my computer. I am using Windows XP Professional SP2. Login as administrator without password. Now about the problem I have. On local machine everything is great! But I hosted my website and got this error. The question is how to give permission to this user to connect to my database. Cannot open database " ...Show All
SQL Server Updating a Table having a Foreign key constraint
Hi I am trying to update tables "Table A" & " TableB" with a new value for a particular column1. Now "TableA" contains a foreign key "FK1" defined on it and is referencing another table "Table B" containing the similar column "Column1" Because of this constraint I was not able to update TableA and TableB. My question is 1) If i wanted to go ahead with this update, what are the possible ways 2) If only solution is to drop the constraint. Then How do i know the definition for this particular Foreign key, i mean it may refer some columns in Table B. I wanted to know the complete definition of it so that i can rebuild the constraint after the update. Right now i can se ...Show All
Visual Studio Express Editions How to catch selection change of DataGridView Combobox
I need to catch the selection change event of a combobox column of a datagridview. Thanks, RoC RoC, Firstly, there is some difference between the source of ComboBox, items from the database or from the program. I don't know whether you have bound the control to the database. Secondly, here I have an example on the SelectedIndexChanged event with the items are from program as follows: Private Sub ComboBox1_SelectedIndexChanged( ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged ' Cast the sender object back to a ComboBox. Dim ComboBox1 As ComboBox = CType (sender, ComboBox) ' Retrieve th ...Show All
Software Development for Windows Vista SQLTrackingService generates an error
Hello everybody, I have a problem on my computer with a simple application which use the SQLTrackingService. We are 2 working on the same application. On my collegue's one, it works but not on mine. I spent a long time to search but no more idea. We have exactly the same source. We run application thru debug mode from VS. If I remove persistence, it still does not work. Database is on another machine for the 2 developers. Our services conf: <WorkflowRuntime Name="WorkflowServiceContainer"> <CommonParameters> <add name="ConnectionString" value="Initial Catalog=SWF;Data Source=SRV16;Persist Security Info=True;User ID=swfuser;Password=swfuser;"/> </CommonParameters> <Services> <add type="System.Workflow ...Show All
Visual C# otp: How to add and name an excel worksheet to an excel application object
Hi I have an excel application object. Now i wanted to add a new worksheet to this object and name it dynamically. I mean the name of the worksheet will change dynamically. Once this worksheet is added, the data from grid will be exported to the excel. Iam currently using the below code to initiate an excel object and data to the excel. Excel. ApplicationClass excel = new Excel. ApplicationClass (); excel.Caption = "[Name]" ; excel.Workbooks.Add( true ); and then adding to the excel object ..using the below logic excel.Cells[1, ColumnIndex] = col.ColumnName; but what i wanted is, everytime the new data is displayed in my datagrid, generate a new excelworksheet and add it to the excel object and n ...Show All
