473,404 Members | 2,137 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,404 software developers and data experts.

initialize an ADO object from an array of string

Hello All,

I have a newbie question on ADO. I understand that I can initialize
ADO objects from the results of a query to a database, or from a csv
file. I have an array of strings. How can I pump the array of string
into an ADO object with one or two lines of code (like initalize ADO
from a query to db).

Thank you very much for your input.

Alex

Jun 22 '06 #1
2 982
Alex,

I don't know about one or two lines of code, but you could create a
DataSet easily, add the DataTable, add the DataColumn to the DataTable, then
cycle through your array and then add the strings.

I hope you are not doing this for data binding. You can bind to the
array of strings just like you could the DataSet.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ll***@yahoo.com> wrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Hello All,

I have a newbie question on ADO. I understand that I can initialize
ADO objects from the results of a query to a database, or from a csv
file. I have an array of strings. How can I pump the array of string
into an ADO object with one or two lines of code (like initalize ADO
from a query to db).

Thank you very much for your input.

Alex

Jun 22 '06 #2
Thank you very much Nic. Two follow-up questions.

$ I don't know about one or two lines of code, but you could create a
$ DataSet easily, add the DataTable, add the DataColumn to the
DataTable, then
$ cycle through your array and then add the strings.

So, here we are using a foreach loop to do the job? Am I right?

$ I hope you are not doing this for data binding. You can bind to the
$ array of strings just like you could the DataSet.

If fact, I may also need data binding later on. Could you show me an
example of binding to an array of strings?

Thank you so much.

Alex

Jun 22 '06 #3

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

Similar topics

6
by: steveneng | last post by:
C++ Primer Plus Programming Exercises 4th Ed - Prate Help I'm trying to refresh myself and I'm stuck on this problem (not homework/school related but for personal advancement). 6: Do...
74
by: Peter | last post by:
Hi, So many times, I have seen compile warning: "you used a char* without initilize it", probably on the code like this: ------------ char* ptr; func(..., ptr); ----------
4
by: Mark Hannon | last post by:
I am trying to initialize an array only once so it can be seen & used by any functions that need it. As I understand it, if a variable is declared by itself outside of any functions, its scope is...
2
by: slack_justyb | last post by:
Hello, I'm trying to figure the best way of doing the following. *I need an array of strings that are globally accessable from within 'arrayhere.h' *I need that array of strings to not change...
15
by: Geoff Cox | last post by:
Hello, Can I separately declare and initialize a string array? How and where would I do it in the code below? It was created using Visual C++ 2005 Express Beta 2 ... In C# I would have ...
2
by: deko | last post by:
I trying to create a jagged array of two arrays, with the second array being an array of two-dimensional arrays. A graphical representation might look like this: x y y y x y x y y x ...
2
by: lluum | last post by:
Hello All, I have a newbie question on ADO. I understand that I can initialize ADO objects from the results of a query to a database, or from a csv file. I have an array of strings. How can I...
18
by: toton | last post by:
Hi, In C++ when I initialize an array it, also initializes the class that it contains, which calls the default constructor. However, I want to initialize the array only (i.e reserve the space) and...
38
by: Zytan | last post by:
What is the difference between these two lines? Dim args As Object() = New Object() {strText} Dim args As Object() = {strText} args seems usuable from either, say, like so: ...
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: 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: 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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.