| | |
vb.net, database manipulation
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2009
Posts: 1
Reputation:
Solved Threads: 0
Hello all you geniuses out there... Long time reader first time poster,
So, here is what I'm trying to do.
The program I am trying to construct is for tracking when a person has entered a location. Each person has an RFID card. When a person passes a point, the RFID tag is read and the reader outputs virtual keystrokes. The reader keyboard wedge will output a 6 digit integer.
The program will be left on the run screen, each time a card is read it is placed into a multi-line text box. Every 15 mins or so, the program must read each of the 6 digit numbers, locate them in the database, and change the number of times the card has been read and the time it was read.
What I have so far
So I have no problem creating a data set and filtering that data set and also I have no problem creating user info and writing that to the database. The problem I have is searching for a specific record in my database and then having the program change certain data and update the database.
Here is a sample program I made to test my search method
Any ideas??
So, here is what I'm trying to do.
The program I am trying to construct is for tracking when a person has entered a location. Each person has an RFID card. When a person passes a point, the RFID tag is read and the reader outputs virtual keystrokes. The reader keyboard wedge will output a 6 digit integer.
The program will be left on the run screen, each time a card is read it is placed into a multi-line text box. Every 15 mins or so, the program must read each of the 6 digit numbers, locate them in the database, and change the number of times the card has been read and the time it was read.
What I have so far
So I have no problem creating a data set and filtering that data set and also I have no problem creating user info and writing that to the database. The problem I have is searching for a specific record in my database and then having the program change certain data and update the database.
Here is a sample program I made to test my search method
VB.NET Syntax (Toggle Plain Text)
Public Class Main Private Sub ListingBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListingBindingNavigatorSaveItem.Click Me.Validate() Me.ListingBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.CarTrackerDataSet) End Sub Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'CarTrackerDataSet.CarType' table. You can move, or remove it, as needed. Me.CarTypeTableAdapter.Fill(Me.CarTrackerDataSet.CarType) 'TODO: This line of code loads data into the 'CarTrackerDataSet.Make' table. You can move, or remove it, as needed. Me.MakeTableAdapter.Fill(Me.CarTrackerDataSet.Make) 'TODO: This line of code loads data into the 'CarTrackerDataSet.Color' table. You can move, or remove it, as needed. Me.ColorTableAdapter.Fill(Me.CarTrackerDataSet.Color) 'TODO: This line of code loads data into the 'CarTrackerDataSet.Listing' table. You can move, or remove it, as needed. Me.ListingTableAdapter.Fill(Me.CarTrackerDataSet.Listing) End Sub Private Sub FillByColorNameToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FillByColorNameToolStripButton.Click Try Me.ListingTableAdapter.FillByColorName(Me.CarTrackerDataSet.Listing, ColorNameToolStripTextBox.Text) Catch ex As System.Exception System.Windows.Forms.MessageBox.Show(ex.Message) End Try End Sub Private Sub tsbFilterByMake_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbFilterByMake.Click Dim filteredByMake = From Listing In Me.CarTrackerDataSet.Listing _ Join Make In Me.CarTrackerDataSet.Make _ On Listing.MakeID Equals Make.MakeID _ Where Make.MakeName.ToLower() Like _ "*" & Me.tstbFilterByMake.Text.ToLower() & "*" _ Select Listing Try Me.ListingBindingSource.DataSource = filteredByMake.CopyToDataTable Catch ex As System.InvalidOperationException MessageBox.Show("No matching data") End Try End Sub Private Sub tsbFilterByCarType_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbFilterByCarType.Click Dim filteredByCarType = From Listing In Me.CarTrackerDataSet.Listing _ Join CarType In Me.CarTrackerDataSet.CarType _ On Listing.CarTypeID Equals CarType.CarTypeID _ Where CarType.CarTypeName.ToLower() Like _ "*" & Me.tstbFilterByCarType.Text.ToLower() & "*" _ Select Listing Try Me.ListingBindingSource.DataSource = filteredByCarType.CopyToDataTable Catch ex As System.InvalidOperationException MessageBox.Show("No matching data") End Try End Sub End Class
Any ideas??
![]() |
Similar Threads
- vb.net database connection (VB.NET)
- ASP.NET with C# database connectivity (ASP.NET)
- project topics?? (Database project) VB.NET (VB.NET)
- ASP.Net Database ? (ASP.NET)
- vb.net and database (VB.NET)
- Visual Basic.net Database application (VB.NET)
- Asp.net-Database example- About snippets (DaniWeb Community Feedback)
- help with vb.net (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: Printing in VB.NET
- Next Thread: Protect Sheet with VBA
| Thread Tools | Search this Thread |
.net .net2008 2008 access advanced application array basic beginner browser button buttons center click client code combo convert cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse excel exists fade filter forms function generatetags html images input intel internet listview map mobile module monitor msaccess net number objects open panel pdf picturebox picturebox2 port position print printing problem read regex remove right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter user usercontol vb vb.net vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms winsock wpf wrapingcode xml year





