Search Results

Search found 1168 results on 47 pages for 'datatable'.

Page 16/47 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Combine multiple dataset columns to one dataset

    - by Matt
    I have multiple datasets that I would like to combine into one. There is a common ID field that can be associated to each row. Calling Merge on the dataset will add additional rows to the dataset, but I would like to combine the additional columns. There are too many fields to do this in one query and therefore would make it unmanageable. Each individual query would be able to handle ordering to ensure the data is placed in the correct row. For Example lets say I have two queries resulting in two datasets: SELECT ID, colA, colB SELECT colC, colD The resulting dataset would look like ID colA colB colC colD 1 a b c d 2 e f g h Any ideas on ways to accomplish this?

    Read the article

  • Combine two datatables in JSF 1.1

    - by johnbritto
    I have two datatables. One is to display names. Another contains three <h:selectOneMenu>. I want combine those two datatables. I don't know how to do it? Expected result: ----------------------------------------------- Datatable1 Datatable2 ----------------------------------------------- Lic Date month year Premium Date month year Test Date month year

    Read the article

  • String.IsNullOrEmpty and Datarow.IsXnull

    - by Jon
    How can I improve this code? What has made this long winded is the fact that I can't use string.IsNullOrEmpty on a data row and instead I have to use a dr.IsHOUSENUMBERNull method AND the string.IsNullOrEmpty to check if it is empty. Why is this? The column in the database is sometimes empty and sometimes NULL. I'm sure this can be written better: If Not dr.IsHOUSENUMBERNull Then If Not String.IsNullOrEmpty(dr.HOUSENUMBER) Then sbAddress.AppendLine(dr.HOUSENUMBER + " " + dr.ADDRESS1) Else sbAddress.AppendLine(dr.ADDRESS1) End If Else sbAddress.AppendLine(dr.ADDRESS1) End If

    Read the article

  • GrailsUI (YUI) data table hover event

    - by bsreekanth
    Hello, How to make the data table rows change color as hover over it. The YUI example is here link text I tried something like <script> GRAILSUI.myDataTable.subscribe("rowMouseoverEvent", GRAILSUI.myDataTable.onEventHighlightRow); GRAILSUI.myDataTable.subscribe("rowMouseoutEvent", GRAILSUI.myDataTable.onEventUnhighlightRow); GRAILSUI.myDataTable.subscribe("rowClickEvent", GRAILSUI.myDataTable.onEventSelectRow); </script> thanks,

    Read the article

  • How to populate List<string> with Datarow values from single columns...

    - by James
    Hi, I'm still learning (baby steps). Messing about with a function and hoping to find a tidier way to deal with my datatables. For the more commonly used tables throughout the life of the program, I'll dump them to datatables and query those instead. What I'm hoping to do is query the datatables for say column x = "this", and convert the values of column "y" directly to a List to return to the caller: private List<string> LookupColumnY(string hex) { List<string> stringlist = new List<string>(); DataRow[] rows = tblDataTable.Select("Columnx = '" + hex + "'", "Columny ASC"); foreach (DataRow row in rows) { stringlist.Add(row["Columny"].ToString()); } return stringlist; } Anyone know a slightly simpler method? I guess this is easy enough, but I'm wondering if I do enough of these if iterating via foreach loop won't be a performance hit. TIA!

    Read the article

  • mysql medium int vs. int performance?

    - by aviv
    Hi, I have a simple users table, i guess the maximum users i am going to have is 300,000. Currently i am using: CREATE TABLE users ( id INT UNSIGEND AUTOINCEREMENT PRIMARY KEY, .... Of course i have many other tables that the users(id) is a FOREIGN KEY in them. I read that since the id is not going to use the full maximum of INT it is better to use: MEDIUMINT and it will give better performance. Is it true? (I am using mysql on Windows Server 2008) Thanks.

    Read the article

  • Problem in creating different types of columns in a Winforms gridview

    - by Royson
    My windows form application has a grid view control with filename as a default column. User should create a column of following types Text, Number, Currency, Combo Box, Check Box, Radio Button ,Date time type (should display DateTimePicker control) and Hyper Link type. After that i want to pass all rows to next screen for further processing. We can create a column of these types in a grid view but how can i store it in a data table so that i can pass it to next screen. Or should i create a column in a data table and then assign data table to grid view by gridview.DataSource = dt; but can we create a these types of columns in a data table.

    Read the article

  • C# : Filtering data of data table using select method

    - by Royson
    I have data table containing one column as FilePath. FilePath D:\New folder\link.txt D:\New folder\SharepointMigration(Work Schedule).xls D:\New folder\my2\link.txt D:\New folder\my2\SharepointMigration(Work Schedule).xls D:\New folder\my2\my3\New Text Document.txt D:\New folder\Try.txt I am filtering my data table by DataRow[] dtRow = dataTable_FilesWithMetaData.Select("FilePath Like '" + sourcePath + "%'"); But it gives me all files and subfolder files. But i want only files not subfolders. How to write such type of filter expression..??

    Read the article

  • How to achieve multiple grids like the SQL server Results pane

    - by Skun
    Hi guys ! I'm having problems with my project once again :( The front end is C# I need to support multiline querying like MS SQL server and when these queries are executed, naturally there are going to be multiple result sets. Getting the datatables respective to the results is not a problem, but how do i make it appear like its done in MS SQL server. One result set below the other and with a scroll bar? Should i bind it to a datagrid? If so how can i bind multiple tables to a datagrid ? and will it generate the scrollbars and the columns automatically? If i am not clear, please let me know and i'll try to be more clearer. ps: If anyone knows how this can be done with the XtraGridControl in devexpress that would be awesome ! :D

    Read the article

  • Constructing T-SQL WHERE condition at runtime

    - by Nickson
    I would like to implement a search function where a user passes all the arguments to the "WHERE" clause at runtime. For example in query below, SELECT Col1, Col2, Col3, Col4 FROM MyTable WHERE Col2 = John 1.Now what i want is to give the user a dropdownlist of columnns such that the user selects a column to search by at runtime Also instead of precoding Col2 = John, i want the user to choose their own operator at runtime(such as choosing between =, <, <, <, LIKE, IN) i basically want to contruct a query like SELECT Col1, Col2, Col3, Col4 FROM MyTable WHERE (@FieldToSearchBy e.g Col3, @OperatorToUserInSearach e.g LIKE, @ValueToSearch e.g John) I want to pass @FieldToSearchBy, @OperatorToUserInSearach, @ValueToSearch) as user specified parameters at runtime I want to do this with a TableAdpter like in this example http://www.codeproject.com/KB/database/TableAdapter.aspx

    Read the article

  • Hierarchical data table for JSF2 and RichFaces

    - by Iravanchi
    I'm using RichFaces on my JSF2 application, and I need a way to have something like a tree-column or tree-table. As far as I know, there's no support for such thing in RichFaces. Something's mentioned for RichFaces 4.0, but the priority of this in their plan isn't promising at all, and I don't think that it's going to be included in 4.0. I know there's a tree table available in IceFaces, but I'd rather not add another library to avoid conflicts and learning curve and ... So, I'm looking for the simplest way that I can achieve the same results with minimum efforts, maybe using sub-tables in RichFaces? Any ideas would be appreciated.

    Read the article

  • How can i get all TD data upon clicking on a TR with Jquery

    - by KillerFish
    Hi friends, I am having a table with multiple rows and i want to get all the TD data after clicking on a particular ROW. My Table is <table> <tr class="person"> <td class="id">1900</td> <td class="name">John</td> <td class="gender">Male</td> </tr> <tr class="person"> <td class="id">2000</td> <td class="name">Pitt</td> <td class="gender">Female</td> </tr> </table> How can i Get id, name, gender after clicking on Row using Jquery. Ex: If i click on John Row i should get 1900, John, Male and same for Pitt also Thank You

    Read the article

  • Reading/Writing DataTables to and from an OleDb Database LINQ

    - by jsmith
    My current project is to take information from an OleDbDatabase and .CSV files and place it all into a larger OleDbDatabase. I have currently read in all the information I need from both .CSV files, and the OleDbDatabase into DataTables.... Where it is getting hairy is writing all of the information back to another OleDbDatabase. Right now my current method is to do something like this: OleDbTransaction myTransaction = null; try { OleDbConnection conn = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Database); conn.Open(); OleDbCommand command = conn.CreateCommand(); string strSQL; command.Transaction = myTransaction; strSQL = "Insert into TABLE " + "(FirstName, LastName) values ('" + FirstName + "', '" + LastName + "')"; command.CommandType = CommandType.Text; command.CommandText = strSQL; command.ExecuteNonQuery(); conn.close(); catch (Exception) { // IF invalid data is entered, rolls back the database myTransaction.Rollback(); } Of course, this is very basic and I'm using an SQL command to commit my transactions to a connection. My problem is I could do this, but I have about 200 fields that need inserted over several tables. I'm willing to do the leg work if that's the only way to go. But I feel like there is an easier method. Is there anything in LINQ that could help me out with this?

    Read the article

  • Crystal Report just have one line ?

    - by Henry
    OpenConnect(); OleDbDataAdapter olda = new OleDbDataAdapter("Select * from RECORD where LIC_PLATE='GE 320'", con); DataSet dataset = new DataSet(); olda.Fill(dataset); cr1.SetDataSource(dataset.Tables[0]); crystalReportViewer1.ReportSource = cr1; crystalReportViewer1.Refresh(); CloseConnect(); I had only one line in my report. How can I solve this problem ? I checked that I had too many records that has LIC_PLATE= GE 320

    Read the article

  • table subtraction challenge

    - by Valentin
    I have a challenge that I haven’t overcome in the last two days using Stored Procedures and SQL 2008. I took several approaches but must fell short. One appraoch very interesting was using a table substraction. It’s really all about table subtraction. I was wondering if you could help me crack this one. Here is the challenge: Two tables 1Testdb y 2Testdb. My first step was to select ID relationships ([2Testdb].Acc_id) on table 2Testdb for one given individual ([2Testdb].Bus_id). Then query table 1Testdb for records not mathcing my original selection from 2Testdb. But other approaches are welcome. Data and Structures: USE [Challengedb] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[1Testdb]( [Acc_id] [uniqueidentifier] NULL [Name] [Varchar(10)] NULL ) ON [PRIMARY] GO CREATE TABLE [dbo].[2Testdb]( [Acc_id] [uniqueidentifier] NULL, [Bus_id] [uniqueidentifier] NULL ) ON [PRIMARY] GO Records on 1Testdb: 34455F60-9474-4521-804E-66DB39A579F3, John C23523F6-2309-4F58-BB3F-EF7486C7AF8B, Pete DC711615-3BE4-4B31-9EF2-B1314185CA62, Dave E3AAB073-2398-476D-828B-92829F686A4C, Adam Records on 2Testdb: (Relationship table, ex. Friend relationships) Record #1: DC711615-3BE4-4B31-9EF2-B1314185CA62, 34455F60-9474-4521-804E-66DB39A579F3 Record #2: E3AAB073-2398-476D-828B-92829F686A4C, 34455F60-9474-4521-804E-66DB39A579F3 Record # 3: DC711615-3BE4-4B31-9EF2-B1314185CA62, E3AAB073-2398-476D-828B-92829F686A4C Record # 4: E3AAB073-2398-476D-828B-92829F686A4C, DC711615-3BE4-4B31-9EF2-B1314185CA62 Challenge: Select from table 1Testdb only those records distinct that may not have a relationship with John [34455F60-9474-4521-804E-66DB39A579F3] on table 2Testdb. Expected result should be (Who does John doesn’t have relationship with?): C23523F6-2309-4F58-BB3F-EF7486C7AF8B, Pete Thank you, Valentin

    Read the article

  • How to change results per page value in datatables

    - by detj
    Datatables has an option to select the number of records shown per page. The default value starts from 10, 25, 50 and 100. How can I change it to start from 5 instead of 10? 10 records is a bit too much and takes a lot of space in my current design. Thanx! http://datatables.net/

    Read the article

  • VS.NET 2008 - Stop Giving me a Table Adapter.......

    - by mdjtlj
    I'm trying to see if there is a way to stop VS.NET 2008 from doing something which is very annoying to me and our particular standards of coding. When you create a blank dataset and then drag over from the server a table (or tables), VS.NET automatically creates a table adapter for that table, puts the connection information into the XML definition of the XSD and also puts a setting on the property to this database. This requires us to delete the table adapter, get rid of the connection info the XSD file and then go delete the local setting which has been added to the project. I know that I could probably leave all of that stuff and not use it, but that just seems wrong and bloated. Any idea on how to turn this off?

    Read the article

  • Can I configure a strongly typed data set to use nullable values?

    - by Dan Tao
    If I have a strongly typed data table with a column for values of type Int32, and this column allows nulls, then I'll get an exception if I do this for a row where the value is null: int value = row.CustomValue; Instead I need to do this: if (!row.IsCustomValueNull()) { int value = row.CustomValue; // do something with this value } Ideally I would like to be able to do this: int? value = row.CustomValue; Of course I could always write my own method, something like GetCustomValueOrNull; but it'd be preferable if the property auto-generated for the column itself simply returned a nullable. Is this possible?

    Read the article

  • Unable to Export contents of Data table (with French formatted Numbers ) to XML

    - by Ananth
    I have a data Table with numbers formatted according to the current regional settings. ie ( in French decimal separators are ',' instead of '.' in English). I need to export it to XML. Numbers in XML needs to be formatted according to the current regional settings.But now numbers in XML are formatted in English.Is there any way to make the number formatting in XML according to current regional settings ( or based on the locale of the Data Table) during the exporting process ?

    Read the article

  • Passing a JavaScript variable to a helper method

    - by Brendan Vogt
    I am using ASP.NET MVC 3 and the YUI library. I created my own helper method to redirect to an edit view by passing in the item's ID from the Model as such: window.location = '@Url.RouteUrl(Url.NewsEdit(@Model.NewsId))'; Now I am busy populating my YUI data table and would like to call my helper method like above, not sure if it is possible because I get the item's ID by JavaScript like: var formatActionLinks = function (oCell, oRecord, oColumn, oData) { var newsId = oRecord.getData('NewsId'); oCell.innerHTML = '<a href="/News/Edit/' + newsId + '">Edit</a>'; };

    Read the article

  • Can I use Linq to project a new typed datarow?

    - by itchi
    I currently have a csv file that I'm parsing with an example from here: http://alexreg.wordpress.com/2009/05/03/strongly-typed-csv-reader-in-c/ I then want to loop the records and insert them using a typed dataset xsd to an Oracle database. It's not that difficult, something like: foreach (var csvItem in csvfile) { DataSet.MYTABLEDataTable DT = new DataSet.MYTABLEDataTable(); DataSet.MYTABLERow row = DT.NewMYTABLERow(); row.FIELD1 = csvItem.FIELD1; row.FIELD2 = csvItem.FIELD2; } I was wondering how I would do something with LINQ projection: var test = from csvItem in csvfile select new MYTABLERow { FIELD1 = csvItem.FIELD1, FIELD2 = csvItem.FIELD2 } But I don't think I can create datarows like this without the use of a rowbuilder, or maybe a better constructor for the datarow?

    Read the article

  • Searching a Better Solution with Delegates

    - by spagetticode
    Hey All, I am a newbie in C# and curious about the better solution of my case. I have a method which gets the DataTable as a parameter and creates a List with MyClass's variables and returns it. public static List<Campaigns> GetCampaignsList(DataTable DataTable) { List<Campaigns> ListCampaigns = new List<Campaigns>(); foreach (DataRow row in DataTable.Rows) { Campaigns Campaign = new Campaigns(); Campaign.CampaignID = Convert.ToInt32(row["CampaignID"]); Campaign.CustomerID = Convert.ToInt32(row["CustomerID"]); Campaign.ClientID = Convert.ToInt32(row["ClientID"]); Campaign.Title = row["Title"].ToString(); Campaign.Subject = row["Subject"].ToString(); Campaign.FromName = row["FromName"].ToString(); Campaign.FromEmail = row["FromEmail"].ToString(); Campaign.ReplyEmail = row["ReplyEmail"].ToString(); Campaign.AddDate = Convert.ToDateTime(row["AddDate"]); Campaign.UniqueRecipients = Convert.ToInt32(row["UniqueRecipients"]); Campaign.ClientReportVisible = Convert.ToBoolean(row["ClientReportVisible"]); Campaign.Status = Convert.ToInt16(row["Status"]); ListCampaigns.Add(Campaign); } return ListCampaigns; } And one of my another DataTable method gets the DataTable from the database with given parameters. Here is the method. public static DataTable GetNewCampaigns() { DataTable dtCampaigns = new DataTable(); Campaigns Campaigns = new Campaigns(); dtCampaigns = Campaigns.SelectStatus(0); return dtCampaigns; } But the problem is that, this GetNewCampaigns method doesnt take parameters but other methods can take parameters. For example when I try to select a campaign with a CampaignID, I have to send CampaignID as parameter. These all Database methods do take return type as DataTable but different number of parameters. public static DataTable GetCampaignDetails(int CampaignID) { DataTable dtCampaigns = new DataTable(); Campaigns Campaigns = new Campaigns(); dtCampaigns = Campaigns.Select(CampaignID); return dtCampaigns; } At the end, I want to pass a Delegate to my first GetCampaignList Method as parameter which will decide which Database method to invoke. I dont want to pass DataTable as parameter as it is newbie programming. Could you pls help me learn some more advance features. I searched over it and got to Func< delegate but could not come up with a solution.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >