Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using ASP to Update Relational Tables in Access

Status
Not open for further replies.

monkeymagic2222

Technical User
May 13, 2002
78
GB
Hi,

I'm trying to create an ASP/MS Access system to allow our Company to create internal purchase orders through the intranet. So far I have set up half a dozen Access tables, two of which are linked. These are tblOrder which is linked to a table called tblItem using a one-to-many relationship. The idea I have in my head is for each Order number, x number of items can be added to it.

I'm fine with the Access bit but I don't know where to start in order to get the ASP bit working correctly? I want to first let the user tap in a unique order number, record this to tblOrder then intelligently add rows to tblItem relating to that order number, depending on the amount of items the user wishes to add.

Any help/guidance is greatly appreciated!

Cheers,
 
[tt]

How much ASP experience do you have?
<%
if your answer = Little to None than
read this = else

Create a recordset pulling every field from your tables\query displaying all data. Then attach a link to a particular field in your display page with a link appending the ID number for that record, then on the page that is linked, select everything where the ID field = the id you're passing in the url...
enf if
%>


The link I provided above should get you started on the basics of ASP (if not) you can also visit these sites:







banana.gif
rockband.gif
Banana.gif

 
Thanks for that, I will check out those links.

I have a fair bit of experience of ASP, i've used it quite extensively to add/view and update database records etc. but never to update linked tables. I had a go at using AddNew to add a new entry to this table but kept getting various errors even though the code was identical to what i'd used before. I was basically wondering if you had to use a different method to add new records to a linked table or anything, as even displaying records from parent table fails.

Thanks again,
 
Figured out the problem(s)!

I should have used a Right Join when viewing the detail but the reason why the SQL wouldn't update the database was because I had a table called Order and I have just realised Order is a reserved SQL statement so I had to rename the table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top