Click here to Skip to main content
15,892,517 members
Everything / Dataset

Dataset

dataset

Great Reads

by Massimo Fabiano
I know that "returning DataSets from WebServices is the spawn of Satan" but...
by Daniel Carvalho Liedke
Project to generate Excel Spreadsheet from DataSet with auto size (AutoFit) columns, auto-filter, alternating light blue background color with Open XML using ASP.NET MVC
by Mr.PoorEnglish
what is "typed" on typed Dataset, and how to use it
by ASP.NET Community
Confused how to use DataSet and How to use DataReader?I am trying to give some of basic understanding about and differences between DataReader

Latest Articles

by Alaa Ben Fatma
In this article, we will walk through the basic concepts of de/serialization and how to create a very basic de/serializer.
by Daniel Carvalho Liedke
Project to generate Excel Spreadsheet from DataSet with auto size (AutoFit) columns, auto-filter, alternating light blue background color with Open XML using ASP.NET MVC
by yuvalsol
Print DataTable, DataView, DataSet, DataRow[] to Console, StringBuilder or Stream
by Mehedi Shams
Create a data dictionary for your database tables

All Articles

Sort by Updated

Dataset 

25 May 2018 by #realJSOP
Have you tried json.net? It lets you do this: string json = JsonConvert.SerializeObject(dataSet, Formatting.Indented); Seriously, google is your friend.
27 Sep 2016 by .Net Jim
Entity Framework 6 no longer supports wizard items. You are expected to use NuGet instead, then work entirely manually. Bottom line...used entity framework without the data source. Do in page load or other page event and bind to collection coming back or load collection into Datatable or...
28 Apr 2015 by 01sathish
Hi,I'm calling a Stored Procedure say 'GetUserDetails' which retrieves say 3 rows with 3 columns [3X3] with SqlCommand and this is stored in to a DataSet.Now I wanted to loop through each row from the DataSet and write each row to a separate text file, I mean the final outcome should...
17 Jul 2013 by 12345_abcde
i have a database table containing: SEG,AMK,101427Y,EG3902,EG3902-G1 SEG,AMK,101427Y,EGS650,EGS650-G1 SEG,AMK,103852S,EG3901,EG3901-G1 SEG,AMK,103852S,EG3904,EG3904-G1 SEG,AMK,103852S,EGS104,EGS104-G1 SEG,AMK,103852S,EGS650,EGS650-G1 ...
13 Dec 2012 by 90jeri
HI!i have a data grid view that has as datasource one data table of dataset. when i try to add a new row to datatable sometimes datagridview is not displaying any rows. when it happens, it does it just from the application startup(form shows) i mean that the datagridview does not display...
16 Jan 2013 by __TR__
This is because the default value will be applied only when you don't insert any data into that column.Lets look at the below table. Here FaxNo column has a default constraint with default value set to 0.CREATE TABLE Address( ID INT IDENTITY(1,1), [Name] VARCHAR(100), FaxNo...
30 Jun 2012 by _Amy
Hi,Here is a grate article on grouping header:Group GridView Data[^] http://www.csharpaspnetarticles.com/2008/11/merging-gridview-headers-to-have.htmlhttp://redsouljaz.wordpress.com/2009/06/12/create-multiple-row-group-header-in-gridview-asp-net/Follow the above link..You'll find...
10 Oct 2012 by _Amy
Hi,Write a simple linq query to get the values.As I assumed your DataTable is:1 Amit2 Test13 Test24 Test35 test4And your ID is:int[] id = new int []{ 1, 3, 5 };So your query should be something like this:var query = (from s in dt.AsEnumerable() ...
28 May 2013 by _Amy
You can use Select[^] function to filter your DataTable. See an example:DataRow[] dr1 = dataset.Tables[0].Select("(ColumnName % 2) = 0");DataTable dt1 = dr1.CopyToDataTable();DataRow[] dr2 = dataset.Tables[0].Select("(ColumnName % 2) = 1");DataTable dt2 = dr2.CopyToDataTable();And...
30 Aug 2013 by _Sahar
HiI have a form which its items would save in database.then I read data in another form to display in CrystalReportViewer using Dataset.But when I want to show the form it made an error of " Object reference not set to an instance of an object" , when I remove filling dataTableTableAdapter...
5 Nov 2012 by A N Saraf
I'm writing my Invoicing Application from Scratch and now want to make it more stable.I have a Form for Sale Invoicing, Here are the Tables related to i1. Table Name SP contains master register and invoice information having fields SPId, No, Date, Cust, TotalAmt2. Table Name Items...
8 Nov 2012 by A N Saraf
Use INSERT INTO Query to insert single row in datatable insted of DataAdaptersVisit This Link to know more on INSERT INTO Syntax Click Here
28 May 2013 by Aarti Meswania
filter datatbles before assin to datasource of repeater control DataTable leftContent = dataset.Tables[0]leftContent.DefaultView.RowFilter = "(SrNo % 2) = 0"; DataTable rightContent = dataset.Tables[0]RightContent.DefaultView.RowFilter = "(SrNo % 2) = 1";or DataTable...
25 Aug 2013 by abbaspirmoradi
Dim sqlcommand As String = "UPDATE studentdetails SET student_name=@txt_name , student_branch=@txt_branch ,student_class=@txt_class "Dim com As New SqlCommand(sqlcommand, myConn)com.Parameters.AddWithValue("@txt_name", txt_name.Text)com.Parameters.AddWithValue("@txt_branch",...
15 Jul 2015 by Abcecedarian
I am fetching selected row of a datagridview to textboxes and trying to update the row using dataset created to populate the datagridview.I am NOT finding the row in the dataset even though the value of textbox (corrosponding to the PK column in the table) exists in the table row.What am I...
9 Feb 2015 by Abi Natarajan
please help me to code this in java. i amnot able to map ant colony parameters with matlab.
16 Sep 2012 by Adam David Hill
Try this:gridView.ItemsSource = ds.Tables["Table"].AsEnumerable();
2 Mar 2022 by Adil Liaqat
public List userAvailabilityCheck(createUserModel obj) { SqlConnection dbConnection = new SqlConnection(conntection); SqlCommand cmd = new SqlCommand("select_User", dbConnection); SqlDataAdapter da = new SqlDataAdapter(); ...
6 Jun 2013 by Ahmed Bensaid
Hello,Have a look at : Paging Through a Query Result
3 Jun 2020 by ahmed_sa
I work on c# desktop app I cannot export data to excel sheet with multiple tab meaning multi sheet based on data exist on data table module field I use open XML library Data table data as below : Divide Output Excel File To Multi Tab based...
5 Oct 2012 by ajithk444
Hi all,I have a dataset which binds data to the Gridview in my page. I have check boxes to it. Whe i click a button in my page i need to bind the selected rows in my gridview into another dataset or into another datatable.pls help how to do it.. i have attached my code with this...pls help...
10 Oct 2012 by ajithk444
i have a dataset which has over 50 rows each having a unique id as InvoiceNumbers like Invoivce#121,Invoivce#122 etc.Now i have a string list which has few invoice numbers{Invoivce#121,Invoivce#122,Invoivce#124,Invoivce#125}.Now i need to retrieve all the records from the dataset with invoice...
13 Apr 2018 by Alaa Ben Fatma
In this article, we will walk through the basic concepts of de/serialization and how to create a very basic de/serializer.
16 Jun 2014 by Alex_v_B
In my sample XML the object is "ZB". That "ZB" has two points, "AAD" and "AAG". Both points have coördinates, devided by the "|" character. This is a fixed format, I have to deal with it.Because in our software, we use the data in a dataset. So we convert the XML tot a dataset with the...
12 Nov 2012 by ALHAMDI.OMAN
HiI want to build and design Report using Crystal Report using ASP.net.The big challenge for me is how to store more than one table in dataset.this is the structure for a dataset:i...
28 Dec 2015 by alhmzawey7
For Each rw As DataGridViewRow In dg.Rows Dim i As Integer = dg1.Rows.Add(TryCast(rw.Clone, DataGridView)) For Each cl As DataGridViewCell In rw.Cells dg1.Rows(i).Cells(cl.ColumnIndex).Value = cl.Value Next Next
30 May 2015 by Ali Bagheri Shakib
I written a class named MoneyTextBox that inherits TextBox.Everything is OK but where I'm trying to bind data to the Text property of my MoneyTextBox.In the form which I used to bind data to its controls, even reading data is OK! I mean when the data from bindingSource bound to the form,...
1 Nov 2012 by Ali_100
Hi I have a dataset ,I need to insert a copy of entire row in newly created row when the condition is matched in the dataset.I am having issue in copy the entire row & inserting.
2 Nov 2012 by Ali_100
i thanks for reading the thread, i am using C#.I have 2 datasets,& i have to merge them in the 1st one dataset like aslets say TABLE A has columns nameID LoanID Firstname lastname1 1 abc xhs2 2 ali naeem3 3 ...
30 Jun 2012 by Alok Sharma ji
hi folks,i have a problem with gridview in which data is showing like thistitle headers : person name address city transaction_req other detailsdata: someperson someaddress somecity someprice something.......repeatingnow if the person has come through a group it should show in...
13 May 2013 by Am Gayathri
In my code am getting following error.ORA-06550: line 1, column 7:PLS-00306: wrong number or types of arguments in call to 'SAVE_DATA'ORA-06550: line 1, column 7:PL/SQL: Statement ignoredWhat will be the reason for this?code am using is, List listparamters =...
13 May 2013 by Am Gayathri
The problem is with objDataAccessUtilities.ExecuteDataReader(command); instead of this we have to useobjDataAccessUtilities.ExecuteNonQuery(command);
22 May 2013 by Am Gayathri
My application is developed in vb.net.How can i display a message if my dataset retries no record?please helpi tried if (dataset.table.count >0){}else{ message}end ifbut it doesn't showing message if table has no records.so please share your valuable thoughts
11 Jun 2013 by Am Gayathri
I have created one windows application using VB.net. i wanna export some result in to excel.How can i export data in to excel from a datatable in VB.net? please give me the code.
5 Nov 2013 by Amitava Bag (Kolkata)
Please bind EmpID in textBox_EmpId with the specific datatable within dataset and don't alter the value of this textbox. Let me know whether the problem persist?
5 Nov 2013 by Amitava Bag (Kolkata)
//Alter "btn_FetchName_Click" Event//Alter LinetextBox_EmpName.DataBindings.Add(new Binding("Text", dataSet1.Tables[0], "EmpName", false, DataSourceUpdateMode.OnPropertyChanged));//New LinedataSet1.Tables[0].RowChanged += Form1_RowChanged;//Add New Eventvoid...
21 Aug 2012 by AmitGajjar
Hi,Please check below two links,Dynamic Binding Of RDLC To ReportViewer[^]Bindign Dataset with RDLC[^]this may help you,Thanks-Amit Gajjar
11 Jun 2013 by amnk.info
http://www.aspdotnet-suresh.com/2012/01/crystal-reports-sample-in-aspnet.html[^]http://csharp-guide.blogspot.com/2012/06/crystal-reports-subreport-in-aspnet.html[^]
11 Jun 2013 by amnk.info
http://ramezanpour.net/post/20...
10 May 2021 by Amr Mahmoud 2021
-1 i need to know how can i calculate how much energy in kiloWatt hour (kWh) has Singapore saved per year by recycling, by using this data? waste_type: The type of waste recycled. waste_disposed_of_tonne: The amount of waste that could not be...
9 Apr 2013 by Andre D La O
Hello, i have a report ,its works so fine. made in this way stored procedure , func gets a table the add the table to the reportviwer also have a report.rdlc and a dataset but i have no idea to add a sub-report i use vb.net 2010
31 Aug 2012 by Andrew Alix
Built a CR using following data taken from a database and loaded into a dataset. Below is the code to construct the dataset and set up the report. I put 2 Datagridviews on the form to display the data. Both grids display data, but the report shows nothing. Dim ds As New rptDataSet...
2 Sep 2012 by Andrew Alix
The code in the box is the correct code. I didn't copy the code from my app. I typed it in and did it correct.My datasource is a dataset called rptDataSet with all of the fields defined, but unbound. When I declared the following: Dim ds As New rptDataSet 'DataSet I created using the...
1 Jan 2016 by ANIESH SUNDER
0down votefavorite1 I'M very basic in C# and Crystal reports.. I've Just started to do coding in Crystal Reports using c# windows application.. Actually my concept in crystal Report is to display only one record , from the data base.. For Eg:- Date, Received From, Sum of Amount...
27 Jul 2018 by anjitaa
"The MapReduce sort the intermediate data(between mapper and reducer phase) by key by default. If we want the data should be sort based on value, then we need secondary sorting. There are 2 approaches to fulfill the same. 1. If reducers will get all the value for a particular key and buffer...
9 Apr 2014 by Ankita M
Use strongly type dataset object optioncreate xsd type fileand pass it to crystal report
31 May 2015 by anynameformecodeproject
to solve this problem write your code like this. public override string Text { set { base.Text = value; this.OnTextChanged(EventArgs.Empty); } get { return...
12 Jul 2012 by arcimonti
Hi,I have a problem updating a dataset / database.There is a table "TblPerson" with the name and the "Age". The form consids a datagridview of "TblPerson", a combobox for "IDPerson", a textbox for "Age" and buttons for loading the database, updating the dataset and saving to the...
23 Aug 2012 by arcimonti
I dont't wont to update the database at this point. I just need it in the dataset at first.
18 Nov 2013 by arfeenmushtaq
Hi Guys, im new to using .net; im trying to use c# (vs2010) to make a master detail win form, but the detail foreign key is keep populating as -1kindly share how to resolve this issue Regards,Arfeen
16 Jun 2016 by Arkitec
A quick method of populating ComboBoxes from Enum's with optional resource strings.
17 Jun 2014 by ArunRajendra
You can loop using columns collection.foreach(DataColumn column in table.Columns) { //access each row column by specifying row[column]; }
31 Oct 2013 by arunrk87
Out of no help in Google, I came here to ask this.I have a table named Agent with columns AgentId and AgentName in Sql Server DB. Using Visual Studio 2008(VB.NET), I am developing a windows based app. I have a ComboBox control in a windows form. I need this ComboBox control to be filled with...
20 Nov 2013 by arunrk87
Got it! check the link belowhttp://stackoverflow.com/a/14868976/194276
11 Oct 2013 by ASP.NET Community
Confused how to use DataSet and How to use DataReader?I am trying to give some of basic understanding about and differences between DataReader
11 Oct 2013 by ASP.NET Community
I'm going to expalin how extract data from csv file using c#.First you have to declare two string variables and their properies for store directory
11 Oct 2013 by ASP.NET Community
In this article I will sharing how to bind with GridView control with Database and without database using Data Table.Bind GridView with DatabaseI
11 Oct 2013 by ASP.NET Community
Open SQL Server and open a database (Already created) . On the Storage section find the Full Text Catalog. Right click and create a New
11 Feb 2015 by Aydin Homay
In the software implementing business synchronizing structures/templates of the database entities with Data Access Layer SQL (commands/Transactions) is the most expensive thinks because you need to re-implement when you have change/s in your entities structure's such as Data-type, Name, and etc.
27 Jul 2018 by Bansal himani
How to sort intermediate output based on values in MapReduce ? What I have tried: How to sort intermediate output based on values in MapReduce?
22 May 2013 by Basmeh Awad
If ds.Tables(0).Rows.Count > 0 Then'Do what you want to doelseMessagebox.Show("No Records Found")End If
25 Jun 2016 by bhavikadb
hello,I Have a Table in Database with some columns and when I bind that table to Datagridview using dataset I want a Combobox and CheckBox to some Columns of Dataset and Others are Text/String. Also need to fire Events Of That Components. How can I achieve it?What I have...
1 Jun 2014 by Bhushan Gogia
DataSet ds = new DataSet(); DataTable dt = new DataTable(); ds.Merge(dt);
21 Apr 2015 by Bob@work
It looks like IDCaso may be stored as an integer or other numeric type.Try changing your select statement to not quote the value:str = SELECT * FROM Casos_Tbl WHERE (IDCaso = " & txtIdcaso.Text & ")"
17 Dec 2014 by Brad Joss
Export a System.Data.DataTable/DataSet into a T-SQL script that when run creates a #TEMP table of the same definition filled with data.
21 Aug 2018 by bryandkko
Hello, MySqlConnection conn = new MySqlConnection("SERVER=...."); MySqlDataAdapter ad; DataSet ds = new DataSet(); ds.Tables.Add("111"); ds.Tables.Add("222"); ad = new MySqlDataAdapter("SELECT * FROM 111", conn); ad.Fill(ds.Tables["111"]); datagridview1.DataSource = ds.Tables["111"]; ad =...
26 Oct 2017 by C I'm not Sharp
The problem occurs when I run the page even though I am not getting any errors on .cs. 'Hex Mec' is the first CompanyName from Supplier table with a datatype varchar (even though the error says 'converting the nvarchar value'. I'm trying to Populate One Asp.net Dropdown based on Selection in...
20 Aug 2013 by CAS1224
Hello I'm confused on how to wipe my dataset clean in vb.net. My program is a windows forms application and I'm using the oledbdataadapter and a datagridview. I've been using this to zero out my dataset but it doesn't seem to be working for me. Dataset.clear()
22 Aug 2013 by CAS1224
Hello I seem to be having an issue. I have a dataset (excel) sourced to a datagridview in a windows forms application. I'm hoping to find a way to refresh/update my dataset within the datagridview after making a change to a cell. Let me go through the steps I've taken to try and accomplish this....
7 Sep 2013 by CAS1224
Hello I have a windows forms program in vb.net that uses a datagrid to pull a dataset (excel) and display its contents. Right now I'm having trouble setting up a refresh that will dynamically update the dataset by pressing a button. The only way I think I might do this is to automate Excel to...
4 Jun 2023 by Cesare Cogliandro
Good morning. I'm crushing my head to find a way to simulate the "IN (SELECT" sql clause. I have two tables in a dataset and a relation between them (i. e. Orders and Articles). I neeed to filter orders containing a given article (by Id or by...
25 May 2018 by Chandan KIIT32
I want to serialize multiple DataTables to JSON which are interrelated and it is possible there will be additional table are all set in the mapping table. In this case, I have 4 DataTables. This is my first time using JSON, and I have found it really tricky to find a simple way of doing this....
18 Aug 2014 by chandra sekhar
I have two tables in a dataset and based on one table values i have to modify another table value and display it in the viewbut the thing is Recommendations column is not available in DiagnosisFaultDescription1 it is in RecommendationDetails how can i change that row value?? Unfortunately...
29 Jul 2014 by CHill60
I found this (rather out-dated now) on MSDNImplement a Dataset Join Helper Class[^]Alternative using Linq is discussed here[^]Alternatively you could load the spreadsheet into SQL Importing Data to SQL from Excel[^] and do the join via the Stored ProcedureSorry I can't give much...
1 Aug 2018 by CHill60
As @Richard-MacCutchan has pointed out, this is a Technical Question Forum and your question is somewhat off-topic. However, CodeProject does have a Chinese forum - General Chinese Topics Discussion Boards[^]. Try posting there and see if someone is prepared to help
5 Jan 2020 by Christian Graus
If you're getting the data from a database, use DISTINCT. Otherwise, just create your data source in a list, by using LINQ and Distinct. Enumerable.Distinct Method (System.Linq) | Microsoft Docs[^]
27 Nov 2013 by cigwork
Use a primary and secondary sort field. Primary controlled by "Package" and the secondary by the alphabetic order of the other values.insert into sortTest (name) values('Package')insert into sortTest (name) values('Crime')insert into sortTest (name) values('DIC')insert into...
24 Feb 2017 by cluelessentity
I saw many many articles on this but none helped so far.My ComboBox name is cbPlan. I want to Retrieve PlanName in it's display but want to actually hold it PlanID.Following code displays both Names and IDs. I tried ValueMember, DisplayMember, properties but couldn't get it sorted yet....
4 Aug 2013 by Code-Hunt
crystal-reports-13-0-sql-serve...
6 Aug 2014 by codejet
Your dataset is too big.Datasets are stored in computer memory so i guess yours is using too much memory. Try using a datareader or writing xml and the reading from there. Given the number of lines you are trying to retrieve you should go for connected data access not disconnected.
3 Feb 2014 by CoderPanda
I am assuming Duplicate means the entire row matches with an entire row, not only cells You want to show the message after all the rows are filled, not after each rowI would suggest the following in javascript1. For each row concatenate values of the 3 cells into one string2....
10 Oct 2012 by CodingLover
Maintain two database connection and manage them in a way such that read data from one and insert data to the other. If you have tried something, please show it here. So we can comment on it. :)
8 Jun 2016 by CPallini
You shouldn't delete allocated nodes (you are basically destroying the list at the same time you're creating it).Deallocation of memory should happen only when you need the list no more.
24 Jan 2021 by CPallini
When working with floating point values you usually search for the 'nearest value' match instead of 'equal value' match (there are good reasons for that). In order to search for the 'nearest value' match, a good strategy could be a binary search...
4 May 2014 by César Amorim
I have a dataset which contains the following tables: http://i.stack.imgur.com/fZisY.pngAs you can see it's possible to edit it's values directly (and i prefer it that way), but sometimes i wanna limit its value, for example, if the user attempts to place a number 3, i want the program...
2 May 2014 by DamithSL
render local report as PDF and then you can save like belowWarning[] warnings;string[] streamids;string mimeType;string encoding;string filenameExtension; LocalReport report = new LocalReport();report.ReportPath = @"MyTestReport.rdlc";ReportDataSource rds = new...
28 Sep 2015 by DamithSL
check BoxPlot Chart Type in ASP.Net[^]
17 Jan 2013 by dan!sh
You need to set the DeleteCommand property for the adapter.
25 Nov 2017 by Daniel Carvalho Liedke
Project to generate Excel Spreadsheet from DataSet with auto size (AutoFit) columns, auto-filter, alternating light blue background color with Open XML using ASP.NET MVC
8 May 2014 by Danut D
I have a simple windows form with a datagridview and one csv file with 4 rows, the first being the headers.The csv file looks like this:Name,Age,Phone,StreetDan,23,888765,Street1Daisy,40,556432,Street2Jake,12,876324155,Street3I have read the code to populate the DataGridView1...
15 May 2013 by dapeacenforcement
Hi all,my sqlite media database needs a long time to update (I'm using dataset.update()) in vb.net. I have a master table with 30 columns. This table is filled with the primary keys of the other 29 tables.Each table of the other 29 tables has 2 columns. 1. column with the primary key...
21 Dec 2017 by DataMig
How To: From MS Access create a ODBC Table Link to DataTable inside a DOT NET APP So the DOT NET APP is like a poor mans SQL Server (or Data Server) The Data is in memory and does not need to be persisted or saved Pointers in the right direction would help Many Thanks In Advance m ...
21 Jul 2012 by Dave Kreskowiak
You'll have to write you own SQL statemnet and build the SqlCommand object yourself.The CommandBuilder will NOT build UPDATE query statements from SELECT statements that contains any kind of JOINs.
5 Nov 2012 by Dave Kreskowiak
A little Google goes a long way. Read me[^]
8 Sep 2013 by Dave Kreskowiak
Take the OpenFileDialog code out and put it into a separate method. All the OFD does is show a dialog and return a string containing the filepath picked by the user.If you already have the filepath in a string, pass that to a method that does the job of opening the file and grab the...
7 Jul 2015 by Dave Kreskowiak
No, there isn't.2 words: Code Review.
26 May 2016 by Dave Kreskowiak
You have to iterate over the rows, like using a FOR loop, and append each line to a string variable or StringBuilder (better!) and build the text yourself. There is nothing that's going to do it for you automatically.
21 Dec 2017 by Dave Kreskowiak
You have to create a provider one of the database drivers installed on the system, such as OLEDB, ODBC, or whatever. THIS IS FAR FROM A TRIVIAL TASK!! The documentation on this subject is very sparse. You can find the start of it here[^]. More on a few samples (NONE OF WHICH ARE VB.NET OR C#!)...