Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2011-08-24 : 10:19:20
|
| Can someone explain, where the dataset is stored? I don't mean the data. I understand that the data is stored in their regular tables.What I am trying to understand is this. there is some code that makes the dataset work as it does? If so, where does this get stored? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-24 : 11:48:06
|
| the definition for dataset gets stored in rdl (report definition language). you can right click on a report and select view code for getting it.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2011-08-24 : 12:54:28
|
| Interesting, i am referring to this sort of dataset:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; public partial class _Default : System.Web.UI.Page { SqlCommand cmd; SqlDataAdapter da; DataSetPK ds; protected void Page_Load(object sender, EventArgs e) { SqlConnection cn = new SqlConnection("server=ORDERS;uid=OG;pwd=OG;database=PRO2"); cmd = new SqlCommand("select * from [OG].[TAP_C_ROOM_TABLES]", cn); da = new SqlDataAdapter(cmd); // dsProducts tds = new dsProducts(); ds = new DataSetPK(); da.Fill(ds, ds.TAP_C_ROOM_TABLES.TableName); dgok.DataSource = ds; dgok.DataBind(); } protected void btnInsert_Click(object sender, EventArgs e) { DataRow row = null; // DataSetPK ds = new DataSetPK(); row = ds.TAP_C_ROOM_TABLES.NewTAP_C_ROOM_TABLESRow(); row[0] = "T1"; row[1] = "a"; row[2] = "test"; ds.TAP_C_ROOM_TABLES.BeginInit(); ds.TAP_C_ROOM_TABLES.Rows.Add(row); ds.TAP_C_ROOM_TABLES.EndInit(); ds.TAP_C_ROOM_TABLES.AcceptChanges(); ds.AcceptChanges(); da.Update(ds.TAP_C_ROOM_TABLES); da.Update(ds, ds.TAP_C_ROOM_TABLES.TableName); dgok.DataSource = ds; dgok.DataBind(); } protected void btnUpdate_Click(object sender, EventArgs e) { ds.TAP_C_ROOM_TABLES.Rows[0][2]="Care"; ds.TAP_C_ROOM_TABLES.AcceptChanges(); ds.AcceptChanges(); da.Update(ds, ds.TAP_C_ROOM_TABLES.TableName); dgok.DataSource = ds; dgok.DataBind(); } } |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-24 : 13:29:27
|
| oh you were refering to .net dataset. it should be created in memory i guess------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|