Search Results

Search found 3700 results on 148 pages for 'strongly typed dataset'.

Page 9/148 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Design guide-lines for writing a Typed SQL Statement API ?

    - by this. __curious_geek
    Last night I came up to sometihng intersting while designing my new project that brought me to ask this qustion here. My project is supposed to follow Table Gateway pattern using tradional ADO.Net datasets for data access. I don't want to write plain queries in my data-access classes. So I came up with an idea of writing a parser kindaa api that exposes objects and methods to generate queries on the move based on my domain objects. Later I want this api to hook up to my Business objects and provide Typed SQL generator api right on the business object instances. Any idea or references how can I do this ? This seems very wide to start with that I'm compelled take your opinions here. Does there anything already exists that can do this ?

    Read the article

  • MVVM Good Design. DataSet or a RowViewModel

    - by LnDCobra
    I have just started learning MVVM and having a dilemna. If I have a a main ViewModel and inside this model I have a number of datasets. Now should I be creating a new ViewModel for each row inside the dataset? Or expose the DataSet itself as a DependencyProperty? For now the dataset has about 20 rows inside it, and the thought of iterating through each row to create a ViewModel binding to each row.... might not be the best option for performance reasons and memory reasons in the future, like when there are 1000+ rows. Should I still go ahead and create a RowViewModel and iterate through the dataset? And have an ObservableCollection of it or just expose the dataset? Any help would be greatly appreciated.

    Read the article

  • DataSet XML export is empty

    - by Shaine
    I've got in-memory dataset with couple of tables that is populated in code. Data-bound grids on the gui show table contents without a problem. Then I try to export the dataset into XML: ds.WriteXml(fdSave.FileName, XmlWriteMode.WriteSchema); and get empty XML (with couple of lines regarding dataset names but without any tables) If I export table directly I've got all the data but dataset name is obviously wrong: ds.Fields.WriteXml(fdSave.FileName, XmlWriteMode.WriteSchema); What am I missing? Is there any reasonable way to write the whole dataset into file?

    Read the article

  • c# Counter requires 2 button clicks to update

    - by marko.ivanovski.nz
    Hi, I have a problem that has been bugging me all day. In my code I have the following: private int rowCount { get { return (int)ViewState["rowCount"]; } set { ViewState["rowCount"] = value; } } and a button event protected void addRow_Click(object sender, EventArgs e) { rowCount = rowCount + 1; } Then on Page_Load I read that value and create controls accordingly. I understand the button event fires AFTER the Page_Load fires so the value isn't updated until the next postback. Real nightmare. Here's the entire code: protected void Page_Load(object sender, EventArgs e) { string xmlValue = ""; //To read a value from a database if (xmlValue.Length > 0) { if (!Page.IsPostBack) { DataSet ds = XMLToDataSet(xmlValue); Table dimensionsTable = DataSetToTable(ds); tablePanel.Controls.Add(dimensionsTable); DataTable dt = ds.Tables["Dimensions"]; rowCount = dt.Rows.Count; colCount = dt.Columns.Count; } else { tablePanel.Controls.Add(DataSetToTable(DefaultDataSet(rowCount, colCount))); } } else { if (!Page.IsPostBack) { rowCount = 2; colCount = 4; } tablePanel.Controls.Add(DataSetToTable(DefaultDataSet(rowCount, colCount))); } } protected void submit_Click(object sender, EventArgs e) { resultsLabel.Text = Server.HtmlEncode(DataSetToStringXML(TableToDataSet((Table)tablePanel.Controls[0]))); } protected void addColumn_Click(object sender, EventArgs e) { colCount = colCount + 1; } protected void addRow_Click(object sender, EventArgs e) { rowCount = rowCount + 1; } public DataSet TableToDataSet(Table table) { DataSet ds = new DataSet(); DataTable dt = new DataTable("Dimensions"); ds.Tables.Add(dt); //Add headers for (int i = 0; i < table.Rows[0].Cells.Count; i++) { DataColumn col = new DataColumn(); TextBox headerTxtBox = (TextBox)table.Rows[0].Cells[i].Controls[0]; col.ColumnName = headerTxtBox.Text; col.Caption = headerTxtBox.Text; dt.Columns.Add(col); } for (int i = 0; i < table.Rows.Count; i++) { DataRow valueRow = dt.NewRow(); for (int x = 0; x < table.Rows[i].Cells.Count; x++) { TextBox valueTextBox = (TextBox)table.Rows[i].Cells[x].Controls[0]; valueRow[x] = valueTextBox.Text; } dt.Rows.Add(valueRow); } return ds; } public Table DataSetToTable(DataSet ds) { DataTable dt = ds.Tables["Dimensions"]; Table newTable = new Table(); //Add headers TableRow headerRow = new TableRow(); for (int i = 0; i < dt.Columns.Count; i++) { TableCell headerCell = new TableCell(); TextBox headerTxtBox = new TextBox(); headerTxtBox.ID = "HeadersTxtBox" + i.ToString(); headerTxtBox.Font.Bold = true; headerTxtBox.Text = dt.Columns[i].ColumnName; headerCell.Controls.Add(headerTxtBox); headerRow.Cells.Add(headerCell); } newTable.Rows.Add(headerRow); //Add value rows for (int i = 0; i < dt.Rows.Count; i++) { TableRow valueRow = new TableRow(); for (int x = 0; x < dt.Columns.Count; x++) { TableCell valueCell = new TableCell(); TextBox valueTxtBox = new TextBox(); valueTxtBox.ID = "ValueTxtBox" + i.ToString() + i + x + x.ToString(); valueTxtBox.Text = dt.Rows[i][x].ToString(); valueCell.Controls.Add(valueTxtBox); valueRow.Cells.Add(valueCell); } newTable.Rows.Add(valueRow); } return newTable; } public DataSet DefaultDataSet(int rows, int cols) { DataSet ds = new DataSet(); DataTable dt = new DataTable("Dimensions"); ds.Tables.Add(dt); DataColumn nameCol = new DataColumn(); nameCol.Caption = "Name"; nameCol.ColumnName = "Name"; nameCol.DataType = System.Type.GetType("System.String"); dt.Columns.Add(nameCol); DataColumn widthCol = new DataColumn(); widthCol.Caption = "Width"; widthCol.ColumnName = "Width"; widthCol.DataType = System.Type.GetType("System.String"); dt.Columns.Add(widthCol); if (cols > 2) { DataColumn heightCol = new DataColumn(); heightCol.Caption = "Height"; heightCol.ColumnName = "Height"; heightCol.DataType = System.Type.GetType("System.String"); dt.Columns.Add(heightCol); } if (cols > 3) { DataColumn depthCol = new DataColumn(); depthCol.Caption = "Depth"; depthCol.ColumnName = "Depth"; depthCol.DataType = System.Type.GetType("System.String"); dt.Columns.Add(depthCol); } if (cols > 4) { int newColCount = cols - 4; for (int i = 0; i < newColCount; i++) { DataColumn newCol = new DataColumn(); newCol.Caption = "New " + i.ToString(); newCol.ColumnName = "New " + i.ToString(); newCol.DataType = System.Type.GetType("System.String"); dt.Columns.Add(newCol); } } for (int i = 0; i < rows; i++) { DataRow newRow = dt.NewRow(); newRow["Name"] = "Name " + i.ToString(); newRow["Width"] = "Width " + i.ToString(); if (cols > 2) { newRow["Height"] = "Height " + i.ToString(); } if (cols > 3) { newRow["Depth"] = "Depth " + i.ToString(); } dt.Rows.Add(newRow); } return ds; } public DataSet XMLToDataSet(string xml) { StringReader sr = new StringReader(xml); DataSet ds = new DataSet(); ds.ReadXml(sr); return ds; } public string DataSetToStringXML(DataSet ds) { XmlDocument _XMLDoc = new XmlDocument(); _XMLDoc.LoadXml(ds.GetXml()); StringWriter sw = new StringWriter(); XmlTextWriter xw = new XmlTextWriter(sw); XmlDocument xml = _XMLDoc; xml.WriteTo(xw); return sw.ToString(); } private int rowCount { get { return (int)ViewState["rowCount"]; } set { ViewState["rowCount"] = value; } } private int colCount { get { return (int)ViewState["colCount"]; } set { ViewState["colCount"] = value; } } Thanks in advance, Marko

    Read the article

  • Managing Data Prefetching and Dependencies with .NET Typed Datasets

    - by Derek Morrison
    I'm using .NET typed datasets on a project, and I often get into situations where I prefetch data from several tables into a dataset and then pass that dataset to several methods for processing. It seems cleaner to let each method decide exactly which data it needs and then load the data itself. However, several of the methods work with the same data, and I want the performance benefit of loading data in the beginning only once. My problem is that I don't know of a good way or pattern to use for managing dependencies (I want to be sure I load all the data that I'm going to need for each class/method that will use the dataset). Currently, I just end up looking through the code for the various classes that will use the dataset to make sure I'm loading everything appropriately. What are good approaches or patterns to use in this situation? Am I doing something fundamentally wrong? Although I'm using typed datasets, this seems like it would be a common situation where prefetching data is used. Thanks!

    Read the article

  • "Thread was being aborted" 0n large dataset

    - by Donaldinio
    I am trying to process 114,000 rows in a dataset (populated from an oracle database). I am hitting an error at around the 600 mark - "Thread was being aborted". All I am doing is reading the dataset, and I still hit the issue. Is this too much data for a dataset? It seems to load into the dataset ok though. I welcome any better ways to process this amount of data. rootTermsTable = entKw.GetRootKeywordsByCategory(catID); for (int k = 0; k < rootTermsTable.Rows.Count; k++) { string keywordID = rootTermsTable.Rows[k]["IK_DBKEY"].ToString(); ... } public DataTable GetKeywordsByCategory(string categoryID) { DbProviderFactory provider = DbProviderFactories.GetFactory(connectionProvider); DbConnection con = provider.CreateConnection(); con.ConnectionString = connectionString; DbCommand com = provider.CreateCommand(); com.Connection = con; com.CommandText = string.Format("Select * From icm_keyword WHERE (IK_IC_DBKEY = {0})",categoryID); com.CommandType = CommandType.Text; DataSet ds = new DataSet(); DbDataAdapter ad = provider.CreateDataAdapter(); ad.SelectCommand = com; con.Open(); ad.Fill(ds); con.Close(); DataTable dt = new DataTable(); dt = ds.Tables[0]; return dt; //return ds.Tables[0].DefaultView; }

    Read the article

  • Receiving generic typed <T> custom objects through remote object in Flex

    - by Aaron
    Is it possible to receive custom generic typed objects through AMF? I'm trying to integrate a flex app with an existing C# service but flex is choking on custom generic typed objects. As far as I can tell Flex doesn't even support generics, but I'd like to be able to even just read in the object and cast its members as necessary. I basically just want flex to ignore the <T>. I'm hopeful that there's a way to do this, since flex doesn't complain about typed collections (a server call returning List works fine and flex converts it to an ArrayCollection just like an un-typed List). Here's a trimmed down example of what's going on for me: The custom C# typed class public class TypeTest<T> { public T value { get; set; } public TypeTest () { } } The server method returning the typeTest public TypeTest<String> doTypeTest() { TypeTest<String> theTester = new TypeTest<String>("grrrr"); return theTester; } The corresponding flex value object: [RemoteClass(alias="API.Model.TypeTest")] public class TypeTest { private var _value:Object; public function get value():Object { return _value; } public function set value(theValue:Object):void { _value = value; } public function TypeTest() { } } and the result handler code: public function doTypeTest(result:TypeTest):void { var theString:String = result.value as String; trace(theString); } When the result handler is called I get the runtime error: TypeError: Error #1034: Type Coercion failed: cannot convert mx.utils::ObjectProxy@11a98041 to com.model.vos.TypeTest. Irritatingly if I change the result handler to take parameter of type Object it works fine. Anyone know how to make this work with the value object? I feel like i'm missing something really obvious.

    Read the article

  • What is the difference between "LINQ to Entities", "LINQ to SQL" and "LINQ to Dataset".

    - by Marcel
    I've been working for quite a while now with LINQ. However, it remains a bit of a mystery what the real differences are between the mentioned flavours of LINQ. The successful answer will contain a short differentiation between them. What is the main goal of each flavor, what is the benefit, and is there a performance impact... P.S. I know that there are a lot of information sources out there, but I'm looking for a kind of a "cheat sheet" which instructs a newbie where to head for a specific goal.

    Read the article

  • What is the differnce between "LINQ to Entities", "LINQ to SQL" and "LINQ to Dataset".

    - by Marcel
    Hi all, I'm working for quite a while now with LINQ. However, it remained still a bit of a mystery what are the real differences between the mentioned flavours of LINQ. The successful answer will contain a short differentiation between them. What is the main goal if it, what is the benefit, and is there a performance impact... P.S. I know that there are a lot of information sources out there, but I look for a kind of a "cheat sheet" which instructs a newbie where to head to for a specific goal.

    Read the article

  • DataSet size best practices - are there any general rules?

    - by Galwegian
    I'm working on a desktop application that will produce several in-memory datasets as an intermediary before being committed to a database. Obviously I'm going to try to keep the size of these to a minimum, but are there any guidelines on thresholds I shouldn't cross for good functionality on an 'average' machine? Thanks for any help.

    Read the article

  • Viewstate in a .ashx Handler?

    - by Matt Dawdy
    I've got a handler (list.ashx for example) that has a method that retrieves a large dataset, then grabs only the records that will be shown on any given "page" of data. We are allowing the users to do sorting on these results. So, on any given page run, I will be retrieving a dataset that I just got a few seconds/minutes ago, but reordering them, or showing the next page of data, etc. My point is that my dataset really hasn't changed. Normally, the dataset would be stuck into the viewstate of a page, but since I'm using a handler, I don't have that convenience. At least I don't think so. So, what is a common way to store the viewstate associated with a current user's given page when using a handler? Is there a way to take the dataset, encode it somehow and send that back to the user, and then on the next call, pass it back and then rehydrate a dataset from those bits? I don't think Session would be a good place to store it since we might have 1000 users all viewing different datasets of different data, and that could bring the server to its knees. At least I think so. Does anyone have any experience with this kind of situation, and can you give me any advice?

    Read the article

  • Update data table on ASMX Service side

    - by Paul
    Hi, I need advice. On Web Service side a I hav this method : public DataSet GetDs(string id) { SqlConnection conn = null; SqlDataAdapter da = null; DataSet ds; try { string sql = "SELECT * FROM Tab1"; string connStr = WebConfigurationManager.ConnectionStrings["Employees"].ConnectionString; conn = new SqlConnection(connStr); conn.Open(); da = new SqlDataAdapter(sql, conn); ds = new DataSet(); da.Fill(ds, "Tab1"); return ds; } catch (Exception ex) { throw ex; } finally { if (conn != null) conn.Close(); if (da != null) da.Dispose(); } } It return dataset to client app. I client application is dataset binding in datagridview. Client can insert,update,delete row from table. If client finish his work, I want accept change in data table on web service side. I can sent clients all dataset na update table on web service side, but I want sent only changed data. Any advice? Thank u.

    Read the article

  • Accessing weakly typed facebook sdk result object properties in .NET 3.5 using the API?

    - by John K
    Consider the following in .NET 3.5 (using the Bin\Net35\Facebook*.dll assemblies): var app = new FacebookApp(); var result = app.Get("me"); // want to access result properties with no dynamic ... in the absence of the C# 4.0 dynamic keyword this provides only a generic object. How best should I access the properties of this result value? Are there helper or utility methods or stronger types in the facebook C# sdk, or should I use standard .NET reflection techniques?

    Read the article

  • ASP.NET MVC Strongly Typed Widgets

    - by Ben
    I have developed a plugin system that makes it easy to plug in new logic to an application. Now I need to provide the ability to easily add UI widgets. There are already some good responses on how to create a portal system (like iGoogle) with ASP.NET MVC, and I'm fine about the overall concept. My question is really about how we make strongly typed widgets. Essentially when we set up a widget we define the controller and action names that are used to render that widget. We can use one controller action for widgets that are not strongly typed (since we just return PartialView(widgetControlName) without a model) For widgets that are strongly typed (for example to an IList) we would need to add a new controller action (since I believe it is not possible to use Generics with ActionResult e.g. ActionResult). The important thing is that the widget developers should not change the main application controllers. So my two thoughts are this: Create new controllers in a separate class library Create one partial WidgetController in the main web project and then extend this in other projects (is this even possible?) - not possible as per @mfeingold As far as the development of the widgets (user controls) go, we can just use post build events from our extension projects to copy these into the Views/Widgets directory. Is this a good approach. I am interested to here how others have handled this scenario. Thanks Ben P.S - in case it helps, an example of how we can render widgets - without using Javascript <%foreach (var widget in Model) {%> <%if (widget.IsStronglyTyped) { Html.RenderAction(widget.Action, widget.Controller); } else { Html.RenderPartial(widget.ControlName); } %> <%} %>

    Read the article

  • Minimum cost strongly connected digraph

    - by Kazoom
    I have a digraph which is strongly connected (i.e. there is a path from i to j and j to i for each pair of nodes (i, j) in the graph G). I wish to find a strongly connected graph out of this graph such that the sum of all edges is the least. To put it differently, I need to get rid of edges in such a way that after removing them, the graph will still be strongly connected and of least cost for the sum of edges. I think it's an NP hard problem. I'm looking for an optimal solution, not approximation, for a small set of data like 20 nodes. Edit A more general description: Given a grap G(V,E) find a graph G'(V,E') such that if there exists a path from v1 to v2 in G than there also exists a path between v1 and v2 in G' and sum of each ei in E' is the least possible. so its similar to finding a minimum equivalent graph, only here we want to minimize the sum of edge weights rather than sum of edges. Edit: My approach so far: I thought of solving it using TSP with multiple visits, but it is not correct. My goal here is to cover each city but using a minimum cost path. So, it's more like the cover set problem, I guess, but I'm not exactly sure. I'm required to cover each and every city using paths whose total cost is minimum, so visiting already visited paths multiple times does not add to the cost.

    Read the article

  • Difference between DataTable.Load() and DataTable = dataSet.Tables[];

    - by subbu
    Hi All , I have a doubt i use the following piece of code get data from a SQLlite data base and Load it into a data table "SQLiteConnection cnn = new SQLiteConnection("Data Source=" + path); cnn.Open(); SQLiteCommand mycommand = new SQLiteCommand(cnn); string sql = "select Company,Phone,Email,Address,City,State,Zip,Country,Fax,Web from RecordsTable"; mycommand.CommandText = sql; SQLiteDataReader reader = mycommand.ExecuteReader(); dt.Load(reader); reader.Close(); cnn.Close();" In some cases when I try to load it Gives me "Failed to enable constraints exception" But when I tried this below given piece of code for same table and same set of records it worked "SQLiteConnection ObjConnection = new SQLiteConnection("Data Source=" + path); SQLiteCommand ObjCommand = new SQLiteCommand("select Company,Phone,Email,Address,City,State,Zip,Country,Fax,Web from RecordsTable", ObjConnection); ObjCommand.CommandType = CommandType.Text; SQLiteDataAdapter ObjDataAdapter = new SQLiteDataAdapter(ObjCommand); DataSet dataSet = new DataSet(); ObjDataAdapter.Fill(dataSet, "RecordsTable"); dt = dataSet.Tables["RecordsTable"]; " Can any one tell me what is the difference between two

    Read the article

  • NoPrimaryKeyException from DBUnit when loading a dataset into a databse

    - by Omar Kooheji
    I'm getting NoPrimaryKeyException when I try to run one of my unit tests which uses DBUnit. The datatable is created using Hibernate and is a join table between two classes mapping a many to many relationship. The annotations that define the relationship are as follows: @Override @ManyToMany @JoinTable(name="offset_file_offset_entries", joinColumns={@JoinColumn(name="offset_entry_id")},inverseJoinColumns={@JoinColumn(name="file_description_id")}) public List<OffsetEntry> getOffsets() { The other entries in in the XML file I'm using to define the dataset seem to work fine but not the join table. I get the following exception: org.dbunit.dataset.NoPrimaryKeyException: offset_file_offset_entries at org.dbunit.operation.UpdateOperation.getOperationData(UpdateOperation.java:72) at org.dbunit.operation.RefreshOperation$UpdateRowOperation.<init>(RefreshOperation.java:266) at org.dbunit.operation.RefreshOperation.createUpdateOperation(RefreshOperation.java:142) at org.dbunit.operation.RefreshOperation.execute(RefreshOperation.java:100) at org.dbunit.ext.mssql.InsertIdentityOperation.execute(InsertIdentityOperation.java:217) at uk.co.sabio.obscheduler.application.dao.AbstractBaseDatabaseTest.setUp(AbstractBaseDatabaseTest.java:57) at org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests.runManaged(AbstractJUnit38SpringContextTests.java:332) at org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests.access$0(AbstractJUnit38SpringContextTests.java:326) at org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests$1.run(AbstractJUnit38SpringContextTests.java:216) at org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests.runTest(AbstractJUnit38SpringContextTests.java:296) at org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests.runTestTimed(AbstractJUnit38SpringContextTests.java:253) at org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests.runBare(AbstractJUnit38SpringContextTests.java:213) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) the Dataset entry in question looks like this: <offset_file_offset_entries offset_entry_id="1" file_description_id="1" /> And matches up with the database which has both fields as primary keys (The Databse is MS SQL Server if that helps) There are corresponding entries in the two tables being Joined defined in the following xml: <dataset> <file_description file_path="src/test/resources/" file_pattern=".txt" file_description_id="1"/> <offset_file_description file_description_id="1"/> <offset_entries offset_entry_id="1" field_name="Field1" field_length="10" start_index="0"/> <offset_file_offset_entries offset_entry_id="1" file_description_id="1" /> </dataset> Do I have to define the primary keys in the hibernate annotations? If so How do I do so? do I have to change the way I define my dataset to imply that the two columns are a joint primary key? I'm not very proficient with hibernate or DBUnit for that matter and I'm at my wits end so any assistance would be really appreciated.

    Read the article

  • DateTimePicker not updating dataset

    - by Dan
    I'm binding a DateTimePicker control to my dataset (which is linked to a database). However, unless the user changes the date on that control, the dataset seems to contain null for that entry (even though the Value entry of the control isn't null). I've done a bit of googling, and there's a lot of talk about people having troubles with the DateTimePicker not supporting null values. However, I DON'T want it to support a NULL value. The column in my database table is set to "NOT NULL". It's as if the dataset isn't updating itself from the DateTimePicker control unless the user changes the date. I've tried explicitly setting the date for the control in code (using DateTimePicker.Value = DateTime.Now). This still doesn't update the dataset side. Thankyou for any help, Dan.

    Read the article

  • Netflix prize dataset?

    - by user169410
    Hi, I am looking to work on a machine learning project for my course and I would like to use the netflix prize dataset? But it looks like the contest is closed and the dataset is not available for download in the netflix website. Does anyone who wokred on it has the dataset? If so ,can u share it?

    Read the article

  • Updating Database from DataSet

    - by clawson
    I am having trouble updating my Database from my code using a DataSet. I'm using SQL Server 2008 and Visual Studio 2008. Here is what I've done so far. I have created a table in SQL Server called MyTable which has two columns: id nchar(10), and name nchar(50). I have then created a datasource in my VB.net project that consists of this table using the dataset wizard and called this dataset MyDataSet. I run the following code on a button click: Try Dim myDataSet As New MyDataSet Dim newRow As MyDataSet.MyTableRow = myDataSet.MyTable.NewMyTableRow newRow.id = "1" newRow.name = "Alpha" myDataSet.MyTable.AddMyTableRow(newRow) myDataSet.AcceptChanges() Catch ex As Exception MsgBox(ex.Message) End Try when I run this and check the rows in SQL Server it returns 0 rows What have I missed? How can I add these rows / save changes in a dataset to the database? I have seen other examples that use a TableAdapter but I don't think I want to do this, I think I should be able to achieve this just using a DataSet. Am I mistaken? Help is greatly appreciated!

    Read the article

  • Mainframe Dataset

    - by Manasi
    Hi, I have a sequential dataset which has some data formatted in columns. suppose below is the format of my dataset. Emp_ID Emp_name Emp_addr I want to remove the column Emp_Name from the dataset. Can I do it without writing the COBOL program? Please let me know if we have any command to do the same. Thanks and Regards, Manasi Kulkarni.

    Read the article

  • removing diffgram from .net web service returning dataset

    - by FrenchiInLa
    per my client request I have been requested to return a dataset. basically it's an arraylist that i convert to dataset as follow DataSet ds = new DataSet(); DataTable tbl = new DataTable("Table"); DataRow drow; tbl.Columns.Add("ID", Type.GetType("System.String")); tbl.Columns.Add("Name", Type.GetType("System.String")); foreach (NameIDPair item in AL) { drow = tbl.NewRow(); drow["ID"] = item.ID; drow["Name"] = item.Name; tbl.Rows.Add(drow); } ds.Tables.Add(tbl); the problem with my client is this web service add a diffgram like diffgr:hasChanges="iserted" tag to each row, and they're pretending is not consistent with other web services used by them. How can I remove this tag in the XML returned? Any help would be greatly appreciated. Thanks

    Read the article

  • Subsonic connections and dataset

    - by ajk
    Hi, If using subsonic, i know you hav to close a datareader. but what if you get a dataset back, from a stored procedure? What can you close? So if its like this - SubSonic.StoredProcedure sp = SubSonic.StoredProcedure; DataSet ds = DataSet; ds = sp.GetDataSet; What do i close when done? I don't think dataset can be closed, right? This is Subsonic 2.x Sorry if this was posted already, i tried to post earlier but got error message, and then couldnt find it so am trying again.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >