Go Back   Access World Forums > Apps and Windows > VB.NET

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-11-2014, 05:57 AM   #1
VC91
Newly Registered User
 
Join Date: Sep 2014
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
VC91 is on a distinguished road
How do I only get required row into my dataset

Hi,

I am fairly new to vb.net but making progress...

I am using Visual Studio 2013 to create VB.net project. I have used the on GUI data sources to get data onto my form but the TableAdapter.Fill is retrieving all rows rather than just the one I want.

Basically Mainform calls SelectEmployeeForm which has a datatable array where the required emp is selected. In the Employee table there is a primary key called ID which I am logging for the selected employee row in a public variable called SelectedEmployeeID
(I am detailing this as I found...
Dim customersRow As NorthwindDataSet.CustomersRow
customersRow = NorthwindDataSet1.Customers.FindByCustomerID("ALFK I")
... on a MSDN page and thought this might be a solution as I have the ID value but could not get it to work. Once I had my customersRow I did not know how to get its data onto my form without doing a series of me.field = statements for each form field, which seemed stupid.

Basically on Mainform I have the autocreated line:
Me.TrainingEmployeesTableAdapter.Fill(Me.TrainingD BDataSet.Employees)

Where this fills my DataSet with all rows I only want the particular one I have the ID for.

Could someone please tell me how I can just load the required row into the me dataset.

I hope that made sense.

Many thanks,
Paul.

VC91 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting the mode of a dataset nbrooke Queries 2 09-20-2012 01:10 AM
Restructure dataset Gannet Modules & VBA 2 12-11-2009 06:19 PM
VB6 Dataset Equivalent Tanner65 Visual Basic 4 06-14-2008 10:06 AM
Dataset captainlove Forms 2 05-02-2008 12:45 PM
dataset prob brosis Modules & VBA 3 05-09-2007 11:30 AM




All times are GMT -8. The time now is 11:21 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World