Re: Getting Data From / Adding Data To Access DB Table
- From: "Armin Zingler" <az.nospam@xxxxxxxxxx>
- Date: Fri, 12 Oct 2007 18:03:45 +0200
"ags5406" <m_cash_stramel@xxxxxxxxxxx> schrieb
I've looked at lots of solutions for this but I must say that I'm
thoroughly confused.
VB2005...
Let's say I've created a table in an access database called Table1
that has two columns and three records.
So the table looks like...
A 1
B 2
C 3
I want to get the data from that table into two arrays - a string
array and an integer array.
I've gone to the solution explorer, right click on project name, add
existing item, access_file.mdb, ...
In data sources I can see access_fileDataSet, and under that I can
see the table Table1. I can right click on Table1 and preview the
data. But I cannot for the life of me figure out how to get this
into an array.
Any help is greatly appreciated.
In short: Build a connection to the database, use an OleDbCommand and SQL select command to query the data, use a OleDbDatareader to read the data in a loop and put them into an array - but you should learn it from the start:
http://msdn2.microsoft.com/en-us/library/e80y5yhx.aspx
Armin
.
- Follow-Ups:
- Re: Getting Data From / Adding Data To Access DB Table
- From: ags5406
- Re: Getting Data From / Adding Data To Access DB Table
- References:
- Getting Data From / Adding Data To Access DB Table
- From: ags5406
- Getting Data From / Adding Data To Access DB Table
- Prev by Date: Re: RaiseEvent not firing...
- Next by Date: Re: Auto Detecting delimiters
- Previous by thread: Getting Data From / Adding Data To Access DB Table
- Next by thread: Re: Getting Data From / Adding Data To Access DB Table
- Index(es):
Relevant Pages
|