datatable

Using Sql 'In' Operator within .NET 2.0 DataTable Filter expression.

Does the .NET 2.0 Framework DataTable filterexperssion property support the SQL "IN" operator? If you have a solution to this please provide example code. Thank you. ...

NHibernate ICriteria and Expected Types

Is there any way to get at the types of objects I would expect NHibernate to place in an ICriteria object as the result of running a query? In this code sample, I can get at the types of my objects if they aren't null, but what if they are? Also, depending on the data returned, one "row" (object[]) may have null fields in places where ot...

Group rows on DataTable in ADO.Net - group by

I have the exact same question as this one: http://stackoverflow.com/questions/831519/aggregate-functions-in-ado-net-with-group-by-functionality/1084230 however the proposed solution was for .net 3.5 but I am using .Net 2.0 so I cant the LINQ query. To summarize: I have a DataSet and I want to create a view from it and apply something s...

JSF, how to get datatable's first row?

Hi, I have a datatable where I get its values from a table called Items that is in my database.I want to show first five datas from the Items table but also want to show first row's picture. I get all the pictures from a folder named upload. I keep just the name of the pictures in the database. Could someone please write the code that ...

need help with database creation

Hi! I need to develop a database for A level students, and I'm having problems categorising their subjects. They have 13 subjects altogether and each student can choose as many subjects and any combination from 13 subjects as he likes. How can I cope with this problem? How can I create a database for keeping the record of each student...

How do You Get a Specific Value From a System.Data.DataTable Object?

I'm a low-level algorithm programmer, and databases are not really my thing - so this'll be a n00b question if ever there was one. I'm running a simple SELECT query through our development team's DAO. The DAO returns a System.Data.DataTable object containing the results of the query. This is all working fine so far. The problem I h...

DataAdapter.Fill() behavior for row deleted at the data source

I'm using the DataSet/DataTable/DataAdapter architecture to mediate between the database and my model objects, which have their own backing (they aren't backed by a DataRow). I've got a DataAdapter with AcceptChangesDuringFill = False, AcceptChangesDuringUpdate = False, and FillLoadOption = OverwriteChanges. Here's my understanding of th...

Loading DataTable into SP

I have SQL Server 2008 and VS 2008 Pro. And I am coding in C#. I accept a text input file from the customer and I parse this data into a DataTable in my C# aspx.cs file. I know that this is working correctly. So I populated the DataTable. But now how do I load this data into an SP? Like can I use a dynamic table parameter? Or shou...

How to remove the edit line at the bottom of a DataGridView?

I am using a DataGridView in a UI because of how easy it is to bind to a source like a DataTable. The only problem i have is that it is intended to be read only and therefore i don't need the edit line that always shows up at the bottom of the grid rows. I have looked around and can't see a way to turn it off. Dose anyone know of a way t...

How to convert a DataTable to a string in C#?

Hi there, I'm using Visual Studio 2005 and have a DataTable with two columns and some rows that I want to output to the console. I hoped there would be something like: DataTable results = MyMethod.GetResults(); Console.WriteLine (results.ToString()); What's the best way (i.e. least amount of coding from me) to convert a simple DataTa...

Paginated + Ajax table in Django

I simply want to show off a model in a table that is paginated and sortable on the various fields. Bonus points if the pagination and sorting doesn't cause a page reload. Double bonus points if the pagination is done with infinite scrolling. I'm sure everyone here has written and rewritten this functionality. Is there a simple middlew...

Do ADO.Net DataTables have indexes?

Hello everyone, I am using VSTS 2008 + C# + .Net 3.5 + SQL Server 2008 + ADO.Net. If I load a table from a database by using a DataTable of ADO.Net, and in the database table, I defined a couple of indexes on the table. My question is, whether on the ADO.Net DataTable, there is related index (the same as the indexes I created on physica...

How to work with dataTable?

My given problem is follow: I have an object with x coloums and every coloum has y values. I must now bring this to excel. I found an snippet in which a datatable can be exported easily. So I will bring my object to a datatable. How can I do this? Language is C#.´Net ...

Why does my DataTable always returns "true/false" but never a string?

I'm trying to use a DataTable, filled by a MySqlDataAdapter, which contains a list of comments for a blog entry. For some reasons, if the field "anonymous" is set to "1", the username field is empty and should be replaced with a specified string. The problem I have is that whenever I try to get the value of the field, I get either "true...

gathering all data which user has entered in a datatable, now wanna to save them in DB. How?

Hi I have a webform which has a gridview. the gridview (gridView1) has been bound to a datatable (dataTable1). when user creates a new row, I add that new row to the dataTable1. Also, when he updates a specific row within gridView1, I update dataTable1. Now, I want to save all rows within dataTable1 in DB. How? ...

What are the best-practices for automated testing of a WCF that returns a datatable

I am trying to automated the testing of a reporting website. I need to verify that the content of a datagridview is as expected for the reports. The datagridview will display column names and datarow results returned from an SQL database. I am thinking that the meat of the application which is stable is behind a WCF facade, so I should ...

fulltext search for dataset

I'd like to implement fulltext search for a datatable ? are there any .net libraries which support indexing/searching on the fly ? ...

How do you get sorted data back from a DataBound gridview?

Hey all, Here's the scenario I am trying to achieve. I have a DataGrid control on my form. I am using XCeed Data Grid for .Net as my control of choice. I am driving the DataGrid via a DataTable as its DataSource. The Grid allows me to sort the data by column which is very cool. That same Data is also being plotted on a Chart control. Th...

Is there a way to bind a DataTable to an actual Table in a data base?

Is there any way to bind a DataTable object to an actual table in my database? Right now I perform a query and fill the DataTable with the result. It would be really cool if I could just DataTable.(Save/Update) with out having to write additional code! Is such a thing or a similar solution possible? ...

Ignoring XHTML markup when editing with jEditable

I am using jEditable to edit a table inline, the third column of which contains email addresses. This column contains plaintext, but it is converted to mailto: links using jQuery . Currently, when jEditable is activated, the user sees this: <a href="mailto:[email protected]">[email protected]</a> How do I force jEditable to treat th...