473,385 Members | 1,673 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.

convert a DataRow to a StringArray

Hello,

Is there a way to convert a DataRow to a StringArray, without looping
through all of the items of the DataRow?

Basically, I'm trying to get the results of a query and put them into
a listbox.

Right now it is done like this:

foreach(DataRow myDatarow in myDataTable)
{
String[] row = new String[myDataRow.ItemArray.Length];
for (int x = 0; x < myDataRow.ItemArray.Length; x++)
{
row[x] = myDataRow[x].ToString();
}
myListBox.Items.Add(new ListViewItem(row));

}

Unfortunately, the performance on this is poor when there is a lot of
data.

The number of columns in the DataTable depend on user input, so I
cannot simply replace all of that with

foreach(DataRow myDatarow in my DataTable)
{
myListBox.Items.Add(new ListViewItem (new String [] {
myDataRow["col1"].toString(),
myDataRow["col2"].toString(),
myDataRow["col3"].toString()
...
}

}

Any suggestions?
Thanks in advance
Nov 7 '08 #1
9 35712
Have you tried to virtualize the ListView? That will give you better
performance for large items.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"myotheraccount" <le*****@yahoo.comwrote in message
news:7a**********************************@u29g2000 pro.googlegroups.com...
Hello,

Is there a way to convert a DataRow to a StringArray, without looping
through all of the items of the DataRow?

Basically, I'm trying to get the results of a query and put them into
a listbox.

Right now it is done like this:

foreach(DataRow myDatarow in myDataTable)
{
String[] row = new String[myDataRow.ItemArray.Length];
for (int x = 0; x < myDataRow.ItemArray.Length; x++)
{
row[x] = myDataRow[x].ToString();
}
myListBox.Items.Add(new ListViewItem(row));

}

Unfortunately, the performance on this is poor when there is a lot of
data.

The number of columns in the DataTable depend on user input, so I
cannot simply replace all of that with

foreach(DataRow myDatarow in my DataTable)
{
myListBox.Items.Add(new ListViewItem (new String [] {
myDataRow["col1"].toString(),
myDataRow["col2"].toString(),
myDataRow["col3"].toString()
...
}

}

Any suggestions?
Thanks in advance

Nov 7 '08 #2
foreach (DataRow row in DataTable1.Rows)
{
object[] itemArray = row.ItemArray;
string sItem1 = itemArray[0].ToString();
}

"myotheraccount" wrote:
Hello,

Is there a way to convert a DataRow to a StringArray, without looping
through all of the items of the DataRow?

Basically, I'm trying to get the results of a query and put them into
a listbox.

Right now it is done like this:

foreach(DataRow myDatarow in myDataTable)
{
String[] row = new String[myDataRow.ItemArray.Length];
for (int x = 0; x < myDataRow.ItemArray.Length; x++)
{
row[x] = myDataRow[x].ToString();
}
myListBox.Items.Add(new ListViewItem(row));

}

Unfortunately, the performance on this is poor when there is a lot of
data.

The number of columns in the DataTable depend on user input, so I
cannot simply replace all of that with

foreach(DataRow myDatarow in my DataTable)
{
myListBox.Items.Add(new ListViewItem (new String [] {
myDataRow["col1"].toString(),
myDataRow["col2"].toString(),
myDataRow["col3"].toString()
...
}

}

Any suggestions?
Thanks in advance
Nov 7 '08 #3
Thanks for the suggestion. Unfortunately, I have a dynamic number of
columns. The code below only converts the first column to a string,
but I need to convert each of them to a string to load them all into
the list box, through this still forces me to loop through all of the
columns in the data row.
I'll try using a VirtualListBox.
Any more suggestions welcome.

On Nov 7, 5:18*pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
foreach (DataRow row in DataTable1.Rows)
{
* object[] itemArray = row.ItemArray;
* string sItem1 = itemArray[0].ToString();

}
"myotheraccount" wrote:
Hello,
Is there a way to convert a DataRow to a StringArray, without looping
through all of the items of the DataRow?
Basically, I'm trying to get the results of a query and put them into
a listbox.
Right now it is done like this:
foreach(DataRow myDatarow in myDataTable)
{
* * String[] row = new String[myDataRow.ItemArray.Length];
* * for (int x = 0; x < myDataRow.ItemArray.Length; x++)
* * {
* * * * row[x] = myDataRow[x].ToString();
* * }
* * myListBox.Items.Add(new ListViewItem(row));
}
Unfortunately, the performance on this is poor when there is a lot of
data.
The number of columns in the DataTable depend on user input, so I
cannot simply replace all of that with
foreach(DataRow myDatarow in my DataTable)
{
* * myListBox.Items.Add(new ListViewItem (new String [] {
* * * * myDataRow["col1"].toString(),
* * * * myDataRow["col2"].toString(),
* * * * myDataRow["col3"].toString()
* * * * ...
* * * * }
}
Any suggestions?
Thanks in advance
Nov 8 '08 #4
My apologies for not spelling it out enough: Using the code snippet below,
the object[] itemArray will contain an array of each item in your row. If the
row has N columns, there will be an N item array.

If you still want to include Columns 1 to 3, all you need to do is index
your array accordingly.

I personally get pretty fast results from this. My code parses roughly
35,000 records of string data in about 0.3 seconds.

"myotheraccount" wrote:
Thanks for the suggestion. Unfortunately, I have a dynamic number of
columns. The code below only converts the first column to a string,
but I need to convert each of them to a string to load them all into
the list box, through this still forces me to loop through all of the
columns in the data row.
I'll try using a VirtualListBox.
Any more suggestions welcome.

On Nov 7, 5:18 pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
foreach (DataRow row in DataTable1.Rows)
{
object[] itemArray = row.ItemArray;
string sItem1 = itemArray[0].ToString();

}
"myotheraccount" wrote:
Hello,
Is there a way to convert a DataRow to a StringArray, without looping
through all of the items of the DataRow?
Basically, I'm trying to get the results of a query and put them into
a listbox.
Right now it is done like this:
foreach(DataRow myDatarow in myDataTable)
{
String[] row = new String[myDataRow.ItemArray.Length];
for (int x = 0; x < myDataRow.ItemArray.Length; x++)
{
row[x] = myDataRow[x].ToString();
}
myListBox.Items.Add(new ListViewItem(row));
}
Unfortunately, the performance on this is poor when there is a lot of
data.
The number of columns in the DataTable depend on user input, so I
cannot simply replace all of that with
foreach(DataRow myDatarow in my DataTable)
{
myListBox.Items.Add(new ListViewItem (new String [] {
myDataRow["col1"].toString(),
myDataRow["col2"].toString(),
myDataRow["col3"].toString()
...
}
}
Any suggestions?
Thanks in advance

Nov 10 '08 #5
jp,

Thank you so much for your response. I'm a newbie to c#, so if you
could bear with me, I will really appreciate it.

What exactly do you mean by "index your array accordingly"? i.e.
Let's say my DataRow has 4 columns, what will the snippet look like
for that?
Thanks a lot.

On Nov 10, 9:09*am, jp2msft <jp2m...@discussions.microsoft.comwrote:
My apologies for not spelling it out enough: Using the code snippet below,
the object[] itemArray will contain an array of each item in your row. Ifthe
row has N columns, there will be an N item array.

If you still want to include Columns 1 to 3, all you need to do is index
your array accordingly.

I personally get pretty fast results from this. My code parses roughly
35,000 records of string data in about 0.3 seconds.

"myotheraccount" wrote:
Thanks for the suggestion. *Unfortunately, I have a dynamic number of
columns. *The code below only converts the first column to a string,
but I need to convert each of them to a string to load them all into
the list box, through this still forces me to loop through all of the
columns in the data row.
I'll try using a VirtualListBox.
Any more suggestions welcome.
On Nov 7, 5:18 pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
foreach (DataRow row in DataTable1.Rows)
{
* object[] itemArray = row.ItemArray;
* string sItem1 = itemArray[0].ToString();
}
"myotheraccount" wrote:
Hello,
Is there a way to convert a DataRow to a StringArray, without looping
through all of the items of the DataRow?
Basically, I'm trying to get the results of a query and put them into
a listbox.
Right now it is done like this:
foreach(DataRow myDatarow in myDataTable)
{
* * String[] row = new String[myDataRow.ItemArray.Length];
* * for (int x = 0; x < myDataRow.ItemArray.Length; x++)
* * {
* * * * row[x] = myDataRow[x].ToString();
* * }
* * myListBox.Items.Add(new ListViewItem(row));
}
Unfortunately, the performance on this is poor when there is a lot of
data.
The number of columns in the DataTable depend on user input, so I
cannot simply replace all of that with
foreach(DataRow myDatarow in my DataTable)
{
* * myListBox.Items.Add(new ListViewItem (new String [] {
* * * * myDataRow["col1"].toString(),
* * * * myDataRow["col2"].toString(),
* * * * myDataRow["col3"].toString()
* * * * ...
* * * * }
}
Any suggestions?
Thanks in advance
Nov 10 '08 #6
With 4 columns, you would do something like this:

foreach (DataRow row in DataTable1.Rows)
{
object[] itemArray = row.ItemArray;
// this is a "checking" step
if (itemArray.Length == 4) {
string sItem1 = itemArray[0].ToString();
string sItem2 = itemArray[1].ToString();
string sItem3 = itemArray[2].ToString();
string sItem4 = itemArray[3].ToString();
// or, if you wanted it in a list view:
string sLvItem = itemArray[0].ToString() + ";"
+ itemArray[1].ToString() + ";"
+ itemArray[2].ToString() + ";"
+ itemArray[3].ToString() + ";"
ListView1.Items.Add(sLvItem);
}
}

Of course, I'm not real sure what your code is trying to do, but this should
give you an idea how to access the elements in your row.

"myotheraccount" wrote:
jp,

Thank you so much for your response. I'm a newbie to c#, so if you
could bear with me, I will really appreciate it.

What exactly do you mean by "index your array accordingly"? i.e.
Let's say my DataRow has 4 columns, what will the snippet look like
for that?
Thanks a lot.

On Nov 10, 9:09 am, jp2msft <jp2m...@discussions.microsoft.comwrote:
My apologies for not spelling it out enough: Using the code snippet below,
the object[] itemArray will contain an array of each item in your row. If the
row has N columns, there will be an N item array.

If you still want to include Columns 1 to 3, all you need to do is index
your array accordingly.

I personally get pretty fast results from this. My code parses roughly
35,000 records of string data in about 0.3 seconds.

"myotheraccount" wrote:
Thanks for the suggestion. Unfortunately, I have a dynamic number of
columns. The code below only converts the first column to a string,
but I need to convert each of them to a string to load them all into
the list box, through this still forces me to loop through all of the
columns in the data row.
I'll try using a VirtualListBox.
Any more suggestions welcome.
On Nov 7, 5:18 pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
foreach (DataRow row in DataTable1.Rows)
{
object[] itemArray = row.ItemArray;
string sItem1 = itemArray[0].ToString();
}
"myotheraccount" wrote:
Hello,
Is there a way to convert a DataRow to a StringArray, without looping
through all of the items of the DataRow?
Basically, I'm trying to get the results of a query and put them into
a listbox.
Right now it is done like this:
foreach(DataRow myDatarow in myDataTable)
{
String[] row = new String[myDataRow.ItemArray.Length];
for (int x = 0; x < myDataRow.ItemArray.Length; x++)
{
row[x] = myDataRow[x].ToString();
}
myListBox.Items.Add(new ListViewItem(row));
}
Unfortunately, the performance on this is poor when there is a lot of
data.
The number of columns in the DataTable depend on user input, so I
cannot simply replace all of that with
foreach(DataRow myDatarow in my DataTable)
{
myListBox.Items.Add(new ListViewItem (new String [] {
myDataRow["col1"].toString(),
myDataRow["col2"].toString(),
myDataRow["col3"].toString()
...
}
}
Any suggestions?
Thanks in advance

Nov 10 '08 #7
Is this any different that in my original example:

foreach(DataRow myDatarow in myDataTable)
{
String[] row = new String[myDataRow.ItemArray.Length];
for (int x = 0; x < myDataRow.ItemArray.Length; x++)
{
row[x] = myDataRow[x].ToString();
}
myListBox.Items.Add(new ListViewItem(row));

}

It looks like the only difference is that my way coverts the elements
of the DataRow directly, instead of copying them to an object array
first.
What I'm trying to avoid is having to convert each column
individually. I could have as many as 35 or 40 columns. Looping
through 40 columns for each of, say, 10,000 rows appears to be quite
time consuming. I wanted to know if there was a way to convert the
entire array in one shot?
Thanks

On Nov 10, 11:53*am, jp2msft <jp2m...@discussions.microsoft.com>
wrote:
With 4 columns, you would do something like this:

foreach (DataRow row in DataTable1.Rows)
{
* object[] itemArray = row.ItemArray;
* // this is a "checking" step
* if (itemArray.Length == 4) {
* * string sItem1 = itemArray[0].ToString();
* * string sItem2 = itemArray[1].ToString();
* * string sItem3 = itemArray[2].ToString();
* * string sItem4 = itemArray[3].ToString();
* * // or, if you wanted it in a list view:
* * string sLvItem = itemArray[0].ToString() + ";"
* * * + itemArray[1].ToString() + ";"
* * * + itemArray[2].ToString() + ";"
* * * + itemArray[3].ToString() + ";"
* * ListView1.Items.Add(sLvItem);
* }

}

Of course, I'm not real sure what your code is trying to do, but this should
give you an idea how to access the elements in your row.

"myotheraccount" wrote:
jp,
Thank you so much for your response. *I'm a newbie to c#, so if you
could bear with me, I will really appreciate it.
What exactly do you mean by "index your array accordingly"? *i.e.
Let's say my DataRow has 4 columns, what will the snippet look like
for that?
Thanks a lot.
On Nov 10, 9:09 am, jp2msft <jp2m...@discussions.microsoft.comwrote:
My apologies for not spelling it out enough: Using the code snippet below,
the object[] itemArray will contain an array of each item in your row.. If the
row has N columns, there will be an N item array.
If you still want to include Columns 1 to 3, all you need to do is index
your array accordingly.
I personally get pretty fast results from this. My code parses roughly
35,000 records of string data in about 0.3 seconds.
"myotheraccount" wrote:
Thanks for the suggestion. *Unfortunately, I have a dynamic number of
columns. *The code below only converts the first column to a string,
but I need to convert each of them to a string to load them all into
the list box, through this still forces me to loop through all of the
columns in the data row.
I'll try using a VirtualListBox.
Any more suggestions welcome.
On Nov 7, 5:18 pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
foreach (DataRow row in DataTable1.Rows)
{
* object[] itemArray = row.ItemArray;
* string sItem1 = itemArray[0].ToString();
}
"myotheraccount" wrote:
Hello,
Is there a way to convert a DataRow to a StringArray, without looping
through all of the items of the DataRow?
Basically, I'm trying to get the results of a query and put them into
a listbox.
Right now it is done like this:
foreach(DataRow myDatarow in myDataTable)
{
* * String[] row = new String[myDataRow.ItemArray.Length];
* * for (int x = 0; x < myDataRow.ItemArray.Length; x++)
* * {
* * * * row[x] = myDataRow[x].ToString();
* * }
* * myListBox.Items.Add(new ListViewItem(row));
}
Unfortunately, the performance on this is poor when there is a lot of
data.
The number of columns in the DataTable depend on user input, soI
cannot simply replace all of that with
foreach(DataRow myDatarow in my DataTable)
{
* * myListBox.Items.Add(new ListViewItem (new String [] {
* * * * myDataRow["col1"].toString(),
* * * * myDataRow["col2"].toString(),
* * * * myDataRow["col3"].toString()
* * * * ...
* * * * }
}
Any suggestions?
Thanks in advance
Nov 10 '08 #8
Is this any different that in my original example:

foreach(DataRow myDatarow in myDataTable)
{
String[] row = new String[myDataRow.ItemArray.Length];
for (int x = 0; x < myDataRow.ItemArray.Length; x++)
{
row[x] = myDataRow[x].ToString();
}
myListBox.Items.Add(new ListViewItem(row));

}

It looks like the only difference is that my way coverts the elements
of the DataRow directly, instead of copying them to an object array
first.
What I'm trying to avoid is having to convert each column
individually. I could have as many as 35 or 40 columns. Looping
through 40 columns for each of, say, 10,000 rows appears to be quite
time consuming. I wanted to know if there was a way to convert the
entire array in one shot?
Thanks
On Nov 10, 11:53*am, jp2msft <jp2m...@discussions.microsoft.com>
wrote:
With 4 columns, you would do something like this:

foreach (DataRow row in DataTable1.Rows)
{
* object[] itemArray = row.ItemArray;
* // this is a "checking" step
* if (itemArray.Length == 4) {
* * string sItem1 = itemArray[0].ToString();
* * string sItem2 = itemArray[1].ToString();
* * string sItem3 = itemArray[2].ToString();
* * string sItem4 = itemArray[3].ToString();
* * // or, if you wanted it in a list view:
* * string sLvItem = itemArray[0].ToString() + ";"
* * * + itemArray[1].ToString() + ";"
* * * + itemArray[2].ToString() + ";"
* * * + itemArray[3].ToString() + ";"
* * ListView1.Items.Add(sLvItem);
* }

}

Of course, I'm not real sure what your code is trying to do, but this should
give you an idea how to access the elements in your row.

"myotheraccount" wrote:
jp,
Thank you so much for your response. *I'm a newbie to c#, so if you
could bear with me, I will really appreciate it.
What exactly do you mean by "index your array accordingly"? *i.e.
Let's say my DataRow has 4 columns, what will the snippet look like
for that?
Thanks a lot.
On Nov 10, 9:09 am, jp2msft <jp2m...@discussions.microsoft.comwrote:
My apologies for not spelling it out enough: Using the code snippet below,
the object[] itemArray will contain an array of each item in your row.. If the
row has N columns, there will be an N item array.
If you still want to include Columns 1 to 3, all you need to do is index
your array accordingly.
I personally get pretty fast results from this. My code parses roughly
35,000 records of string data in about 0.3 seconds.
"myotheraccount" wrote:
Thanks for the suggestion. *Unfortunately, I have a dynamic number of
columns. *The code below only converts the first column to a string,
but I need to convert each of them to a string to load them all into
the list box, through this still forces me to loop through all of the
columns in the data row.
I'll try using a VirtualListBox.
Any more suggestions welcome.
On Nov 7, 5:18 pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
foreach (DataRow row in DataTable1.Rows)
{
* object[] itemArray = row.ItemArray;
* string sItem1 = itemArray[0].ToString();
}
"myotheraccount" wrote:
Hello,
Is there a way to convert a DataRow to a StringArray, without looping
through all of the items of the DataRow?
Basically, I'm trying to get the results of a query and put them into
a listbox.
Right now it is done like this:
foreach(DataRow myDatarow in myDataTable)
{
* * String[] row = new String[myDataRow.ItemArray.Length];
* * for (int x = 0; x < myDataRow.ItemArray.Length; x++)
* * {
* * * * row[x] = myDataRow[x].ToString();
* * }
* * myListBox.Items.Add(new ListViewItem(row));
}
Unfortunately, the performance on this is poor when there is a lot of
data.
The number of columns in the DataTable depend on user input, soI
cannot simply replace all of that with
foreach(DataRow myDatarow in my DataTable)
{
* * myListBox.Items.Add(new ListViewItem (new String [] {
* * * * myDataRow["col1"].toString(),
* * * * myDataRow["col2"].toString(),
* * * * myDataRow["col3"].toString()
* * * * ...
* * * * }
}
Any suggestions?
Thanks in advance
Nov 10 '08 #9
Again, I misunderstood. I thought you wanted a way to build your array faster
in fewer steps.

If you are looking to have less data to dig through, try something like this
(modified to how you need to use it, of course):

Is this any different that in my original example:

foreach(DataRow myDatarow in myDataTable.Select("JobTitle=MANAGER"))
{
myListBox.Items.Add(new ListViewItem(myDatarow["FullName"]));
}

Is this more in line with what you are looking for? Without more
information, I don't know how to help you further.

~Joe
"myotheraccount" wrote:
Is this any different that in my original example:

foreach(DataRow myDatarow in myDataTable)
{
String[] row = new String[myDataRow.ItemArray.Length];
for (int x = 0; x < myDataRow.ItemArray.Length; x++)
{
row[x] = myDataRow[x].ToString();
}
myListBox.Items.Add(new ListViewItem(row));

}

It looks like the only difference is that my way coverts the elements
of the DataRow directly, instead of copying them to an object array
first.
What I'm trying to avoid is having to convert each column
individually. I could have as many as 35 or 40 columns. Looping
through 40 columns for each of, say, 10,000 rows appears to be quite
time consuming. I wanted to know if there was a way to convert the
entire array in one shot?
Thanks
On Nov 10, 11:53 am, jp2msft <jp2m...@discussions.microsoft.com>
wrote:
With 4 columns, you would do something like this:

foreach (DataRow row in DataTable1.Rows)
{
object[] itemArray = row.ItemArray;
// this is a "checking" step
if (itemArray.Length == 4) {
string sItem1 = itemArray[0].ToString();
string sItem2 = itemArray[1].ToString();
string sItem3 = itemArray[2].ToString();
string sItem4 = itemArray[3].ToString();
// or, if you wanted it in a list view:
string sLvItem = itemArray[0].ToString() + ";"
+ itemArray[1].ToString() + ";"
+ itemArray[2].ToString() + ";"
+ itemArray[3].ToString() + ";"
ListView1.Items.Add(sLvItem);
}

}

Of course, I'm not real sure what your code is trying to do, but this should
give you an idea how to access the elements in your row.

"myotheraccount" wrote:
jp,
Thank you so much for your response. I'm a newbie to c#, so if you
could bear with me, I will really appreciate it.
What exactly do you mean by "index your array accordingly"? i.e.
Let's say my DataRow has 4 columns, what will the snippet look like
for that?
Thanks a lot.
On Nov 10, 9:09 am, jp2msft <jp2m...@discussions.microsoft.comwrote:
My apologies for not spelling it out enough: Using the code snippet below,
the object[] itemArray will contain an array of each item in your row.. If the
row has N columns, there will be an N item array.
If you still want to include Columns 1 to 3, all you need to do is index
your array accordingly.
I personally get pretty fast results from this. My code parses roughly
35,000 records of string data in about 0.3 seconds.
"myotheraccount" wrote:
Thanks for the suggestion. Unfortunately, I have a dynamic number of
columns. The code below only converts the first column to a string,
but I need to convert each of them to a string to load them all into
the list box, through this still forces me to loop through all of the
columns in the data row.
I'll try using a VirtualListBox.
Any more suggestions welcome.
On Nov 7, 5:18 pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
foreach (DataRow row in DataTable1.Rows)
{
object[] itemArray = row.ItemArray;
string sItem1 = itemArray[0].ToString();
}
"myotheraccount" wrote:
Hello,
Is there a way to convert a DataRow to a StringArray, without looping
through all of the items of the DataRow?
Basically, I'm trying to get the results of a query and put them into
a listbox.
Right now it is done like this:
foreach(DataRow myDatarow in myDataTable)
{
String[] row = new String[myDataRow.ItemArray.Length];
for (int x = 0; x < myDataRow.ItemArray.Length; x++)
{
row[x] = myDataRow[x].ToString();
}
myListBox.Items.Add(new ListViewItem(row));
}
Unfortunately, the performance on this is poor when there is a lot of
data.
The number of columns in the DataTable depend on user input, so I
cannot simply replace all of that with
foreach(DataRow myDatarow in my DataTable)
{
myListBox.Items.Add(new ListViewItem (new String [] {
myDataRow["col1"].toString(),
myDataRow["col2"].toString(),
myDataRow["col3"].toString()
...
}
}
Any suggestions?
Thanks in advance

Nov 10 '08 #10

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

Similar topics

6
by: roni | last post by:
i have array of objects that's are strings. i need to convert it to array of string before sending to method. is there a way to convert ? (short way..)
0
by: Tonya | last post by:
I receive this error in compile time "error C2664: 'void System::Data::DataRow::set_Item(int,System::Object __gc *)' : cannot convert parameter 2 from 'System::DateTime' to 'int'" I don't know...
1
by: Paul W | last post by:
How do I do this with: Option Strict On? I know of the function System.Text.ASCIIEncoding.GetChars, but that takes a Byte array not a DataRow. So with Option Strict On, how do I take the byte...
5
by: manmit.walia | last post by:
Hello All, I am stuck on a conversion problem. I am trying to convert my application which is written in VB.NET to C# because the project I am working on currently is being written in C#. I tried...
2
by: Paulo | last post by:
DataRow dr = (DataRow)ds.Tables.Rows.ItemArray; Error 1 Cannot convert type 'object' to 'System.Data.DataRow' C:\Documents and Settings\Fabio\Meus documentos\Visual Studio...
2
by: Chris Kennedy | last post by:
I am getting a generic list of objects from a webservice. The list is converted to an array by this process. How do I convert the array back to a list and is there any way of finding an object...
12
by: Miro | last post by:
How can I convert this part of the line: Me.dgvmyData.Columns.Item("txtCellName") ' "txtCellName" which is within this line - Me.dgvmyData.Sort(Me.dgvmyData.Columns.Item("txtCellName"),...
1
by: John A Grandy | last post by:
To convert DataRow column values to enum types , I am using : MyEnum myEnumValue = (MyEnum )Enum.Parse( typeof( MyEnum ), ((int)row).ToString() ); Is there an easier way ?
1
by: NareshN | last post by:
Hi All, I have stringarray called Timesplit with time like(17:00-2:00).How to store Timeplit array values into datetime array value.I am having 7 values that's why i am using TimeIn.I will...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.