dataset

how to get data from a datagridview and insert into database without using databinding?

hi guys i ve a datagrid and wen a button s clicked i want the values from the datadrid to the database.. without databind to dataset/datatable.. thanx in advance ...

Unable to Read an XML file into a data set when XML files containg data in French

I am trying to read an XML file into a data set using dataset.ReadXml(fileName, XmlReadMode.IgnoreSchema). XML contains data formatted in French eg 231,23 ie '.' in US is replaced by ',' in French. I get an exception Input string was not in a correct format.Can any one help me ? ...

python union of 2 nested lists with index

I want to get the union of 2 nested lists plus an index to the common values. I have two lists like A = [[1,2,3],[4,5,6],[7,8,9]] and B = [[1,2,3,4],[3,3,5,7]] but the length of each list is about 100 000. To A belongs an index vector with len(A): I = [2,3,4] What I want is to find all sublists in B where the first 3 elements are equal...

Is there anything like .NET DataView/ DataSet for Java, where I can snapshot some data and then perform queries on it?

Context In our application, we snapshot data from a database using a query that is entered by a super user, and then we save the data from that snapshotting using XML. If I was using .NET, I would use a DataSet (+ DataTables) and DataViews, which are pretty good for that purpose. But I am in the Java world, and my impulse choice was to ...

Linq: Why won't Group By work when Querying DataSets?

While playing with Linq Group By statements using both DataSet and Linq-to-Sql DataContext, I get different results with the following VB.NET 10 code: #If IS_DS = True Then Dim myData = GetOrdersDS #Else Dim myData = GetNwDataContext #End If Dim MyList = From o In myData.Orders _ Join od In myData.Order_Details On o....

Using Linq to filter a ComboBox.DataSource ?

Hi board, in another topic, I've stumbled over this very elegant solution by Darin Dimitrov to filter the DataSource of one ComboBox with the selection of another ComboBox: how to filter combobox in combobox using c# combo2.DataSource = ((IEnumerable<string>)c.DataSource) .Where(x => x == (string)combo1.SelectedValue); I would like t...

Corrupted DataSet in .NET for failure testing

Does anybody know of a way to create a DataSet such that when I call GetXml() on the DataSet I will get an exception? I'm trying to write some failure testing for this scenario and am having a hard time. Is it possible? ...

OleDb database to DataSet and back in c#?

I'm writing a program that lets a user: Connect to an (arbitrary) database that the user specifies View all of the tables in that database in separate DataGridViews Edit them in the program, generate random data, and see the results Choose to commit those changes or revert So I discovered the DataSet class, which looks like it's capa...

Get Dataset returned from an ajax enabled wcf service....

I call an ajax enabled wcf service method , <script type="text/javascript"> function GetEmployee() { Service.GetEmployeeData('1','5',onGetDataSuccess); } function onGetDataSuccess(result) { Iteratejsondata(result) } </script> and my method is , [OperationContract] public string GetEmplo...

Update data table on ASMX Service side

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["Emp...

inserting from datagrid to dataset

hi i m a newbee to c sharp .net i ve to add values from the datagrid to a table.. any way s ok. sample code or link s fine for me.. pls help me out thanx in advance.. ...

DataSet size best practices - are there any general rules?

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. ...

Avoiding Redundancies in XML documents

I was working with a certain XML where there were no redundancies <person> <eye> <eye_info> <eye_color> blue </eye_color> </eye_info> </eye> <hair> <hair_info> <hair_color> blue </hair_color> </hair_info> </hair> </person> As you can see, the sub-tag eye-color makes ref...

Passing a LINQ DataRow Reference in a GridView's ItemTemplate

SOLVED. Code has been edited to reflect solution. Given the following GridView: <asp:GridView runat="server" ID="GridView1" AutoGenerateColumns="false" DataKeyNames="UniqueID" OnSelectedIndexChanging="GridView1_SelectedIndexChanging" > <Columns> <asp:BoundField HeaderText="Remarks" DataField="Remarks" /> <asp:TemplateFi...

Using set in Python inside a loop

I have the following list in Python: [[1, 2], [3, 4], [4, 6], [2, 7], [3, 9]] I want to group them into [[1,2,7],[3,4,6,9]] My code to do this looks like this: l=[[1, 2], [3, 4], [4, 6], [2, 7], [3, 9]] lf=[] for li in l: for lfi in lf: if lfi.intersection(set(li)): lfi=lfi.union(set(li)) break ...

Reading XML by Dataset

I using a dataset to read an xml file as shown below DataSet ds = new DataSet(); ds.ReadXml("C:\test.xml"); test.xml contains <MasterEntities> <FieldInfo> <Name>OMID</Name> <Mandatory>Yes</Mandatory> <RangeName>AssumptOMID</RangeName> <DataType>int</DataType> <Length>10</Length> </FieldInfo> <FieldInfo> <N...

How update dataset with datagrid view C#

Hi, I am beginner and I have this problem. How can I can update dataset with datagridview? I binding dataset in datagrid. Edit datagrid. At finish I want update dataset with datagridview. Thank you form any advice Sory, I use Winforms. Example: I bind dataset in datagridview. dataGridViewCustomers.DataSource = _ds.Tables[0]; //edit...

Number of elements in Python Set

I have a list of phone numbers that have been dialed (nums_dialed). I also have a set of phone numbers which are the number in a client's office (client_nums) How do I efficiently figure out how many times I've called a particular client (total) For example: >>>nums_dialed=[1,2,2,3,3] >>>client_nums=set([2,3]) >>>??? total=4 Problem ...

grouping data from two dataset

hi, i've got a problem with dataset: I've got two dataset from two different server but they have the same columns. so it's like that: First DataSet : asset description make jobtype jan feb ... dec 0001 mine ik Acc 0 0 10 0002 yours ic Over 0 0 10 Second dataset : asset description make ...

Getting a certain node using DataSet

I have the following XML <xml> <ObsCont xCampo="field1"> <xTexto>example1</xTexto> </ObsCont> <ObsCont xCampo="field2"> <xTexto>example2</xTexto> </ObsCont> <ObsCont xCampo="field3"> <xTexto>example3</xTexto> </ObsCont> <field>information</field> </xml> Is there a way to get the content of "xTexto" ...