473,378 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Fill up a dataset

hello,
I want to fill up a dataset with data of my own. Which is the way to do this
?

///this is the creation of a dataset with a row which contains 2 fields

VerenigingDataSet VrDs = new VerenigingDataSet();

///if I do this, I receive an error

VrDs.Vereniging.Rows[0].ToString() = cbo1.Text;

VrDs.Vereniging.Rows[1].ToString() = txt1.Text;

How can I fill up this dataset with mine input data ?

Anyway many thanks and many regards,

Hugo


Nov 16 '05 #1
2 1272
hi
try this
myDataRow = VrDs.Tables[0].NewRow();
myDataRow[0] = cbo1.Text;
myDataRow[1] = txt1.Text;
VrDs.Tables[0].Add(myDataRow);
regards
Ansil
Dimensions
Technopark
Trivandrum
an****@gmail.com

"Hugo Lefèvre" wrote:
hello,
I want to fill up a dataset with data of my own. Which is the way to do this
?

///this is the creation of a dataset with a row which contains 2 fields

VerenigingDataSet VrDs = new VerenigingDataSet();

///if I do this, I receive an error

VrDs.Vereniging.Rows[0].ToString() = cbo1.Text;

VrDs.Vereniging.Rows[1].ToString() = txt1.Text;

How can I fill up this dataset with mine input data ?

Anyway many thanks and many regards,

Hugo


Nov 16 '05 #2
Dear,

I am sorry, but what you have given as answer, do not work : it gives as
error : Cannot find table 0.

Can you tell me why ?

Many thanks and many regards,

Hugo
"Ansil MCAD" <An*******@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
hi
try this
myDataRow = VrDs.Tables[0].NewRow();
myDataRow[0] = cbo1.Text;
myDataRow[1] = txt1.Text;
VrDs.Tables[0].Add(myDataRow);
regards
Ansil
Dimensions
Technopark
Trivandrum
an****@gmail.com

"Hugo Lefèvre" wrote:
hello,
I want to fill up a dataset with data of my own. Which is the way to do this ?

///this is the creation of a dataset with a row which contains 2 fields

VerenigingDataSet VrDs = new VerenigingDataSet();

///if I do this, I receive an error

VrDs.Vereniging.Rows[0].ToString() = cbo1.Text;

VrDs.Vereniging.Rows[1].ToString() = txt1.Text;

How can I fill up this dataset with mine input data ?

Anyway many thanks and many regards,

Hugo


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Helixpoint | last post by:
Here is my code: Dim availMach As New ASPNETProduct.machinedb() Dim dstMachList As DataSet dstMachList = availMach.GetAvailMach(theSearchVal, theSearchBy, theMachCode1, theSearchView,...
2
by: Stanav | last post by:
Hello all, I'm developing a web application using VB.Net 2003 and Framework 1.1. This application queries an AS/400 database. I'm using the IBM OleDb provider that came with IBM Client Access for...
4
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure...
5
by: moondaddy | last post by:
I have a website where cataloge pages are populated by calling a stored procedure on sql server. I use the sql data adapter's fill method to call this stored procedure and fill the dataset. about...
0
by: Sam | last post by:
Hi, I'm trying to fill a dataset using two requests : select column_name as column_name1, data_type as data_type1 from information_schema.columns where table_name = 'table1' and select...
10
by: dauphian | last post by:
Hello, I am new to .net and am trying to build a report application that queries 4 different tables based on a id, and I need to return them in the same table for easy viewing. Basically, I...
2
by: MDB | last post by:
Hello All, I have a data grid that I fill using a dataset. The results of the query has around 15 columns and 500 rows (and growing). The reason I am using the datagrid is so the end users can...
0
by: mike1402 | last post by:
Hi ! I get the error below sometimes when retrieving a big amount of data using Datadapter.Fill(dataset,"table"). But when I send the command Fill again, there is no error. Is it a fault of...
2
by: slinky | last post by:
I'm getting a error when I open my . aspx in my browser... line 34: da.Fill(ds, "Assets") Here's the error and my entire code for this .aspx.vb is below that ... I need some clues as to what is...
1
by: Probi | last post by:
HI, I have a DropDownList populated from database I use the following code OracleDataAdapter ad2 = new OracleDataAdapter(cmd2, connection); DataSet ds2 = new DataSet(); ad2.Fill(ds2); ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.