• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

Creating Web Application to accompany Access Contact Database

I created a relational Access Database as described in this previous thread:

http://www.experts-exchange.com/Databases/MS_Access/Q_21360503.html#13614326

I am now developing the Web Interface to accompany this in dreamweaver MX 2004.   I am using standard ASP, and am presenting the first of my questions.  

I need to find a way to create the master contact record first in my database, then be taken to a page to directly edit it.  My dilemma here is that at this point I don't know the primary key ID for this entry, and therefore can't do it my usual way with passing the ID.  Any ideas for this?  Or if anyone knows a better way to handle this that would be great.  I also do not wish to just pull the last record created in the database as multiple users can and will be using this at the same time.

Thanks

-JQ

P.S.  In the link above to the previous thread, there is a kink to a recent screenshot of my database at the bottom of the thread.
0
JQuartermaine
Asked:
JQuartermaine
1 Solution
 
alexhoganCommented:
Are you trying to get intContactID after the record has been created?

if so you could simply use the contacts first and last name as the query parameters.


  "SELECT intContactID " _
&"FROM ContactTable " _ ' -- I forgeot the table name
&"WHERE txtFirstName = '" & varFirstName '" _
&"AND txtLastName = '" & varLastName '"

This will return the id of that recordset.  You will need to be careful because it is extremely possible, especially on large database, that you'll have more than one person with the same first and last names.  You might want to add the middle initial in the query to help confine the search.

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now