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

How do i retrieve the data in VB.NET using Microsoft access?

I am currently doing my project using VB.NET
I have a database which contains all my data that the user key in.

The problem is, when i click the retrieve button on the form, the
details that the user keyed in cant be retrieve.

The connection is made, just that the data cant be retrive.
Hope someone can help mi... Thanks. its urgent... =]

Nov 21 '05 #1
5 5786
OleDbDataAdapter.... + Google.

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Hannie" <do***********@hotmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
I am currently doing my project using VB.NET
I have a database which contains all my data that the user key in.

The problem is, when i click the retrieve button on the form, the
details that the user keyed in cant be retrieve.

The connection is made, just that the data cant be retrive.
Hope someone can help mi... Thanks. its urgent... =]

Nov 21 '05 #2
Hannie,

You would have to tell something more, to get help.
By instance
Do you use a dataadapter
Does the user typein in a datagrid
What is the actions you do when the user has pushed in that button

After that maybe we can than help you.

Cor
Nov 21 '05 #3

Cor Ligthert wrote:
Hannie,

You would have to tell something more, to get help.
By instance
Do you use a dataadapter
Does the user typein in a datagrid
What is the actions you do when the user has pushed in that button

After that maybe we can than help you.

Cor


Um, well i m using the OleDb connection codings to link to the
database.

My program works like this...

Form One: a pic of a hand with alot of buttons representing the
accupoints of our hands.
Then the user will click the buttons according to the accupoints that
he/shes find that its giving em problem.

When points that the user click will go into the database.

at the bottom of form one., theres a analyse button.

When it is click, it will show form 2

Form 2: Form 2 will show the causes and remedies of the accupoints
that the user click previously.

So, what form 2 will do is to extract the CORRECT info from the corrct
row n column which the user enter.

For eg, If i click the button name Fever, then when i click the Analyse
button, only the causes and remedies of Fever will show. Not others.

So basically thats how i wan it to work.. Hope u can help mi. Thanks
alot..!

Nov 21 '05 #4
How are you storing the data in the database? What query are you using to
retrieve it? Can you view the data in the database? Post the code you are
using to do the retrieval.

Chris

"Hannie" <do***********@hotmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...

Cor Ligthert wrote:
Hannie,

You would have to tell something more, to get help.
By instance
Do you use a dataadapter
Does the user typein in a datagrid
What is the actions you do when the user has pushed in that button

After that maybe we can than help you.

Cor


Um, well i m using the OleDb connection codings to link to the
database.

My program works like this...

Form One: a pic of a hand with alot of buttons representing the
accupoints of our hands.
Then the user will click the buttons according to the accupoints that
he/shes find that its giving em problem.

When points that the user click will go into the database.

at the bottom of form one., theres a analyse button.

When it is click, it will show form 2

Form 2: Form 2 will show the causes and remedies of the accupoints
that the user click previously.

So, what form 2 will do is to extract the CORRECT info from the corrct
row n column which the user enter.

For eg, If i click the button name Fever, then when i click the Analyse
button, only the causes and remedies of Fever will show. Not others.

So basically thats how i wan it to work.. Hope u can help mi. Thanks
alot..!

Nov 21 '05 #5
Hannie,

When I understand you well, is a way you can do it creating an array of
strings and depending of the pushed button is set an index that I have set
global in my program that you do with
\\\
private mystrings() as strings = {"Text1","Text2",etc}
private mybuttonindexer as integer
private da as new Oledb.OledbDataadapter
///
Than using that index you are able to show information in a listbox or a
combobox that is set to dropdownlist.

Than I would in those buttonclick event start a routine as this (the first
item in the array has index 0)

\\\This part in your load event
Dim conn As New OleDb.OleDbConnection _
("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\test1\myMdb")
da = New OleDb.OleDbDataAdapter _
("SELECT * FROM MyTable WHERE (ButtonText = ?)
da.SelectCommand.Parameters.Add _
(New OleDb.OleDbParameter("", OleDb.OleDbType.Date))
da.SelectCommand.Parameters.Add _
(New OleDb.OleDbParameter("", OleDb.OleDbType.Date))
////

\\\This as a sub to process after a buttonclick
da.SelectCommand.Parameters(0).Value = MyStrings(mybuttonindexer)
Dim ds As New DataSet
da.Fill(ds)
DataList1.DataSource = Nothing
DataList1.DataSource = ds.Tables(0)
DataList1.DisplayMember = "FistSelection"
DataList1.ValueMember = "RealSelection"
///

Than when the selection is made, use that valuemember to get the second form
information.
However I think that this is enough to start with and when you have done
this you find easily your next steps (it depends what control you use).

This is made in this message to show, so it can contain typos or other
unseen errors.

I hope this helps,

Cor
Nov 21 '05 #6

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

Similar topics

3
by: Mal Reeve | last post by:
Hello, I am looking for an easy way to retrieve a file from a given website.. I am building an app that will retrieve a .csv file then TRANSFER text it into a table for further processing.. ...
5
by: Roy Gourgi | last post by:
Hi, I am used to working in Visual FoxPro and I would like to be able to create a database and store and retrieve information from it. What is the simplest way to do it and what should I be...
1
by: Linda | last post by:
Hi, I'm new to asp.net and tryign to learn how to work with data grids. I'm retrieving data from a stored procedure and putting it in a data grid. I then want to be able to sort the data when...
3
by: Richard Thornley | last post by:
Hello, I was just been given a project and I have some questions on how to accomplish the first part of the task. If a user sends an email to a specific email address I need to detect...
12
by: jaYPee | last post by:
I have currently using a dataset to access my data from sql server 2000. The dataset contains 3 tables that is related to each other. parent/child/grandchild relationship. My problem is it's very...
1
by: funcSter | last post by:
I want to retrieve data from an Excel file like how I would with a database. I understand that I would have to use OLE DB. Somehow I think I cannot get the connection string right, as the bit of...
13
by: kev | last post by:
Hi all, I have created a database for equipments. I have a form to register the equipment meaning filling in all the particulars (ID, serial, type, location etc). I have two buttons at the end...
1
by: Mel | last post by:
Anyone know how I would retrieve the MaxLength property of a column in my Access Database table? I know how to retrieve table data, for example the "Quote #" field in my example code below, but I...
0
by: tigger | last post by:
Hi there, I'm having problems retrieving data from Access database using Visual basic 2005. My database is called Actual_Database and it has a few tables. One of them is called...
21
by: giandeo | last post by:
Hello Experts. Is it possible to retrieve the value from a populated pull down menu from a database and then use that value to access the same database to get the related fields. Example: ...
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
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: 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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.