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

Getting Data From / Adding Data To Access DB Table

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.

Oct 12 '07 #1
2 1651
"ags5406" <m_************@hotmail.comschrieb
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

Oct 12 '07 #2
On Oct 12, 11:03 am, "Armin Zingler" <az.nos...@freenet.dewrote:
"ags5406" <m_cash_stra...@hotmail.comschrieb
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
Thank Armin - I'm already well on my way.

Oct 12 '07 #3

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

Similar topics

2
by: Roy Padgett | last post by:
I have a combo box where users select the customer name and can either go to the customer's info or open a list of the customer's orders. The RowSource for the combo box was a simple pass-through...
16
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
6
by: Martin | last post by:
I'd like to be able to get the name of an object instance from within a call to a method of that same object. Is this at all possible? The example below works by passing in the name of the object...
1
by: MJC | last post by:
Hi all, I have inheireted a database with no primary key and need to determine the order in which the records were entered. The table in question contains assessments and they are linked to an...
3
by: anand | last post by:
hi, let: dataSet1 is having some data from database. dataView1 = dataSet1.table(0).defaultView dataGrid1.dataSource = dataView1 dataGrid1.TableStyle.add(myTableStyle1)
15
by: philip | last post by:
On a form, I have a datagridview. This datagridview is constructed on a dataset filled by a tableadapter. The table adapter do very well what it must do when filling dataset. Insertions,...
15
by: Marcus | last post by:
I created a VB.Net 1.1 application that iterates through all the tables in any basic Access 2000 database passed to it and generates the same table structure in a SQL Server Express database. The...
1
by: RAB | last post by:
Hello, I downloaded the VB samples from the 'Wrox book' website at the following address http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764558900,descCd-download_code.html I installed MSDE...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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.