Search Results

Search found 12683 results on 508 pages for 'row sun'.

Page 40/508 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Identifying which value of a multi-row inserts fails foreign key constraint

    - by Jonathan
    I have a multi-row insert that looks something like: insert into table VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9); Assume the first attribute (1, 4, 7) is a foreign key to another table and assume that this referenced table does not have the value '4'. A MySQLExeption is thrown with error code 1452. EXCEPTION: Cannot add or update a child row: a foreign key constraint fails (dbName/tableName, CONSTRAINT id FOREIGN KEY (customer_id) REFERENCES referencedTable (customer_id)) Is there a way to identify which value caused the error? I would love to give my user an error message that said something like: Error: '4' does not exist in the referenced table. I am using the .NET mysql connector to execute the insert. Thanks- Jonathan

    Read the article

  • WPF DataGrid row validation error count

    - by SuperFloh1234
    Hi! I'm currently facing the problem, that I import an Excel file to a DataGrid. This works pretty fine, but after importing the table, I need to know how many rows are invalid. I have applied several validation rules for the different datatypes, and I have an icon in the row header, that shows up if the row is invalid. But since I have more that 10.000 rows in the grid, I don't want scroll all the way through it to find the errors. Any ideas, how to determine the count of invalid rows (and then maybe bind that to a textbox)? Thx

    Read the article

  • jQuery Table - Reference User Input Row Names and Values

    - by Vic
    I have several tables which are generated by another application, which I have no control over. I am totally new to jQuery and ajax, and have only a limited knowledge of jsp. Two sample rows are: <table class="sicknessForm"> <tr id="row_0" class="datarow"> <td id="col_2"><input name="row_0-col_2" class="tabcell" value="Injuries"></td> <td id="col_4"><input name="row_0-col_4" class="tabcell" value="01"></td> <td id="col_5"><input name="row_0-col_5" class="tabcell" value="2"></td> <td id="col_6"><input name="row_0-col_6" class="tabcell" value="5"></td> </tr> <tr id="row_1" class="datarow"> <td id="col_2"><input name="row_1-col_2" class="tabcell" value="Absences"></td> <td id="col_4"><input name="row_1-col_4" class="tabcell" value="100"></td> <td id="col_5"><input name="row_1-col_5" class="tabcell" value="102"></td> <td id="col_6"><input name="row_1-col_6" class="tabcell" value="105"></td> </tr> </table> There are more rows and columns in the actual tables. What I need to do is to pass the ordered row information to the database, e.g.: Injuries, 1, 2, 5 .... Absences 100, 102, 105... I can retrieve the values for each input using: $('#SicknessForm .userInput').each(function() { alert($(this).val()); }); 1) How can I loop through each row, get the value from the first column (Injuries) and place the data into an array to send to the server? 2) How do I reference the first row of each column to disable user input on it? $(:HowDoIReferenceThis).attr('disabled', ''); 3) I need to validate that each cell is numeric, other than the first column. Any pointers on this (otherwise I can check it in my servlet), especially on how to loop through all valid input cells (everything except 'Injuries','Abences', ... cells). Many Thanks! Vic

    Read the article

  • Excel data connection - remove header row?

    - by ekoner
    The excel spreadsheet is connecting to SQL server 2005 using the connection string below: Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=XXXXXX;Data Source=XXXXXX;Extended Properties="HDR=No";Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=XXXXXX;Use Encryption for Data=False;Tag with column collation when possible=False It then pulls data from a view into Excel. The business user wants this information without a header row. This will allow her to review then save as a "headless" csv in SAGE file format. I attempted to alter the connection string by adding HDR=No but that hasn't worked. Additionally, I can't delete the header row. Deleting the content replaces the column names with "Column 1" etc. Any ideas appreciated!

    Read the article

  • ASP MVC Populate drop down list on jQuery add table row

    - by Jacob Huggart
    I have a page with several drop down lists that all have the same contents. The page starts out with only three ddls, but more need to be added based on user input. There is also other information associated with the drop down lists that is all in a table. So, when the user clicks a link I add a new row of textboxes and drop down lists to a table. When I add a row to my table, the new drop down lists are empty because there is no view data associated with them. How can I use ajax or jquery to pull the viewdata that I need to populate new drop down lists?

    Read the article

  • Select the first row in a join of two tables in one statement

    - by Oscar Cabrero
    hi i need to select only the first row from a query that joins tables A and B, on table B exist multiple records with same name. there are not identifiers in any of the two tables. i cannt change the scheme either because i do not own the DB TABLE A NAME TABLE B NAME DATA1 DATA2 Select Distinct A.NAME,B.DATA1,B.DATA2 From A Inner Join B on A.NAME = B.NAME this gives me NAME DATA1 DATA2 sameName 1 2 sameName 1 3 otherName 5 7 otherName 8 9 but i need to retrieve only one row per name NAME DATA1 DATA2 sameName 1 2 otherName 5 7 i was able to do this by adding the result into a temp table with a identity column and the select the Min Id per name. the problem here is that i require to do this in one single statement. this is a DB2 database thanks

    Read the article

  • HTML input type="submit" doubles row height in table

    - by FelixM
    I have a HTML table where some rows have a button like this: <td > <form action="..." method="GET"> <input type="submit" value="..."/> </form> </td> The rows with the input have about twice the height of other rows that have otherwise similar data. When I remove the just the input, the row height goes back to normal. I have the same behavior in Firefox and IE. Is there any way I can have normal row height AND the button?

    Read the article

  • IS NULL doesn't work as expected in SQL Server 2000 with no Service Pack on it

    - by user306825
    The following batch executed on different instances of SQL Server 2000 illustrates the problem. select @@version create table a (a int) create table b (b int) insert into a(a) values (1) insert into a(a) values (2) insert into a(a) values (3) insert into b(b) values (1) insert into b(b) values (2) select * from a left outer join (select 1 as test, b from b) as j on j.b = a.a where j.test IS NULL drop table a drop table b Output 1: Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48 Copyright (c) 1988-2000 Microsoft Corporation Developer Edition on Windows NT 6.1 (Build 7600: ) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) a test b ----------- ----------- ----------- (0 row(s) affected) Output 2: Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 2) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) a test b ----------- ----------- ----------- 3 NULL NULL (1 row(s) affected) If someone encounters the same problem - make sure you have the SP installed!

    Read the article

  • Delete a Row from a DataGridView given its index

    - by Ruben Trancoso
    My DataGridView is a single line selection and theres a rowEnter Event where I get the line index every time the selected line changes. private void rowEnter(object sender, DataGridViewCellEventArgs e) { currentRowIndex = e.RowIndex; } when I press a delete button I use the same index to delete the row myDataSet.Avaliado.Rows[currentRowIndex].Delete(); avaliadoTableAdapter.Update(myDataSet.Avaliado); it works fine if no column in the DataGridView is sorted, otherwise a get an error. What should be the way to know the row index in the dataset that corresponds to the rowindex from the DataGridView?

    Read the article

  • make javascript repeat for each row in a view

    - by Kathy Chavez
    I have created a view in Drupal. I"m using javascript to modify css in each row. The script runs on the first row, but does not make the changes on the rest of rows from the view. This is the script: <script language="javascript" type="text/javascript"> window.onload = floatbr; function floatbr() { var f = document.getElementById('firstright') // Get div element var s = document.getElementById('secondright') // Get div element var w = document.getElementById('catwrapper') // Get div element var sh = s.offsetHeight // secondright div height var wh = w.offsetHeight // catwrapper div height f.style.height = wh - sh + 'px'; } </script> I'm using it from this page: http://agsone.100webcustomers.com/floatbottom.php having the script in the page once does not do the trick. having the script in the view footer and repeating the script does not work. THanks! link to fiddle with html, css & js: http://jsfiddle.net/Vvjku/

    Read the article

  • asp.net free webcontrol to display matrix reports with column and row grouping, subtotals and totals

    - by dev-cu
    Hello, I want to develop some kind of reports in Asp.net with x-axis and y-axis being dynamics, allowing grouping by row and column, for example: have products in y-axis and date in x-axis having in body number of sells of a given product in a given date, if date in x-axis are years, i want subtotals for each month for a product (row) and subtotals of sells of all products in date (column) I know there are products available to build reports, but i am using Mysql, so Reporting Service is not an option. It's not necessary for the client build additional reports, i think the simplest solution is having a control to display such information and not using crystal report (which is not free) or something more complex, i want to know if is there an available free control to reach my goal. Well, does anybody know a control or have a different idea, thanks in advance.

    Read the article

  • Crystal Report with mutliple row columns.

    - by Jack
    I'm not sure if the title properly explains what I'm trying to do. I'm trying to move from using SQL Reporting Services to a Crystal Reports Web App. I've gotten some reports to design properly because they are simple cross-tab reports that require nothing special. I'm running into a little problem of a user matrix report. Here's how the report looks on SQL Reporting Services: group1 group2 group3 username1 first1 last1 title1 X X username2 first2 last2 title2 X X 2 1 1 Normally in VS2008 with a SQL rdl, I would right click on the row and Insert Column. However, i don't see a way to do this in Crystal Reports. I've tried setting up multiple row groups, but that adds mutliple groupings like: group1 Total ... Username Total ... first Total ... last ...

    Read the article

  • how to display the Grid on row click evnt on other jquery grid

    - by kumar
    Hello all, please help me out from this problem which i was facing since from long,, Comming to my applicaiton: Using Asp.net MVC with Jquery stuff, with back end DB2 I have a user controls with jquery grid in it, for the Jquery grid the URL I am assing is something like this. ID EmployeName PHoneNumber Deatils /Employee/Orders/Details /// Deails is my actionresult class.. I am getting the output result exactly what I am expecting... now I have one more action result calls LIST( List for that Deatils).. when User click on any row in the Jquery grid I need to pass ID( for that Employee to the DB2 to get that Employee List) and this Grid I need to show i nthe bottom of the first grid, Like If I click on second row I need to pass the ID to the DB2 to get second user result to display on the second grid. can anybody help me with the code.. Thanks

    Read the article

  • IS NULL doesn't work as expected in MSSQL 2000 with no Service Pack on it

    - by user306825
    The following batch executed on different instances of mssql 2000 illustrates the problem. select @@version create table a (a int) create table b (b int) insert into a(a) values (1) insert into a(a) values (2) insert into a(a) values (3) insert into b(b) values (1) insert into b(b) values (2) select * from a left outer join (select 1 as test, b from b) as j on j.b = a.a where j.test IS NULL drop table a drop table b Output 1: Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48 Copyright (c) 1988-2000 Microsoft Corporation Developer Edition on Windows NT 6.1 (Build 7600: ) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) a test b (0 row(s) affected) Output 2: Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 2) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) (1 row(s) affected) a test b 3 NULL NULL (1 row(s) affected) If someone encounters the same problem - make sure you have the SP installed!

    Read the article

  • Filter the datagridview column based on the current row of another column in C#

    - by user286546
    I have a datagridview that is populating columns from different table. I want to filter the column based on another column of the current row. I tried to use the cell enter event of the datagridview and then filtered the column by filtering the binding source on the column of the current row. private void lINKDataGridView_CellEnter(object sender, DataGridViewCellEventArgs e) { this.pROBLEMBindingSource.Filter = "item_id = " + this.lINKDataGridView.Rows[e.RowIndex].Cells[dataGridViewTextBoxColumn4.Index].Value + ""; } This is how I am filtering the "problem " binding source on the cell enter event of the datagridview . It is working fine but I am getting an error- being: System.ArgumentException: DataGridViewComboBoxCell value is not valid. Any suggestion

    Read the article

  • dropdown list box to display in the row..

    - by kumar
    Please can any body tell me is this right what I am doing here.. I need to display a dropdown list box in each row in the grid var lastsel2; $("#table1").jqGrid({ scroll: 1, sortable: true, url: '/friends/names/shiva', datatype: "json", mtype: 'GET', height: 200, autowidth: false, pager: '#page', colNames: [//columns names here ], colModel: [ { name: 'A', index: '', width: 90 }, { name: 'B', index: '', width: 100 }, { name: 'C', index: '', width: 70 }, { name: 'D', index: '', width: 65}, { name: 'E', index: '', width: 105}, { name: 'F', index: '', width: 105 }, { name: 'G', index: '', width: 100 }, { name: 'H', index: '', width: 70}, { name: 'I', index: '', width: 60}, { name: 'J', index: '', width: 60}, { name: 'K', index: '', width: 40 }, { name: 'L', index: '', width: 70}, { name: 'M', index: '', width: 60 }, { name: 'N', index: '', edittype: 'select',editype:true, width: 100, editoptions: { value: { 1: 'AA', 2: 'CC',3:'BD''}} } ], onSelectRow: function(Acct_Code) { if (A&& A !== lastsel2) { $('#table1').restoreRow(lastsel2); $('#table1').editRow(A, true); lastsel2 = A; } }, Here i am not able to see the dropdown box in row click? Thanks

    Read the article

  • Not able to get siblings value from table row

    - by Sullan
    Hi All, I am trying to get values from adjacent columns, when a radio button is clicked for that row. I'm able to do so, but the problem I'm facing, when there are more elements in the radio button column, then i am getting null values(i.e 2nd row is not working). Please help...Code is all follows <table id="dist_list" class="data"> <tbody> <tr> <td> <input type="radio" value="636406" name="distRG" id="radio_7" /></td> <td class="selected">Company 1</td> <td class="siteId">1234</td> <td class="siteName">First Company Name</td> </tr> <!-- Not able to get values from this row, since there are more elements in it --> <tr> <td> <span class="jqTransformRadioWrapper"><a rel="distRG" class="jqTransformRadio" href="#"></a> <input type="radio" value="636406" name="distRG" id="radio_2" /> </span></td> <td class="selected">Company 2</td> <td class="siteId">2345</td> <td class="siteName">Second Company Name</td> </tr> <tr> <td><input type="radio" value="636406" name="distRG" id="radio_3" /></td> <td class="selected">Company 3</td> <td class="siteId">3456</td> <td class="siteName">Third Company Name</td> </tr> <tr> <td><input type="radio" value="213584" name="distRG" id="radio_4" /></td> <td class="selected">Company 4</td> <td class="siteId">4567</td> <td class="siteName">Fourth Company Name</td> </tr></tbody></table> jQuery script $("input[name=distRG]").click(function() { var owner = $(this).parent().siblings('td.selected').text(); var siteId = $(this).parent().siblings('td.siteId').text(); var siteName = $(this).parent().siblings('td.siteName').text(); alert(owner); alert(siteId); alert(siteName); });

    Read the article

  • ssrs: one static row matrix, multiple columns will not filter out nulls

    - by pbarton99
    Using a ssrs 2005 matrix client side. I want to list the multiple addresses of one person, hence one row, multiple columns. The Column field is =Fields!StreetName.Value. The data details field is =First(Fields!StreetPrefix.Value) & " " & First(Fields!StreetName.Value). The datasource has a row for each address; however, some rows will have nulls since the datasource is composed of outer joins. The column grouping works, but the first column is always empty, (first 2 rows of datasource are null) addresses appear only after the empty column. I want to filter out nulls on the matrix, but its like the filter is ignored. I have also tried having the dataset return an empty string for a null streetname and setting the filter to =Fields!StreetName.Value != ="" but no difference. What am I missing?

    Read the article

  • Check if row already exists, if so tell the referenced table the id

    - by flhe
    Let's assume I have a table magazine: CREATE TABLE magazine ( magazine_id integer NOT NULL DEFAULT nextval(('public.magazine_magazine_id_seq'::text)::regclass), longname character varying(1000), shortname character varying(200), issn character varying(9), CONSTRAINT pk_magazine PRIMARY KEY (magazine_id) ); And another table issue: CREATE TABLE issue ( issue_id integer NOT NULL DEFAULT nextval(('public.issue_issue_id_seq'::text)::regclass), number integer, year integer, volume integer, fk_magazine_id integer, CONSTRAINT pk_issue PRIMARY KEY (issue_id), CONSTRAINT fk_magazine_id FOREIGN KEY (fk_magazine_id) REFERENCES magazine (magazine_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ); Current INSERTS: INSERT INTO magazine (longname,shotname,issn) VALUES ('a long name','ee','1111-2222'); INSERT INTO issue (fk_magazine_id,number,year,volume) VALUES (currval('magazine_magazine_id_seq'),'8','1982','6'); Now a row should only be inserted into 'magazine', if it does not already exist. However if it exists, the table 'issue' needs to get the 'magazine_id' of the row that already exists in order to establish the reference. How can i do this? Thx in advance!

    Read the article

  • How can I (both) create a row and accessing that row in the same 'Stored Procedure'?

    - by Richard77
    Hello, I'd like to get the value of the id column for an object just after I've created it. But I don't want to run another query for that. My book for beginner (SQL Server 2008 for Dummies) says that there are 2 tables (inserted and deleted) that hold the last row(s) that have been inserted, updated, or deleted. Unfortunately, only Triggers (says the book) can access those tables. But, if I use triggers, they will go off each time I "insert" a row even when I don't need them that functionality. Can I obtain the same effect with a Store Procedure (without having to run a separate query?) This is what I'm trying to do CREATE PROCEDURE myProcedure DECLARE @OrganizationName @ColumnID OUTPUT AS INSERT INTO Organization (OrganizationName) VALUES (@OrganizationName) SET @ColumnID = (// Please, I need Help here ...) Thanks for helping

    Read the article

  • how to get the particluar row value from grid using jquery

    - by kumar
    I defined this code in the script <script type="text/javascript"> var RowClick = function(e) { $('#Grid td:first-child').click(function() { var resultArray = $(this).closest('tr').find('td').map(function() { var val = $(this).text(); alert(val); }); }); }; </script> I am calling this RowClick for SingleClick event server side.. something like this.. grid.ClientSideEvents.RowSelect = "RowClick"; Here my intension was to get the perticular row value on row click? but this code which I wrote above its not working for me.. Please can anybody help me out how to get the perticular column eq(0) or eq(1) ? thanks

    Read the article

  • jQuery add/remove row

    - by bocca
    I am trying to setup jQuery rows, with add/remove row functionality. I got started with online tutorial, http://jsbin.com/aciba that works fine. It only has input forms though. We need select to choose from. Now, I made some changes to accept selects as as well as inputs: http://jsbin.com/emata This does not work. Try selecting option 3 in cell 1, and press add "Add". The row added gets default "Cell 1" selected option to 1. What could be the reason?

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >