c# - fill a DataSet in Visual Studio 2015 Express (Windows Forms Application)? -


i want know if there easy way this. have created simple windows form application dataset , created table (games) inside few columns (id,title,description,developer,year).

then created listbox object reference dataset , selected column show (games.title). there few labels next listbox show values of other columns.

now want know if can fill dataset inside visual studio without coding - if edit access database in ms access...

currently fill dataset following code @ start of application:

datarow crnewline = dataset1.tables["games"].newrow(); crnewline["title"] = "the title of game"; crnewline["description"] = "this description. farewell."; crnewline["developer"] = "warner interactive entertainment ltd."; crnewline["year"] = "1996"; dataset1.tables["games"].rows.add(crnewline); 

but code intense if want add 200 rows in table... , don't want use external source sql database or access database. data, code , application should in 1 exe after compiling.

so easier way fill dataset table values?

thanks answer!

you can put data in xml file , call dataset.readxml()

if want schema, put few rows of data dataset , dataset.writexml(), pop open in text editor , idea how needs structured , extended..


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -