dataset

how to bind database to crystal report?

我的梦境 提交于 2019-12-13 03:39:37
问题 i have C# program, i have DataSet that i want to bind to crystal report. how to do it ? 回答1: Create a Typed DataSet from the "Add New Item > DataSet and give the dataset a useful name. In Server Explorer, drag a view with the fields you want in the report onto the dataSet. Create a new Crystal Report using the Wizard. From the Report Gallery, choose "Standard" and click 'OK' In the 'Data' tab, click the node for "More Data Sources" Click the node for ADO .Net (XML) Check the box for 'Use

Shared DataSet Over Multiple Forms C#

懵懂的女人 提交于 2019-12-13 03:39:01
问题 So im working on a database project, in my first form i have sql connection command which accesses my datasource. Ive also created a dataset this is all in my displayform The displayform is used for displaying the database, i've added a button to add records, so when i click on add records it would go to the addform where i can fill in the details to creating a new contact. Then go back to the first form to display the newly created contact and all others. However i'm having a bit of a

Dataset questions

核能气质少年 提交于 2019-12-13 03:15:26
问题 I have two dataset questions. If I change any cell in a dataset, how I can update this change in a database without using an SQL update query? How can I see dataset contents in debug mode (to see the data)? 回答1: You can't update a database without an UPDATE query. That's how updates happen. You can use libraries that abstract this away so that you don't have to see the query in your code, but the query still has to happen. You can see the contents of a dataset in debug mode by adding it to

Read multiple tables with relations with t-sql into DataSet

大憨熊 提交于 2019-12-13 03:05:50
问题 Is it possible to select data with one t-sql statement from multiple tables ( join ) into a string representation and directly insert this text into a data set ( DataSet.ReadXml(...) ). I need to preserve the relations, of course. I have seen some complex examples using FOR XML , but is there a simple way? 回答1: well, I did it myself: SQL = "SELECT table1.x, table2.z FROM table1 INNER JOIN table2 ON table1.ID = table2.SubID FOR XML AUTO, XMLDATA"; and DataSet data = new DataSet(); DbCommand

Count entries per time interval in MATLAB

别说谁变了你拦得住时间么 提交于 2019-12-13 02:15:16
问题 I'd like to count entries per time interval. Source dataset nx2 2001-03-23 05:01:33.347,55 2001-03-23 05:01:33.603,62 2001-03-23 05:01:33.977,32 2001-03-23 05:01:34.126,30 ... Example output for group count by second: 2001-03-23 05:01:33.000,3 2001-03-23 05:01:34.000,1 ... 回答1: Here is one way: % dataset data = { '2001-03-23 05:01:33.347', 55 ; '2001-03-23 05:01:33.603', 62 ; '2001-03-23 05:01:33.977', 32 ; '2001-03-23 05:01:34.126', 30 ; }; % convert to serial date (ignoring the seconds

Delete All row from DataTable in DataSet

烈酒焚心 提交于 2019-12-13 01:28:18
问题 I'd like to erase all row in a datatable located in a dataset and then update the DataBase using the method Update() of TableAdapter . The insert works fine, I put it so you can see what I'm doing. I tried the method Clear() for datatable which was supposed to erase all row but at the moment it does nothing. I would like to use a kind of SQL query like DELETE * FROM demande; but I dont get how to do it protected void InsertDemande_Click(object sender, EventArgs e) { //TB = textBox //Parsing

UICollectionView dataSource/delegate related exception

给你一囗甜甜゛ 提交于 2019-12-13 00:55:08
问题 I'm trying to create UICollectionView dynamically but I keep getting an exception that we usually get when dataSource or delegate was not set: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView collectionView:numberOfItemsInSection:]: unrecognized selector sent to instance 0x8a78ce0' But it’s there! This is my code: Header: #import <UIKit/UIKit.h> @interface classHeader : UIViewController <UICollectionViewDelegate, UICollectionViewDataSource> @property

How to convert WindowsInstaller.Record to System.Data.Dataset or Data Table (While reading MSI file) in C#

不打扰是莪最后的温柔 提交于 2019-12-13 00:54:13
问题 I want to read MSI file(Windows Installer Package). I have written a function as below which takes two input parameters : msifileName and Table Name and returns a data table which is one of the MSI table. public DataTable ReadMsiPropertyTable(string msiFile, string tableName) { Type installerType = Type.GetTypeFromProgID("WindowsInstaller.Installer"); WindowsInstaller.Installer installer = (WindowsInstaller.Installer)Activator.CreateInstance(installerType); Database database = installer

Generate JS variable array through data-set from woocommerce HTML variation

↘锁芯ラ 提交于 2019-12-13 00:04:00
问题 This is the part of a vanilla JS code = var prices = [100, 536, 2368]; But the above is hardcoded. I want them through an HTML select drop down: <select class="license_type" name="license_type" id="license_type"> <option value="license" data-price="500">Single Site License</option> <option value="license" data-price="700">5 Site License</option> <option value="license" data-price="1400">Developers License</option> </select> Here values in the dataset are generated dynamically in woocommerce:

The SelectCommand property has not been initialized before calling 'Fill'

被刻印的时光 ゝ 提交于 2019-12-13 00:00:59
问题 The SelectCommand property has not been initialized before calling 'Fill' I am getting this error when running StoredProcedure.ExecuteDataSet(); DataSet ds= new DataSet(); SqlDataAdapter ada = new SqlDataAdapter(); try { ada.Fill(ds); } catch { } 回答1: I was able to fix this by adding the following code: [162] DbDataAdapter da = Factory.CreateDataAdapter(); [163] da.SelectCommand = cmd; <-- add this [164] da.Fill(ds); Hope this helps if anyone else had this problem... 回答2: i was having this