troubleshooting Question

How to know autonumber field from a table in Visual Basic

Avatar of galo_6
galo_6 asked on
Visual Basic Classic
5 Comments1 Solution314 ViewsLast Modified:

 Hi... I'm a newbie at Visual Basic. I'm building a database application using Access.  The main problem I'm having now is that I save an image with certain name, according with the id of the product.  E.g.:
 
 Product ID:  177
 company ID:  2

 The image should be saved as 2-177.bmp

 I'm using adodc1.recordset.Addnew to add the new register in the database, but I can't find an easy way to get the productid number (autonumber field). I would appreciate if someone can help me.

 Thanks!
ASKER CERTIFIED SOLUTION
Éric Moreau
Senior .Net Consultant
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros