473,758 Members | 4,381 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5807
OleDbDataAdapte r.... + 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.goo glegroups.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.goo glegroups.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.OledbData adapter
///
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.OleDbConn ection _
("Provider=Micr osoft.Jet.OLEDB .4.0;Data Source=c:\test1 \myMdb")
da = New OleDb.OleDbData Adapter _
("SELECT * FROM MyTable WHERE (ButtonText = ?)
da.SelectComman d.Parameters.Ad d _
(New OleDb.OleDbPara meter("", OleDb.OleDbType .Date))
da.SelectComman d.Parameters.Ad d _
(New OleDb.OleDbPara meter("", OleDb.OleDbType .Date))
////

\\\This as a sub to process after a buttonclick
da.SelectComman d.Parameters(0) .Value = MyStrings(mybut tonindexer)
Dim ds As New DataSet
da.Fill(ds)
DataList1.DataS ource = Nothing
DataList1.DataS ource = ds.Tables(0)
DataList1.Displ ayMember = "FistSelect ion"
DataList1.Value Member = "RealSelect ion"
///

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
1783
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.. Any pointers would be greatly appreciated. TIA
5
2931
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 using as there are many choices to choose from. My database will contain a lot of records. TIA
1
6515
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 clicking on the headers, using the Sub grdList_SortCommand. When clicking a header I get the error message: "System.Data.DataException: DataTable must be set prior to using DataView."
3
1828
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 that
12
12262
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 slow to retrieve records from sql server. I'm using sqldataadapter.fill method to populate dataset. Parent table contains more than 3,000 records and child table contains more than 10,000 records and grandchild table contains more than 90,000...
1
3253
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 code fails at "objConn.Open()" with the error: System.Data.OleDb.OleDbException: Could not find installable ISAM. Can somebody please help me out? I'm still a learning programmer, so if someone can point out my mistakes, it'll be great! Thanks! ...
13
3436
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 of the form which is submit and cancel. After i have clicked submit, the information is stored directly into my corresponding database table. My problem here is i need to retrieve back the information submitted to display all the data that the...
1
1926
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 have never attempted to access a property of a field. 'Beginning of my Code Example Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\support\webbmq.mdb;" Dim strSel As String = "SELECT * FROM " Dim conWebOrdNum As New...
0
1434
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 Threshold Database. I'm trying to retrieve data from Threshold Database. In that table, it has columns of AC250L, AC250R, BC250L, BC250R, AC500L etc.. When i select a name from the combo box, and click presentButton, it will show a smile if the values from...
21
2897
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: Database name: sp Table: importer Field names: imp_code, imp_name, imp_address, imp_tel
0
9492
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9299
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8744
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7287
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5332
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3402
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.