{"id":269,"date":"2008-12-16T03:55:00","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.yazilimmutfagi.com\/?p=269"},"modified":"2008-12-16T03:55:00","modified_gmt":"1970-01-01T00:00:00","slug":"dataset-kavrami-i","status":"publish","type":"post","link":"https:\/\/www.yazilimmutfagi.com\/index.php\/2008\/12\/16\/dataset-kavrami-i\/","title":{"rendered":"Dataset Kavrami &#8211; I"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"font-size: 11pt; color: black; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Dataset; herhangi bir veri kaynagini kendisi<span style=\"\">&nbsp; <\/span>ile iliskilendirmemizi saglayan, veri k&uuml;melerini<span style=\"\">&nbsp; <\/span>3 boyutlu matrix sistemi altinda<span style=\"\">&nbsp; <\/span>temsil eden yapilardir. Tablolar bir eksene; tablo satirlari bir eksene;&nbsp;tablo s&uuml;t&uuml;nlari&nbsp;bir eksene oturtularak kompleks ve yararli yapilar kullanima hazir hale getirilir. Datasetlerde birden &ccedil;ok Datatable bulunabilir. Datatablelar; DataRow DataColumn siniflari kullanilarak olusturulur. Olusturulan bu yapilarda veri ekleme silme g&uuml;ncelleme&nbsp; ve se&ccedil;me islemleri yapilabilir.<\/span><\/p>\n<p style=\"text-align: justify;\"><a href='www.yazilimmutfagi.com'>.<\/a><\/p>\n<p><span style=\"font-size: 11pt; color: black; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Asagida basit bir dataset olustuma &ouml;rnegi bulunmaktadir. Bu datasete &ouml;rnek bir tane datatable eklenmistir. Datasete birden fazla datatableda eklenebilir.<\/span><\/p>\n<p style=\"line-height: 115%;\"><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">using<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> System.Data;<\/span><\/p>\n<p style=\"line-height: 115%;\"><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">public<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> <\/span><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">void<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> Yenidataset() {<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/*Yeni bir Dataset olusturuyoruz *\/<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: teal; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">DataSet<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> ds = <\/span><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">new<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> <\/span><span style=\"font-size: 10pt; color: teal; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">DataSet<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">();<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/*Yeni bir tablo olusturuyoruz *\/<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: teal; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">DataTable<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> dt = <\/span><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">new<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> <\/span><span style=\"font-size: 10pt; color: teal; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">DataTable<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">(<\/span><span style=\"font-size: 10pt; color: maroon; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&quot;YeniTablo&quot;<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">);<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/*Satir ve s&uuml;t&uuml;n degiskenlerimiz i&ccedil;in tanimla yapiyoruz *\/<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: teal; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">DataColumn<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> cl;<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: teal; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">DataRow<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> rw;<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&nbsp;<\/span><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/* Tablomuza iki yeni tipleri ve adlari belirtilmis iki s&uuml;t&uuml;n ekliyoruz. *\/<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">cl = <\/span><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">new<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> <\/span><span style=\"font-size: 10pt; color: teal; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">DataColumn<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">();<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">cl.ColumnName = <\/span><span style=\"font-size: 10pt; color: maroon; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&quot;Ad&quot;<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">;<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">cl.DataType = System.<\/span><span style=\"font-size: 10pt; color: teal; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">Type<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">.GetType(<\/span><span style=\"font-size: 10pt; color: maroon; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&quot;System.String&quot;<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">);<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">dt.Columns.Add(cl);<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">cl = <\/span><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">new<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> <\/span><span style=\"font-size: 10pt; color: teal; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">DataColumn<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">();<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">cl.ColumnName = <\/span><span style=\"font-size: 10pt; color: maroon; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&quot;Soyad&quot;<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">;<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">cl.DataType = System.<\/span><span style=\"font-size: 10pt; color: teal; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">Type<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">.GetType(<\/span><span style=\"font-size: 10pt; color: maroon; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&quot;System.String&quot;<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">);<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">dt.Columns.Add(cl); <\/span><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/\/tablomuza String tipinde s&uuml;t&uuml;n ekliyoruz<\/span><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&nbsp;<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/* Olusturlan tabloya ardisil satir ekliyoruz*\/<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">for<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> (<\/span><span style=\"font-size: 10pt; color: blue; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">int<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> i = 0; i &lt;= 4; i++)<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">{<\/span><\/p>\n<p style=\"padding-left: 60px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">rw = dt.NewRow();<\/span><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/\/ yeni bir satir a&ccedil;iyoruz.<\/span><\/p>\n<p style=\"padding-left: 60px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">rw[<\/span><span style=\"font-size: 10pt; color: maroon; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&quot;Ad&quot;<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">] = <\/span><span style=\"font-size: 10pt; color: maroon; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&quot;Ad&quot;<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> + i.ToString();<\/span><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/\/&quot;Ad&quot; s&uuml;t&uuml;muma veri y&uuml;klemesi yapiyoruz<\/span><\/p>\n<p style=\"padding-left: 60px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">rw[<\/span><span style=\"font-size: 10pt; color: maroon; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&quot;Soyad&quot;<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">] = <\/span><span style=\"font-size: 10pt; color: maroon; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&quot;Soyad&quot;<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\"> + i.ToString();<\/span><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/\/&quot;Soyad&quot; s&uuml;t&uuml;muma veri y&uuml;klemesi yapiyoruz<\/span><\/p>\n<p style=\"padding-left: 60px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">dt.Rows.Add(rw);<\/span><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/\/tablomuza yeni a&ccedil;tigimiz satiri ekliyoruz..<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">}<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/*Olusturdugumuz tabloyu Datasetimize ekliyoruz*\/<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">ds.Tables.Add(dt);<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&nbsp;<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">GridView1.DataSource = ds.Tables[<\/span><span style=\"font-size: 10pt; color: maroon; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&quot;YeniTablo&quot;<\/span><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">];<\/span><span style=\"font-size: 10pt; color: green; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">\/\/Gridview mize veri tablomuzu g&ouml;steriyoruz<\/span><\/p>\n<p style=\"padding-left: 30px; line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">GridView1.DataBind(); <\/span><\/p>\n<p style=\"line-height: 115%;\"><span style=\"font-size: 10pt; color: black; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;\">&nbsp;}<\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>Dinamik olarak dataset, datatable olusturulmasi ve g&#246;r&#252;nt&#252;lenmesi<\/p>\n","protected":false},"author":554,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[407],"tags":[6210,5544,5343,4907,4611,4170,5848,5972,6139],"_links":{"self":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/269"}],"collection":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/users\/554"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/comments?post=269"}],"version-history":[{"count":0,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/269\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/media?parent=269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/categories?post=269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/tags?post=269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}