Dataset Vs. Returning A Datatable

Aug 15, 2010

I have created alot of stored procedures in my application that return the result of a query in a datatable object. I never use a dataset. Why would I ever use a dataset over simply returning the result of a query as a datatable object?

View 3 Replies


Similar Messages:

Returning Multiple Tables To Dataset / How To Join/add Two Datatable

Jan 21, 2011

I need to return datatable to dataset in asp.net application. I have a method which has a return value as datatable.


However I need to send 2-3 datatable instead of one. I dont know how to join/add two datatable and what could be the return type?

View 2 Replies

DataSource Controls :: Use DataTable Instead Of DataSet / Returning One Table?

Apr 9, 2010

I'm returning one table. My understanding is that a DataSet can be made of more than one DataTable. I also understand that I can use either of these to return my one table.

Is it better to use the DataTable when I have one table to return instead of a DataSet? Is there any advantage of not using the DataSet in a situation like this? Is there a disadvantage to using the DataSet when only one table is being returned? Does this even matter?

View 6 Replies

AJAX :: Returning DataSet / Datatable From Webmethod To Javascript

Sep 16, 2010

I have a simple web method written in the code-behind (not a separate asmx) of a test aspx page.

All it does is return a DataTable(or DataSet) both are failing, gives a blank 500 error saying "There was an error processing the request"

If I switch the return variable type to String, it works fine

I think my issue has to do with the version of the System.Web.Extensions, is that the assembly that actually contains the JSON communication implementation?

I've read all kinds of tutorials about how it should be possible to return the DataTable to javascript and then read the properties with javascript syntax.

For some reason it isn't working for me.

My web extensions is imported through my web.config with the following version

<add
assembly="System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

View 5 Replies

How To Copy Data From Datatable To Dataset.datatable

Oct 31, 2010

how to copy data from datatable to table in dataset i ry this but its readonly property

ds.datatable1=newdt.copy

View 1 Replies

WCF / ASMX :: Alternatives To Returning A DataTable From WCF

Dec 7, 2010

