473,387 Members | 1,541 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,387 software developers and data experts.

how to pass dataset more rows in asp.net

ramanan ram
i am using .net(c#) with oracle. now,the Dataset contains five rows.using for loop that dataset value to pass the procedure argument and insert into specific table.if i am execute cannot inserted into the table .but without for loop single row inserted successfully.how to pass dataset more values to procedure argument.
here that coding:
Expand|Select|Wrap|Line Numbers
  1.  for(i=0; i < objDataset.Rows.Count; i++)
  2.                 {
  3.  if (objDataset.Tables[0].Rows[i].IsNull(0))
  4.                     {
  5.                         objDataset.Tables[0].Rows[i].Delete();
  6.  
  7.                     }
  8.                 }  objDataset.Tables[0].AcceptChanges();
  9.                 DataTable dt = new DataTable();
  10.                 dt = objDataset.Tables[0];
  11.                 if (dt.Rows.Count > 0)
  12.                 {
  13.                     for (i = 0; i < dt.Rows.Count; i++)
  14.                     {
  15.                         //  dbs.AddInParameter(dbcommand, "PQUOTEID", DbType.String,  dt.Rows[i]["Division"].ToString().Trim());
  16.                         dbcomm.Parameters.Add("pvdivision", OleDbType.VarChar, 200).Value = dt.Rows[i]["Division"].ToString().Trim();
  17.                         dbcomm.Parameters.Add("pvcountry", OleDbType.VarChar, 200).Value = dt.Rows[i]["Country"].ToString().Trim();
  18.                         dbcomm.Parameters.Add("pvlanded", OleDbType.VarChar, 200).Value = dt.Rows[i]["Landed"].ToString().Trim();
  19.                         dbcomm.Parameters.Add("pvtype", OleDbType.VarChar, 200).Value = dt.Rows[i]["Type"].ToString().Trim();
  20.                         dbcomm.Parameters.Add("pvcust", OleDbType.VarChar, 200).Value = dt.Rows[i]["Cust"].ToString().Trim();
  21.  
  22.                     }
  23.                 }
  24.  
  25.                 dbcomm.ExecuteNonQuery();
please help..
May 11 '12 #1
0 1514

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Andrew Carlson | last post by:
I have a class that performs a few methods on a dataset. That dataset then fills a grid on a form. What I would like to do is to assign a particular dataset to the class at runtime. For...
1
by: akash D | last post by:
I have two list boxes, I want to filter items of second list box based on selcted items of First list box *** Sent via Developersdex http://www.developersdex.com ***
2
by: Amadelle | last post by:
Hi all and thanks in advance, I am thinking of passing around a dataset as parameter to different methods through my code ...my question is what is a reasonable size for a dataset in order to...
0
by: Scott R | last post by:
I have a data layer that is set up to pass datasets to and from the presentation layer. In migrating to 2.0, I would like to use the objectdatasource. The problem I am having is that it seems...
7
by: Dan Sikorsky | last post by:
How do you iterate thru a dataset to change money fields to a different value? Here's what I have. My dataset is filled directly from a stored procedure. ' Create Instance of Connection and...
1
by: Slonocode | last post by:
I have a form with some textboxes, checkboxes, and comboboxes that are databound to the "Packages" table in a dataset. For Example: Me.txtFirstName.DataBindings.Add(New Binding("Text", DS,...
4
by: cj | last post by:
I am copying rows from a database/table on Server_A to a database/table on Server_B. I use Server_A_DataAdapter.fill to load the rows into a dataset. Then Server_B_DataAdapter.update to put the...
2
by: Steven Blair | last post by:
Hi, I have a DataSet with 30 rows. I pass this DataSet to my reporting module and this needs the first 10 rows. Does C# have a way of filtering the DataSet so I can use only the first 10 rows...
0
by: Steven Bolard | last post by:
Hi Im using .net 2.0 and i am merging a table from one strongly typed dataset into another. If i then do a select on the rows within the table I merged and subsequently try to access the columns...
3
by: RAB | last post by:
I have filled a dataset with the following code in VB... ...... dim DataSet as System.Data.DataSet = new System.Data.DataSet dataAdapter.Fill (dataSet) dim MyInt as integer I want to...
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
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
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?
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.