473,385 Members | 1,769 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,385 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 1273
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); ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.