I have read a lot of posts describing why it isn't good practice to return heavy objects like DataTable/DataSet to the client from WCF. However, there doesn't seem to be much discussion about the alternatives (or maybe I'm not looking in the right forums).

My problem is this: I've tried to convert my DataReader/DataTable into a List<List<string>>, where List<string> represents the data in each row, but get an error at the point when the data is being sent to the client. A simple List<T> or a one-dimensional array gets returned without any problems. But whenever I try to return a collection of collections, there seems to be an issue. I don't know until runtime what my DataReader would look like as different stored procs are called based on user selection from a web form.

What am I missing here. Is WCF not able to handle collection of collections (I know that multi-dimensional arrays are not supported)?

View 1 Replies

AJAX :: Web Service Returning A DataTable?

Feb 15, 2010

I am using ASP.NET AJAX 3.5

I have a web service that is invoked by the ScriptManager that is attempting to return a DataTable to the receiving javascript.

[Code]....

[Code]....

My service method is called successfully.

[Code]....

[Code]....

View 3 Replies

Returning A Single Row In A Strongly Typed DataSet In C#?

Jun 27, 2010

I have a Strongly typed Dataset TableAdapter in C#, how do I get a single row from it?

View 4 Replies

WCF / ASMX :: Returning A DataTable As List In WCF With WsHttpBinding

Oct 19, 2010

Would it be better in terms of payload, if I return a datatable as a List<DataRow> from a WCF method? I have WsHtppBinding for my WCF. I am expecting the datatable to contain 5,000 to 10,000 records.

Also, how can I test the difference in payload sizes when returning a DataTable Vs List<DataRow>?

View 2 Replies

DataSource Controls :: Returning Multiple Tables Into A DataSet

Apr 10, 2010

How to return multiple tables to dataset. My code is

string q = "select job_title,primary_skill,description from T12_Company_AddRequirement where job_code='JB1';select count(p_status) from T12_SentDetails where job_code='JB1'and p_status='Technical 1';select count(p_status) from T12_SentDetails where job_code='JB1'and
p_status='Technical 2';select count(p_status) from T12_SentDetails where job_code='JB1'and p_status='Technical 3';select count(p_status) from T12_SentDetails where job_code='JB1'and p_status='HR'";
SqlConnection con=new SqlConnection(s);
SqlDataAdapter da = new SqlDataAdapter(q, con);
DataSet ds = new DataSet();
da.Fill(ds);
Grid_description.DataSource = ds.Tables[0];
Grid_description.DataSource = ds.Tables[1];
Grid_description.DataSource = ds.Tables[2];
Grid_description.DataSource = ds.Tables[3];
Grid_description.DataSource = ds.Tables[4];
Grid_description.DataBind();

This code is returning error.

View 9 Replies

Returning Single - Row Queries Using DataAdapter - DataTable And DataRow

Feb 10, 2011

I'm fairly new to ASP.NET and am working through a tutorial that demonstrates the use of DataAdapter, DataTable, and DataRow classes. The tutorial focuses on binding returned DataTables to GridView objects - I'm having trouble understanding what to do to extract one row for display. I've found I can do the following:

ProductsTableAdapter productsAdapter = new ProductsTableAdapter();
Northwind.ProductsTable productsTable = productsAdapter.GetSingleByProductID(searchID)
Northwind.ProductsRow productRow = (Northwind.ProductsRow)productsTable.Rows[0];

A ProductsTable should be able to return its own ProductRows w/o resorting to a cast, no? Can't find how to do it otherwise. I'm thinking how to go about creating a form where the user will only ever be working on one record at a time. Wouldn't it make sense for the DAL to return a ProductsRow instead of a ProductsTable?

View 1 Replies

Forms Data Controls :: How To Use A DropDownList With A DataSource Returning A Datatable

Jun 10, 2010

I am trying to use a datasource with a dropdownlist. Eventually, my data source method to call a stored procedure and load the datatable is returns, but for now, I am just creating the datatable manually. I need each item to have two attributes, the text, whixh the user will see in the DDL, and the value that the program will retrieve from and store back to the file.

It is partly working in that the DDL has 3 items, however the text for each item reads "System.Data.DataRowView"

I have to be close, but I can't figure out what I am doing wrong.

[Code]....

View 8 Replies

C# - Use Dataset Or Datatable?

Dec 17, 2010

If I need to fetch one whole column from Table1 in the DB, should I fetch it using datatable or dataset? I can do both ways. I mean ok I should use Datatable. Why is that? What would happen if I use Dataset? ok that's what I wanted to know. So there's memory issue. I mean whatever I use be it Datatable or Dataset, both will be fetching only ONE column frommy table in DB. How is Dateset's gonna use more memory then?

View 3 Replies

ADO.NET :: Number Of Datatable In One Dataset Can Contain?

Aug 6, 2010

i have one question for my project. i am fetching all users data in one dataset, but each user will be in unique datatable to avoid no. of database connection i will fetch data in one single transaction no. of user are more than 10000 ..is it practical to store more than 10000 tables in one single dataset what will be then performance issue for the same, it will be the diffrent application for my project to generate this much of data. how many no. of table one dataset can contain in visual studio 2008 with 3.5 framework?

View 2 Replies

ADO.NET :: Delete A Row In Datatable Using Linq To Dataset

Aug 31, 2010

how can i delete a row in datatable using linq to dataset?

I have a dataset in my project, need to delete some rows filtered by ID

how can i do?

View 5 Replies

Sort The Datatable After Binding The Dataset?

Apr 16, 2010

How to Sort The datatable in asp.net. after binding the dataset values i have stored into one table how can i sort the values of the dataset in asp.net with C#

View 4 Replies

How To Populate Google Charts Using Dataset / Datatable

Feb 24, 2011

How to populate google charts using ASP.NET Dataset/Datatable

View 1 Replies

C# - How To Use SqlDataSource For Filling Combobox As Well As Datatable Or Dataset

Apr 30, 2010

I am trying to fetch a column value from a datasource when some value is selected from a dropdownlist on its change event.

[Code]....

Here I want to fetch any other column's value that is not binded to a ddlCityName from sqldatasource.

I have four columns in datasource i.e. name, id, address, phno.

I want to fetch an address of a person who selects some value from ddl.

View 1 Replies

ADO.NET :: How To Create A Datatable With 2 Datatables In Dataset Programmatically

Apr 1, 2011

I have 2 views in sql server and I create a dataset with those 2 views as datatables. Now I need to create a datatable and programmatically fill it with the other 2 datatables. Take the 2 datatable and create a third one in the dataset not create a third view in sql server.

View 2 Replies

Security :: Assigning Result To Dataset Or Datatable?

Jan 1, 2010

I am using membership functions like

Roles.GetAllRoles()

or

Membership.FindUsersByName();

I want to assign the result of these fucntions to a dataset or datatable and not directly to a GridView.

View 3 Replies

Data Controls :: Get Top N Rows From Datatable Or DataSet In C#?

Jan 19, 2012

I have a datatable with 50+ rows I want to get the Top 10 rows and display.

View 1 Replies

VS 2010 - Return Data Reader Or Dataset / Datatable

Dec 18, 2010

Had a datareader question.

[Code].......

Return myDataReader I have a function which is retuning a datareader to various sections of my website which is then being bound to dropdown lists, gridviews, etc. Normally the last line in a function when is the data reader and connection getting closed? Is it best practive to return a data reader or a dataset/datatable (or something even better than these two)?

View 8 Replies

Web Forms :: Adding Datarows To Existing Datatable In Dataset?

Feb 5, 2010

I need to add rows to an existing (maybe) datatable in a dataset that combines the IIS6 index search with my own sql table. I keep getting object reference errors.

[Code]....

View 4 Replies

DataSource Controls :: Is Datatable Data Store In Dataset

Apr 24, 2010

is datable data store in asp.net dataset.. ?

View 1 Replies

DataSource Controls :: Datatable/Dataset Total Memory?

Mar 16, 2011

make a query which will give me 200,000 results and bind it to the datatable but the error will pop out saying out of memory or request timed out.Can datatable/dataset handle these records or is my current server's hardware needs a little upgrade?Actually we are gettings millions of data and i dont have any idea how to solve this one? Have you worked on this kind of data? Do you have any idea on how to send my command from server A to server B while server A also processing request and will not wait for server B's result and server B will just update the records in my database, i think this can solve my problem if doing it in parallel.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved