Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 21st, 2006, 05:15 PM
Registered User
 
Join Date: Mar 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to get value on the same row using vb2005

hi guys,
i have a table in access look like this

Student ID Name
1 John
2 Smith

now everytime a user put in the student id it would populate the Name
But i cannot get the name to display right. Everytime i enter 2 it will give me John instead of Smith.
Now i need to do this without using Index like:
somethingDataSet.Tables("Student").Row(0).Item ("Name")
or
somethingDataSet.Tables("Student").Row(Index).Item ("Name")
because then its inefficiency b/c u have to check error

I tried to put this:
somethingDataSet.Tables("Student").Row("StudentID" ).Item ("Name")
This gave me MissingPrimaryKeyException.

Now what should i do to fix this problem. Thank you in advanced






Similar Threads
Thread Thread Starter Forum Replies Last Post
VB2005 help with dlls please gbwz Visual Basic 2005 Basics 0 May 16th, 2007 05:23 AM
Printing VB2005 hemo Pro VB 6 0 October 7th, 2006 09:36 AM
databinding in VB2005 Bhuvana ADO.NET 2 March 10th, 2006 10:28 AM
databinding in VB2005 Bhuvana ADO.NET 0 March 9th, 2006 02:14 AM
where i can find source about vb2005 ramazana Visual Studio 2005 0 October 24th, 2005 09:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.