Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

create new datarow

Posted on 2006-11-01
1
Medium Priority
?
1,340 Views
Last Modified: 2012-06-27
hi

i have a populated array of datarows.  

i want to create a new datarow add a string to it.

then i want to increase the size of the array by 1 and
add the new datarow to this position in the existing array of datarows.

NB - i have to do this via a datarow array - cant avoid it.

can anyone help?

thanks
0
Comment
Question by:cocosteel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
Mihai Stancescu earned 1200 total points
ID: 17850930
If the length of the datarow array permits you to insert an other item then you can use the method SetValue.

ex:

DataRow[] dr = new DataRow[] {5};

//if you have filled up the array up to the 4 position try this
dr.SetValue(newDataRow, 5); // make sure that this value is less then the length of the array or else you'll get an exception.

Regards,
Mishu
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question