954,559 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

to retrieve records in vb based on primary key value

Hai friends could you help me?

In VB if i've connected ms access project through a data control to my form..... and i've added many records to my database... and I've set "yarn no" as my primary key... if later I've to update my stock details... I need to retrieve the data s from the record once i've entered the yarn.no (i.e)primary key value....
so can anyone help

kirthica
Newbie Poster
1 post since Oct 2008
Reputation Points: 10
Solved Threads: 0
 

Do you mean a query that will retieve the data you recently added? if that's the case hope this would help...

" SELECT  *   FROM [<em>tablename</em>]   WHERE   Yarn_No = '" &  txtYarnNo.Text  & "'  "
jireh
Posting Whiz
316 posts since Jul 2007
Reputation Points: 11
Solved Threads: 49
 

you ned t open the recordset by passing the primay key value at runtime as suggested in the previous post.

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You