Hi thanks for your solution and links, But your query returned an error. Msg 512, Level 16, State 1, Line 1 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
spankyleo123
Posts
-
Database updates -
Database updatesThanks for your help. I have solved it by creating a view of all 'Not NULL' (top most) rows . Then created a stored proc to loop through the view and update the TID. A long procedure though but it did work. Cheers !
-
Database updateshi thanks for your reply. But am afraid your SQL didnt work. All it did was updated the entire column with the max value in the TID column.
-
Database updatesHi, I want to update the column TID with the top most value of TID as long as MID is the same number. I want to do this (table after update) PID SID TID MID RID 3 0 0 4 1 3 NULL 0 4 2 3 NULL 0 4 3 3 NULL 0 4 4 3 NULL 0 4 5 3 NULL 0 4 6 3 NULL 0 4 7 3 4 4 8 1 3 NULL 4 8 2 3 NULL 4 8 3 3 NULL 4 8 4 Below is the actual table before update. PID SID TID MID RID 3 0 0 4 1 3 NULL NULL 4 2 3 NULL NULL 4 3 3 NULL NULL 4 4 3 NULL NULL 4 5 3 NULL NULL 4 6 3 NULL NULL 4 7 3 4 4 8 1 3 NULL NULL 8 2 3 NULL NULL 8 3 3 NULL NULL 8 4 Any suggestion/solutions deeply appreciated. Thanks
-
CSS Placeholder questionHow to highlight complete placeholder on MouseOver or when text is being inputted in the control within the placeholder? Example below. _______________________________________________ |Name : | Joe Bloggs | | | |________________ __| | |____________________________ ______| | | DOB : |__________________| | | Address :|__________________|
-
Microsoft Interop Word Winforms issue on CITRIXyeah, Word is installed on the host machine and its loading all the assemblies (so its working on button click) and its throwing a Null reference exception when the same button is clicked the second time ie after the word doc is closed and the button is clicked again.
-
Microsoft Interop Word Winforms issue on CITRIXHi, I have a developed a winforms app with c# as the language. Integrated a word object model (Microsoft.Interop.Word 12.0 library) to fill in a word document from a word template using bookmarks. The application opens the word document on button click. This workd fine on my local machine, but when installed on a CITRIX server it is giving an error on button click (Null reference exception). The word doc opens fine when the button is clicked once, but when i close the word doc and re-click on the same button its throwing an exception.
private void btn_Click(object sender, EventArgs e) { oWordApp = new Word.Application(); oWordDoc = new Word.Document(); object missing = System.Reflection.Missing.Value; object oTemplate = "C:\\Program Files\\MyTemplate.dot"; oWordDoc = oWordApp.Documents.Add(ref oTemplate, ref missing, ref missing, ref missing); object oBookMark = "Date"; oWordDoc.Bookmarks.get_Item(ref oBookMark).Range.Text = DateTime.Now.ToShortDateString(); oWordApp.Application.Visible = true; oWordApp.WindowState = Word.WdWindowState.wdWindowStateNormal; } Does any one know how to resolve this issue?
-
Owned Forms issueThats the whole issue mate. If I say
Show(this) or ShowDialog(this)
I get the error which says "Form that is not a top-level form cannot be displayed as a modal dialog box. Remove the form from any parent form before calling showDialog." Ohh I better ask Uncle Google instead. Cheers
-
Owned Forms issueMate, This is the hierarchy of my app. MDIParent > MDIChild > buttons to open additional forms. these forms appear in the MDI Container if I set
form.MDIParent = this.MDIParent
But my question is When I close the child form, I want to close all other open forms which are opened through button clicks?
-
Owned Forms issueHi thanks for your reply. Am getting this exception error when I write Ur code. "Form that was specified to be the MdiParent for this form is not an MdiContainer. Parameter name: value "
-
Owned Forms issuethanks for your reply, But the problem is, I want the form to be displayed within the MDI parent container. If I use Show() or ShowDialogue() the form is displayed outside the MDI parent container.
-
Owned Forms issueHi all, To be precise, I have a winform (say form A) with buttons on it, which when clicked, opens up new forms (say b, c, d). I want to set form A as the owner and forms b,c,d as owned forms of form A. The basic thing which I am looking to achieve is that when I close form A , I want to close all other owned forms and warn the user that some forms that belong to form A are already open and if they would like to close it? FYI - form A is already a ChildForm of a MDI parent in my application. Any help will be appreciated. Thanks,
-
Binding Source IssueCan you tell me how to update the database when the binding source is modified please? In this case the textBox text is being modified and I want to know how the selected item changed (i think ur trying to say SelectedIndexChanged event ?) and changing the property of the combobox to dropdownlist would solve this issue? Thanks,
-
Binding Source IssueHi, Am developing a winforms app using C#. I am using binding source to design the forms. I have a combobox with items "Yes" and "No" depending on the selection of this I enable or disable a text box.
private void MyComboBox_TextChanged(object sender, EventArgs e)
{
if(MyComboBox.Text == "Yes")
{
textBox1.Enabled = true;
}
else
{
textox1.Text = ""; //am setting the text box to null if there is any text in it.
textbox1.Enabled = false;
}
}Lets say I have selected "Yes" from the combobox and entered text into the textbox1 and save the input on save_click. the value gets stored into the database. Now if I go back to the form and edit it....I now change the combox to "NO". It clears the text in the textbox1 to "". When i click on save...it saves the record. But the problem is that it is not updating it into the database.? Any idea why this is happening or do i need to include more code into the event. Help Appreciated..thanks,
-
Linq Insertok cheers mate
-
Linq Insertyeah am using Linq-to-SQL dataclasses in my project. I just want to run an update on button click which will insert data from one table to another table. I dont know how it is done using LINQ. The example shows insert into just one table. I want to insert values from one table to another. Help appreciated
-
Linq Insertam using MSSQL 2008 thanks
-
Linq InsertHi ppl, I want to insert data from one table to another using Linq C#. Can anyone let me know how to do this. something similar to
Insert into tbTest (test_id , test_name , test_type) select (mytest_ID , myTest_Name , 1) from myTestTable
Please provide an example or syntax in linq Thanks, -
Issue with Crystal Reportso how do i enable it ? Thanks
-
Issue with Crystal ReportIn my expert gallery? All I see are: Standard Cross-Tab Mail Label How come I can't see Standard Form Letter Form Cross-Tab Subreport Mail Label Drill Down Do I need add any references? I want to use the Form or Form Letter, but don't see it in my selection. What am I missing?