Lost Password?

Go Back   CodeCall Programming Forum > Software Development > Visual Basic Programming

Visual Basic Programming Discussion forum for Visual Basic, an event driven programming language and associated development environment from Microsoft for its COM programming model.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-06-2007, 12:27 AM
tigger tigger is offline
Newbie
 
Join Date: Jul 2007
Posts: 1
Rep Power: 0
tigger is on a distinguished road
Default Retrieving Access Database

Hi,
I'm now using Visual Basic 2005. I need some help in my database. Right now, i've already managed to connect my program with the database. But i don't know how to continue from there. I have a toneLabel where the values change accordingly when a button is pressed. When i select a name from a combo box, and click presentButton, it should get values (under that name) from the database. If the toneLabel value corresponds to the value from the database (for that particular name), a smiley face will appear.

If toneLabel.text >= (value from database, eg. AC250L, AC250R)
Me.PictureBox1.Visible = True
tmrTimer.Interval = 1000
tmrTimer.Enabled = True

Just that i don't know how to retrieve the values and compare it with the toneLabel value (without having to display it on my GUI).


Here are some of my codes..

Private Sub BIEMaskingMachine_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Actual_DatabaseDataSet.Threshold_Database' table. You can move, or remove it, as needed.
Me.Threshold_DatabaseTableAdapter.Fill(Me.Actual_D atabaseDataSet.Threshold_Database)

Dim con As New OleDb.OleDbConnection

con.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = D:\project1\BIEProject\Actual Database.mdb;Jet OLEDBatabase Password=xxxx"

con.Open()
MsgBox("A Connection is now open")

'Use a variable to hold the SQL statement.
Dim selectString As String = "SELECT Name, AC250L, AC250L, BC250L, BC250R, AC500L, AC500R, BC500L, BC500R, AC750L, AC750R, BC750L, BC750R, AC1KzL, AC1KzR, BC1KzL, BC1KzR, AC15KL, AC15KR, BC15KL, BC15KR, AC2KzL, AC2KzR, BC2KzL, BC2KzR, AC3KzL, AC3KzR, BC3KzL, BC3KzR, AC4KzL, AC4KzR, BC4KzL, BC4KzR, AC6KzL, AC6KzR, BC6KzL, BC6KzR, AC8KzL, AC8KzR, BC8KzL, BC8KzR "

'Create an OleDbCommand object.
Dim cmd As OleDb.OleDbCommand = New OleDb.OleDbCommand(selectString, con)

con.Close()
MsgBox("A Connection is now closed")

End Sub
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best program for SQL database manipulation Rhadamanthys Database & Database Programming 3 07-02-2007 02:32 PM
Access database query using sql help !!! ORACLE Visual Basic Programming 4 04-16-2007 01:12 PM
Database access jimmyfrube Visual Basic Programming 1 04-03-2007 03:57 PM
Java:Tutorial - Access Modifiers John Java Tutorials 0 12-09-2006 09:57 AM
Working with TADO Table MrDiaz Pascal/Delphi 0 07-03-2006 06:28 PM


All times are GMT -5. The time now is 05:33 AM.

Contest Stats

Xav ........ 162.68
Sacback ........ 120.05
alearb8 ........ 120.05
tfusion ........ 120
amr2107 ........ 120
d3s!gn ........ 120
Qoolman21 ........ 120
Pillager ........ 108
antihero ........ 106
donfrench ........ 100.05

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 68%

Ads