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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert multiple records from one form?

Status
Not open for further replies.

Beat

Technical User
Aug 26, 2001
41
0
0
SE
In the admin section the administrator will be able to upload documents relating to a specific client.

The administrator will pick the client and then be presented with 5 file fields where he/she can pick the documents to upload.

I want the file names to be entered to the tblFILES table in my database, together with the clientid as separate records.

There is no problem to insert the names and id in the database with insert record, as one record, but I would like each file to be entered as its own record together with the userid.

Can anyone help me out?

Thanks!
 
i am confused.

u want to know the last generated id?

>>but I would like each file to be entered as its own record together with the userid.

use 5 inserts???

Known is handfull, Unknown is worldfull
 
To be able to display the documents relating to the client when he/she are loggin in, I want to add each file to the database together with the client id.

So, when I submit the form I would like the file name to be added to the tblFILES_file column in the table and the client id to the TblFILES_client column.

How can I get the insert record to insert each of the 5 files as its own record from one insert record.

Does this explains what I would like to do?
 
Loop through them on a seperate page adding them individually

[Peace][Pipe]
 
>>How can I get the insert record to insert each of the 5 files as its own record from one insert record.

confused....

Known is handfull, Unknown is worldfull
 
As vbkris has stated you cant do it from one insert behaviour.

What I would do is pass the form data to a new asp page and then loop through the 5 file fields doing an insert for each of the files

Cheech

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top